1, copy IKAnalyzer.cfg.xml to web-inf/classes under, IKAnalyzer.cfg.xml content as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE Properties SYSTEM "Http://java.sun.com/dtd/properties.dtd" >
<properties>
<comment>ik Analyzer Extended Configuration </comment>
<!--users can configure their own extension dictionary here--
<entry key= "Ext_dict" >myExt.dic;</entry>
<!--users can configure their own extension stop word dictionary here--
<entry key= "Ext_stopwords" >stopword.dic;</entry>
</properties>
2. Modify to add a custom thesaurus:
<entry key= "Ext_dict" >myExt.dic;myExt2.dic</entry>
3, Myext.dic format as follows, note myext.dic need to be UTF-8 no BOM format encoding
Deep South
Dong
Shennan
Ground King Building
Red Village Community
Gui Yuan Jie DAO
Guiyuan
4, set UTF-8 no BOM format encoding:
Download notepad++ Editor, open file, choose Format-in UTF-8 no BOM format encoding
IK word breakers use custom Thesaurus