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

如何把hanlp 与 solr的DataImportHandler对接? #13

Open tabascobath opened 8 years ago

tabascobath commented 8 years ago

你好: 本人solr新手,麻烦详细指教 我已经导入hanlp-sor-plugin并且在solr里面运行analysis正常了

之后我想从PDF, word,... 等档案格式中提取数据导入索引 请参考 http://iamyida.iteye.com/blog/2214600

请问hanlp是否也有同tika一样(TikaEntityProcessor)提供相应的processor? 或者有其他方法呢?

hankcs commented 8 years ago

你好,

各司其职,DataImportHandler由solr提供,Processor由tika提供,Analyzer由hanlp(或类似ik等分词器)提供。

tabascobath commented 8 years ago

谢谢你的说明, 我有成功作到data import了!

另外一个初学者的问题 我想要通过class path下的hanlp.properties进行配置 在tomcat环境下的sole应该要把hanlp.properties放在哪里呢? 如果辞典成功载入是否会在console里面显示呢?

已经尝试放再多个地方 可是切词看起来没有根据CustomDictionary.txt里面的关键字来切词 麻烦说明 谢谢!

hankcs commented 8 years ago

http://www.hankcs.com/program/java/placement-and-read-the-properties-file-jspservlet-in-web-application.html https://www.google.com/#newwindow=1&q=tomcat+properties%E6%96%87%E4%BB%B6

tabascobath commented 8 years ago

謝謝!