首页 > 其他 > 详细

利用IK分词器,自定义分词规则

时间:2015-08-31 16:35:41      阅读:444      评论:0      收藏:0      [点我收藏+]

IK分词源码下载地址:https://code.google.com/p/ik-analyzer/downloads/list

lucene源码下载地址:http://www.eu.apache.org/dist/lucene/java/

 

下载IK分词源码后,运行出现错误提示:

Analyzer cannot be resolved to a type
	TokenStream cannot be resolved to a type
	OffsetAttribute cannot be resolved to a type
	OffsetAttribute cannot be resolved to a type
	CharTermAttribute cannot be resolved to a type
	CharTermAttribute cannot be resolved to a type
	TypeAttribute cannot be resolved to a type
	TypeAttribute cannot be resolved to a type

 解决办法:

在项目project -->clean 下即可

自定义分词规则步骤:

 

利用IK分词器,自定义分词规则

原文:http://www.cnblogs.com/zhanggl/p/4773036.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!