public class ChineseMarkovWordSegmenter extends java.lang.Object implements WordSegmenter
Constructor and Description |
---|
ChineseMarkovWordSegmenter(ChineseCharacterBasedLexicon lex,
Index<java.lang.String> wordIndex,
Index<java.lang.String> tagIndex) |
ChineseMarkovWordSegmenter(ChineseTreebankParserParams params,
Index<java.lang.String> wordIndex,
Index<java.lang.String> tagIndex) |
Modifier and Type | Method and Description |
---|---|
void |
finishTraining() |
void |
initializeTraining(double numTrees) |
void |
loadSegmenter(java.lang.String filename) |
java.util.List<HasWord> |
segment(java.lang.String s) |
void |
train(java.util.Collection<Tree> trees) |
void |
train(java.util.List<TaggedWord> sentence) |
void |
train(Tree tree) |
public ChineseMarkovWordSegmenter(ChineseCharacterBasedLexicon lex, Index<java.lang.String> wordIndex, Index<java.lang.String> tagIndex)
public ChineseMarkovWordSegmenter(ChineseTreebankParserParams params, Index<java.lang.String> wordIndex, Index<java.lang.String> tagIndex)
public void initializeTraining(double numTrees)
initializeTraining
in interface WordSegmenter
public void train(java.util.Collection<Tree> trees)
train
in interface WordSegmenter
public void train(Tree tree)
train
in interface WordSegmenter
public void train(java.util.List<TaggedWord> sentence)
train
in interface WordSegmenter
public void finishTraining()
finishTraining
in interface WordSegmenter
public java.util.List<HasWord> segment(java.lang.String s)
segment
in interface WordSegmenter
public void loadSegmenter(java.lang.String filename)
loadSegmenter
in interface WordSegmenter