如果你用的是1.x版本需要下载tree_split.jar。
如果你用的是2.x版本需要下载nlp-lang.jar。
如果你用的是3.x以上版本只需要下载 ansj_seg-[version]-all-in-one.jar 一个jar包就行。
public List<String> wordDictionary() {
List<String> wordDic = new ArrayList<>();
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
//读取数据库信息
}
catch()
{
}
finally
{
}
}
List<String> wordDic = wordDictionary();
for (int i = 0; i < wordDic.size(); i++) {
UserDefineLibrary.insertWord(wordDic.get(i),"n",1000)
}
public String toStringWithOutNature() {
return this.toStringWithOutNature(",");
}