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

java.lang.Object
  extended by kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer.ChartMorphAnalyzer
All Implemented Interfaces:
MorphAnalyzer, Plugin

public class ChartMorphAnalyzer
extends java.lang.Object
implements MorphAnalyzer

Chart-based Morphological Analyzer. It is a morphological analyzer plug-in which is a major plug-in of phase 2 in HanNanum work flow. This uses the lattice-style chart as a internal data structure, which makes it possible to do morphological analysis without back tracking.

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

Field Summary
private  AnalyzedDic analyzedDic
          Pre-analyzed dictionary.
private  MorphemeChart chart
          Lattice-style morpheme chart.
private  Connection connection
          Connection rules between morphemes.
private  ConnectionNot connectionNot
          Impossible connection rules.
private  java.util.LinkedList<Eojeol> eojeolList
          Eojeol list
private  java.lang.String fileConnections
          The file path for the connection rules.
private  java.lang.String fileConnectionsNot
          The file path for the impossible connection rules.
private  java.lang.String fileDicAnalyzed
          The file path for the pre-analyzed dictionary.
private  java.lang.String fileDicSystem
          The file path for the default morpheme dictionary.
private  java.lang.String fileDicUser
          The file path for the user morpheme dictionary.
private  java.lang.String fileTagSet
          The file path for the tag set.
private  NumberDic numDic
          Number dictionary, which is actually a automata.
private static java.lang.String PLUG_IN_NAME
          Name of this plug-in.
private  PostProcessor postProc
          Post-processor to deal with some exceptions
private  Simti simti
          SIMTI structure for reverse segment position.
private  Trie systemDic
          Default morpheme dictionary.
private  TagSet tagSet
          Morpheme tag set
private  Trie userDic
          Additional morpheme dictionary that users can modify for their own purpose.
 
Constructor Summary
ChartMorphAnalyzer()
           
 
Method Summary
 java.lang.String getName()
          Returns the name of the morphological analysis plug-in.
 void initialize(java.lang.String baseDir, java.lang.String configFile)
          Initializes the Chart-based Morphological Analyzer plug-in.
 SetOfSentences morphAnalyze(PlainSentence ps)
          Analyzes the specified plain sentence, and returns all the possible analysis results.
private  Eojeol[] processEojeol(java.lang.String plainEojeol)
          It processes the input plain eojeol by analyzing it or searching the pre-analyzed dictionary.
 void shutdown()
          It is called right before the work flow ends.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUG_IN_NAME

private static final java.lang.String PLUG_IN_NAME
Name of this plug-in.

See Also:
Constant Field Values

analyzedDic

private AnalyzedDic analyzedDic
Pre-analyzed dictionary.


systemDic

private Trie systemDic
Default morpheme dictionary.


userDic

private Trie userDic
Additional morpheme dictionary that users can modify for their own purpose.


numDic

private NumberDic numDic
Number dictionary, which is actually a automata.


tagSet

private TagSet tagSet
Morpheme tag set


connection

private Connection connection
Connection rules between morphemes.


connectionNot

private ConnectionNot connectionNot
Impossible connection rules.


chart

private MorphemeChart chart
Lattice-style morpheme chart.


simti

private Simti simti
SIMTI structure for reverse segment position.


fileConnectionsNot

private java.lang.String fileConnectionsNot
The file path for the impossible connection rules.


fileConnections

private java.lang.String fileConnections
The file path for the connection rules.


fileDicAnalyzed

private java.lang.String fileDicAnalyzed
The file path for the pre-analyzed dictionary.


fileDicSystem

private java.lang.String fileDicSystem
The file path for the default morpheme dictionary.


fileDicUser

private java.lang.String fileDicUser
The file path for the user morpheme dictionary.


fileTagSet

private java.lang.String fileTagSet
The file path for the tag set.


eojeolList

private java.util.LinkedList<Eojeol> eojeolList
Eojeol list


postProc

private PostProcessor postProc
Post-processor to deal with some exceptions

Constructor Detail

ChartMorphAnalyzer

public ChartMorphAnalyzer()
Method Detail

getName

public java.lang.String getName()
Returns the name of the morphological analysis plug-in.

Returns:
the name of the morphological analysis plug-in.

processEojeol

private Eojeol[] processEojeol(java.lang.String plainEojeol)
It processes the input plain eojeol by analyzing it or searching the pre-analyzed dictionary.

Parameters:
plainEojeol - - plain eojeol to analyze
Returns:
the morphologically analyzed eojeol list

morphAnalyze

public SetOfSentences morphAnalyze(PlainSentence ps)
Analyzes the specified plain sentence, and returns all the possible analysis results.

Specified by:
morphAnalyze in interface MorphAnalyzer
Parameters:
ps - - the plain sentence to be morphologically analyzed
Returns:
all the possible morphological analysis results

initialize

public void initialize(java.lang.String baseDir,
                       java.lang.String configFile)
                throws java.lang.Exception
Initializes the Chart-based Morphological Analyzer plug-in.

Specified by:
initialize in interface Plugin
Parameters:
baseDir - - the path for base directory, which should have the 'conf' and 'data' directory
configFile - - the path for the configuration file (relative path to the base directory)
Throws:
java.lang.Exception - x

shutdown

public void shutdown()
It is called right before the work flow ends.

Specified by:
shutdown in interface Plugin