【发布时间】:2015-08-05 04:16:33
【问题描述】:
CoreNLP 是否有用于获取具有位置等的 ngram 的 API?
例如,我有一个字符串“我有最好的车”。 如果我使用 mingrams=1 和 maxgrams=2。 我应该得到如下所示的内容。我知道带有 ngram 函数的 stringutil 但如何获得位置。
(I,0)
(I have,0)
(have,1)
(have the,1)
(the,2)
(the best,2) etc etc
基于我传递的字符串。
非常感谢任何帮助。
谢谢
【问题讨论】:
标签: nlp stanford-nlp n-gram pos-tagger