has not tried to read the file to join the user's dictionary, with the Nlpir_adduserword manually add a user dictionary, but this method is more appropriate to add individual words, a lot of words is not appropriate
Nlpir provides a nlpir_importuserdict (Byte[]spath) interface for importing user dictionaries. Try to use the next, found no import success.
The original version
The new edition (ICTCLAS2013) should read
1. The words and parts of speech are separated by Tab key;
2. Words and words, '; ' Seemingly not, I each line a word, success;
For example:
Chinese Academy of Sciences N
Word segmentation system N
Preceded by Nlpir initialization
String userdictpath= ".. /file/test.txt "//user dictionary URL
int dict=testnlpir.nlpir_importuserdict (userdictpath.getbytes ());//return result is the number of user words
nativebytes= testnlpir.nlpir_paragraphprocess (sinput.getbytes ("Utf-8"), 1);
Nativestr = new String (nativebytes, 0, Nativebytes.length, "Utf-8");
SYSTEM.OUT.PRINTLN (dict+ "Import Dictionary:" + nativestr);
Model.addattribute ("Fenci1", nativestr);
Testnlpir.nlpir_exit ();
Results
The first line does not use the user dictionary, and the second line uses the user dictionary
The user word I added: data structure and elements