most-words:最大词量分词方式,此模式对应的词典编译类为MostWordsModeDictionariesCompiler
max-word-length:按词在词典中的原序来进行编译,基本不再做其他处理,此模式对应的词典编译类为SortingDictionariesCompiler
most-words是默认的分词模式。
classpath下添加的paoding-dic-home.properties文件
paoding.dic.home.config-fisrt=this
paoding.dic.home=classpath:dic
classpath下配置添加paoding-analyzer.properties,内容如下(需要根据分词模式来选择哪种compiler):
#PaodingAnlyzer Mode, "most-words", "max-word-length", "class:com.xxx.MyTokenCollectorImpl"...
#paoding.analyzer.mode=most-words
#paoding.analyzer.dictionaries.compiler=net.paoding.analysis.analyzer.impl.MostWordsModeDictionariesCompiler
#paoding.analyzer.mode=max-word-length
paoding.analyzer.dictionaries.compiler=net.paoding.analysis.analyzer.impl.SortingDictionariesCompiler
最后 删掉.compile文件