hankcs / hanlp-lucene-plugin

HanLP中文分词Lucene插件,支持包括Solr在内的基于Lucene的系统
http://www.hankcs.com/nlp/segment/full-text-retrieval-solr-integrated-hanlp-chinese-word-segmentation.html
Apache License 2.0
296 stars 99 forks source link

继续请教 #15

Open barrycheng opened 8 years ago

barrycheng commented 8 years ago

上一个老人头的问题,因为我的Solr设置是AND, 老 AND 人头是无法匹配 老人头 | 老人 | 人头的。。。

我想通过stopword来配置,但是发现solr 6.2.1 + hanlp-1.3.1没有加载stopwords.txt!

qq 20161013115651

hankcs commented 8 years ago

lucene有自己的停用词过滤器,hanlp-solr也有xml配置项,实在不知道怎么配置就去看源码吧。

barrycheng commented 8 years ago

老人头 后面是否还有字好像对分词有影响!

如图

1

2

3

barrycheng commented 8 years ago

老人头 这是一个品牌,其实是不需要分词的,我要怎么实现这样的需求?求指导。。。

hankcs commented 8 years ago

用自定义词典

vincentchien commented 7 years ago

建议将自行定义的词典与作者的初始词典分开,如此一来,分词结果才会正确!