mayabot / mynlp

一个生产级、高性能、模块化、可扩展的中文NLP工具包。(中文分词、平均感知机、fastText、拼音、新词发现、分词纠错、BM25、人名识别、命名实体、自定义词典)
https://mynlp.mayabot.com/
Apache License 2.0
675 stars 90 forks source link

java预测结果与python预测结果不一致 #32

Open saberwangcn opened 3 years ago

saberwangcn commented 3 years ago

使用python训练模型,然后功过mynlp库加载模型文件xx.bin。 对同一份数据进行预测, 有7%的数据与python预测结果不一致。人工检查,发现python的分类更准确。请问是什么原因? mynlp版本使用 3.2.2

saberwangcn commented 3 years ago

把Dictionary.kt 的99行更改为val word_hashes = IntArrayList(), 预测结果就一致了。比对了c版0.9.2的代码和kotlin实现的代码,发现了此问题

Jingjing-Primer commented 3 years ago

Where do you get the python version of mynlp? I am trying to use mynlp and test the performance but I am not familiar with java and I kind of want to use the python version of mynlp.

jimichan commented 3 years ago

mynlp only has java version

jimichan commented 3 years ago

@saberwangcn 感谢这几个bug的fix。已经发布3.3.0-BETA1,已经对代码进行合并。

yifanhunter commented 3 years ago

@saberwangcn 感谢这几个bug的fix。已经发布3.3.0-BETA1,已经对代码进行合并。

测试还是有不一致的情况,不知道是不是jieba分词产生影响的~ 你们4.0.0是最新稳定版本了吗,可有写版本更新的内容啊?