1,把paoding-analysis-2.0.4-beta解壓縮,給項目中加入paoding-analysis.jar。this
2,把dic文件夾放到項目的根目錄中。dic文件夾裏是paoding的詞庫。google
3,配置paoding的詞庫:把paoding-analysis-2.0.4-beta\src裏面的paoding-dic-home.properties拷貝到項目的根目錄下。編輯以下:spa
#values are "system-env" or "this"; code
#if value is "this" , using the paoding.dic.home as dicHome if configed! orm
#paoding.dic.home.config-fisrt=system-env it
paoding.dic.home.config-fisrt=this io
#dictionary home (directory) class
#"classpath:xxx" means dictionary home is in classpath. 配置
#e.g "classpath:dic" means dictionaries are in "classes/dic" directory or any other classpath directory 程序
#paoding.dic.home=dic
paoding.dic.home=classpath:dic
#seconds for dic modification detection
#paoding.dic.detector.interval=60
修改paoding .dic .home .config-fisrt=this ,使得程序知道該配置文件
修改paoding .dic .home =classpath:dic ,指定字典的所在路徑。絕對路徑也能夠,可是很差。
http://code.google.com/p/paoding/downloads/list