Home » lucene-3.0.1-src » org.apache.lucene.analysis.cn.smart.hhmm » [javadoc | source]
org.apache.lucene.analysis.cn.smart.hhmm
class: WordDictionary [javadoc | source]
java.lang.Object
   org.apache.lucene.analysis.cn.smart.hhmm.AbstractDictionary
      org.apache.lucene.analysis.cn.smart.hhmm.WordDictionary
SmartChineseAnalyzer Word Dictionary

WARNING: The status of the analyzers/smartcn analysis.cn.smart package is experimental. The APIs and file formats introduced here might change in the future and will not be supported anymore in such a case.

Field Summary
public static final  int PRIME_INDEX_LENGTH    Large prime number for hash function 
Fields inherited from org.apache.lucene.analysis.cn.smart.hhmm.AbstractDictionary:
GB2312_FIRST_CHAR,  GB2312_CHAR_NUM,  CHAR_NUM_IN_FILE
Method from org.apache.lucene.analysis.cn.smart.hhmm.WordDictionary Summary:
getFrequency,   getInstance,   getPrefixMatch,   getPrefixMatch,   isEqual,   load,   load
Methods from org.apache.lucene.analysis.cn.smart.hhmm.AbstractDictionary:
getCCByGB2312Id,   getGB2312Id,   hash1,   hash1,   hash2,   hash2
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.analysis.cn.smart.hhmm.WordDictionary Detail:
 public int getFrequency(char[] charArray) 
    Get the frequency of a word from the dictionary
 public static synchronized WordDictionary getInstance() 
    Get the singleton dictionary instance.
 public int getPrefixMatch(char[] charArray) 
    Find the first word in the dictionary that starts with the supplied prefix
 public int getPrefixMatch(char[] charArray,
    int knownStart) 
    Find the nth word in the dictionary that starts with the supplied prefix
 public boolean isEqual(char[] charArray,
    int itemIndex) 
    Return true if the dictionary entry at itemIndex for table charArray[0] is charArray
 public  void load() throws IOException, ClassNotFoundException 
    Load coredict.mem internally from the jar file.
 public  void load(String dctFileRoot) 
    Attempt to load dictionary from provided directory, first trying coredict.mem, failing back on coredict.dct