pylucene导包的时候发现SmartChineseAnalyzer居然没有,后面查找原因发现是pylucene安装时没默认安装SmartChineseAnalyzer,需要重新设置makefile
进入makefile
搜索到
#JARS+=$(SMARTCN_JAR)这一行
取消它的注释,去掉左边的#
接着找到
--exclude org.apache.lucene.sandbox.queries.regex.JakartaRegexpCapabilities \
在下方加入:
--exclude org.apache.lucene.analysis.cn.smart.AnalyzerProfile\
保存然后make
make install即可
PS:官方例子连泰文分词器都自带安装就是不默认安装中文分词器实在是太草了