[英]Detokenization for Stanford CoreNLP
我使用了 stanford coreNLP 的分词器将句子分词为分词。 现在我需要对已经分词的单词进行去分词(即我需要为标准 coreNLP 进行反向分词。)我们可以使用标准核心 NLP 或 java/python API 中的任何 JAVA 类吗?
I/P:
I ca n't use this pen .
I have ( 5 ) points to explain .
I have discuss the 1,2,3 etc. ..
O/P:
I can't use this pen.
I have (5) points to explain.
I have discuss the 1,2,3 etc...
Simple API 中的Sentence
类有多个构造函数, 其中一个带有List<String>
参数。
因此,您可以执行以下操作:
List<String> words = new Sentence("I can't use this pen.").words();
Sentence output = new Sentence(words);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.