edu.stanford.nlp.wordseg
Class ChineseDictionary

java.lang.Object
  extended by edu.stanford.nlp.wordseg.ChineseDictionary

public class ChineseDictionary
extends java.lang.Object

This class provides a main method that loads various dictionaries, and saves them in a serialized version, and runtime compiles them into a word list used as a feature in the segmenter, and

Author:
Pi-Chuan Chang

Field Summary
static int MAX_LEXICON_LENGTH
           
 
Constructor Summary
ChineseDictionary(java.lang.String dict)
           
ChineseDictionary(java.lang.String[] dicts)
           
ChineseDictionary(java.lang.String[] dicts, ChineseDocumentToSentenceProcessor cdtos)
           
ChineseDictionary(java.lang.String[] dicts, ChineseDocumentToSentenceProcessor cdtos, boolean expandMidDot)
           
ChineseDictionary(java.lang.String serDicts, ChineseDocumentToSentenceProcessor cdtos, boolean expandMidDot)
          The first argument can be one file path, or multiple files separated by commas
 
Method Summary
 boolean contains(java.lang.String word)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_LEXICON_LENGTH

public static final int MAX_LEXICON_LENGTH
See Also:
Constant Field Values
Constructor Detail

ChineseDictionary

public ChineseDictionary(java.lang.String dict)

ChineseDictionary

public ChineseDictionary(java.lang.String[] dicts)

ChineseDictionary

public ChineseDictionary(java.lang.String[] dicts,
                         ChineseDocumentToSentenceProcessor cdtos)

ChineseDictionary

public ChineseDictionary(java.lang.String serDicts,
                         ChineseDocumentToSentenceProcessor cdtos,
                         boolean expandMidDot)
The first argument can be one file path, or multiple files separated by commas


ChineseDictionary

public ChineseDictionary(java.lang.String[] dicts,
                         ChineseDocumentToSentenceProcessor cdtos,
                         boolean expandMidDot)
Method Detail

contains

public boolean contains(java.lang.String word)

main

public static void main(java.lang.String[] args)


Stanford NLP Group