我们可以使用命令行工具在Apache OpenNLP的单行上输出tokenizer吗?http://nlp.stanford.edu/software/tokenizer.shtmlhttps://opennlp.apache.org/documentation/1.5.3/锟拷
您可以使用 DocumentPreprocessor ,以编程方式或从命令行。
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 .
你可以通过编程方式做同样的事情;看到 这个答案 。