码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-08-31 16:38:31      阅读:554      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!