2015-02-12 51 views

回答

1

您可以使用DocumentPreprocessor編程方式或通過命令行。

從CLI:

$ echo "This is a test. And some more." | java edu.stanford.nlp.process.DocumentPreprocessor 2>/dev/null 
This is a test . 
And some more . 

你可以做同樣的事情編程;見this SO answer

+0

Thx Jon!我注意到輸出是標記化的,我想避免這種情況。用斯坦福大學NLP跳過標記的任何方法? – giorgio79 2015-02-12 18:48:59

+0

是使用空格標記。有關詳細信息,請使用「-help」選項運行'DocumentPreprocessor'。 – 2015-02-12 19:24:03