public class SegDemo
extends java.lang.Object
This is a very simple demo of calling the Chinese Word Segmenter
programmatically. It assumes an input file in UTF8.
Usage: java -mx1g -cp seg.jar SegDemo fileName
To run with the segmenter models jar file in the classpath:
java -Dbasedir=edu/stanford/nlp/models/segmenter/chinese edu.stanford.nlp.wordseg.demo.SegDemo
This will run correctly in the distribution home directory. To
run in general, the properties for where to find dictionaries or
normalizations have to be set.
- Author:
- Christopher Manning