HanLP
HanLP copied to clipboard
crf problem
当采用data-for1.2.2中的crf训练数据进行分词时,出现错误,具体是 代码为: CRFModel crfModel = CRFModel.loadTxt("E:\scalaworkspace\Eyas\data\model\segment\CRFSegmentModel.txt.bin"); System.out.println("locad finish"); 错误为 Exception in thread "main" java.lang.NumberFormatException: For input string: "U 0 0 : ( ??z?_K????]S?况??{???k??n??"
- loadTxt是加载文本txt格式的crf模型的,你拿去加载binary,当然会错
- 该模型是自动加载的,你不需要去调用
是我自己搞错了,我再研究下.非常感谢^_^