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

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

public class AnalyzedDic
extends java.lang.Object

This class is the data structure for the pre-analyzed dictionary.

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

Field Summary
private  java.util.Hashtable<java.lang.String,java.lang.String> dictionary
           
 
Constructor Summary
AnalyzedDic()
          Constructor.
AnalyzedDic(java.lang.String dictionaryFileName)
          Constructor.
 
Method Summary
 void clear()
          Cleans the data in the hash table.
 java.lang.String get(java.lang.String item)
          Returns the contents according to the specified item.
 void readDic(java.lang.String dictionaryFileName)
          It loads the pre-analyzed dictionary from data file to the hash table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dictionary

private java.util.Hashtable<java.lang.String,java.lang.String> dictionary
Constructor Detail

AnalyzedDic

public AnalyzedDic()
Constructor.


AnalyzedDic

public AnalyzedDic(java.lang.String dictionaryFileName)
            throws java.io.UnsupportedEncodingException,
                   java.io.FileNotFoundException,
                   java.io.IOException
Constructor. It loads the pre-analyzed dictionary from data file to the hash table. The file format of dictionary should be like this: "ITEM\tCONTENT\n"

Parameters:
dictionaryFileName - - the path for the pre-analyzed dictionary file
Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
Method Detail

clear

public void clear()
Cleans the data in the hash table.


get

public java.lang.String get(java.lang.String item)
Returns the contents according to the specified item.

Parameters:
item - - item to search
Returns:
the dictionary contents for the search item

readDic

public void readDic(java.lang.String dictionaryFileName)
             throws java.io.UnsupportedEncodingException,
                    java.io.FileNotFoundException,
                    java.io.IOException
It loads the pre-analyzed dictionary from data file to the hash table. The file format of dictionary should be like this: "ITEM\tCONTENT\n"

Parameters:
dictionaryFileName - - the path for the pre-analyzed dictionary file
Throws:
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException