0
我們可以使用命令行工具在Apache OpenNLP的單行上輸出標記輸出嗎? http://nlp.stanford.edu/software/tokenizer.shtml https://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.tokenizer斯坦福大學自然語言處理:在單行上標記輸出?
我們可以使用命令行工具在Apache OpenNLP的單行上輸出標記輸出嗎? http://nlp.stanford.edu/software/tokenizer.shtml https://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.tokenizer斯坦福大學自然語言處理:在單行上標記輸出?
您可以使用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。
Thx Jon!我注意到輸出是標記化的,我想避免這種情況。用斯坦福大學NLP跳過標記的任何方法? – giorgio79 2015-02-12 18:48:59
是使用空格標記。有關詳細信息,請使用「-help」選項運行'DocumentPreprocessor'。 – 2015-02-12 19:24:03