【发布时间】:2015-02-12 03:13:35
【问题描述】:
我们可以像 Apache OpenNLP 那样使用命令行工具在单行上输出分词器吗? http://nlp.stanford.edu/software/tokenizer.shtml https://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.tokenizer
【问题讨论】:
标签: stanford-nlp
我们可以像 Apache OpenNLP 那样使用命令行工具在单行上输出分词器吗? http://nlp.stanford.edu/software/tokenizer.shtml https://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#tools.tokenizer
【问题讨论】:
标签: stanford-nlp
您可以通过编程方式或从命令行使用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。
【讨论】:
-help 选项运行DocumentPreprocessor 以了解详细信息。