kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer
Class ConnectionNot

java.lang.Object
  extended by kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer.ConnectionNot

public class ConnectionNot
extends java.lang.Object

This class is for the impossible connection rules of morphemes. It is used to check whether morphemes may not appear consecutively.

Author:
Sangwon Park (hudoni@world.kaist.ac.kr), CILab, SWRC, KAIST

Field Summary
 java.lang.String author
          The author of the connection rules.
 java.lang.String copyright
          The copyright of the connection rules.
 java.lang.String date
          The date when the connection rules are updated.
 java.lang.String editor
          The people who edited the connection rules.
private  java.lang.String[][] notMorphTable
          Table for the morphemes that cannot appear consecutively
private  int[][] notTagTable
          Table for the tags that cannot appear consecutively
private  int ruleCount
          The number of impossible connection rules
 java.lang.String startTag
          Start tag.
 java.lang.String title
          The name of the connection rules.
 java.lang.String version
          The version of the connection rules.
 
Constructor Summary
ConnectionNot()
          Constructor.
 
Method Summary
 boolean checkConnection()
          Checks whether the two morphemes may not appear consecutively.
 void clear()
          Cleans the rules loaded and metadata.
 void init(java.lang.String filePath, TagSet tagSet)
          Initializes the object with the specified file for impossible connection rules.
private  void readFile(java.lang.String filePath, TagSet tagSet)
          Reads the impossible connection rules from the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

public java.lang.String title
The name of the connection rules.


version

public java.lang.String version
The version of the connection rules.


copyright

public java.lang.String copyright
The copyright of the connection rules.


author

public java.lang.String author
The author of the connection rules.


date

public java.lang.String date
The date when the connection rules are updated.


editor

public java.lang.String editor
The people who edited the connection rules.


startTag

public java.lang.String startTag
Start tag.


notTagTable

private int[][] notTagTable
Table for the tags that cannot appear consecutively


notMorphTable

private java.lang.String[][] notMorphTable
Table for the morphemes that cannot appear consecutively


ruleCount

private int ruleCount
The number of impossible connection rules

Constructor Detail

ConnectionNot

public ConnectionNot()
Constructor.

Method Detail

checkConnection

public boolean checkConnection()
Checks whether the two morphemes may not appear consecutively.

Returns:
true: they may appear consecutively, false: they may not appear consecutively

clear

public void clear()
Cleans the rules loaded and metadata.


init

public void init(java.lang.String filePath,
                 TagSet tagSet)
          throws java.io.IOException
Initializes the object with the specified file for impossible connection rules.

Parameters:
filePath - - the file for the impossible connection rules
tagSet - - the morpheme tag set used in the rules
Throws:
java.io.IOException

readFile

private void readFile(java.lang.String filePath,
                      TagSet tagSet)
               throws java.io.IOException
Reads the impossible connection rules from the specified file.

Parameters:
filePath - - the file for the impossible connection rules
tagSet - - the morpheme tag set used in the rules
Throws:
java.io.IOException