Lucene.Net phrase count

这一生的挚爱 提交于 2019-12-14 03:16:15

问题


As with Lucene.net count how many times the phrase is met (not the word "something", namely the phrase "Hi how are you") in the text?

I sorry for my English.


回答1:


One way to do it is to use TermPositionVectors.

You basically get the positions for each of your query terms, and count the number of times they occur in the same order in your Document as they were in your Query.



来源:https://stackoverflow.com/questions/9211792/lucene-net-phrase-count

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!