Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练最新中文wiki问题 #718

Closed
1 task done
zhengzhuangjie opened this issue Dec 18, 2017 · 1 comment
Closed
1 task done

训练最新中文wiki问题 #718

zhengzhuangjie opened this issue Dec 18, 2017 · 1 comment
Labels

Comments

@zhengzhuangjie
Copy link

注意事项

请确认下列注意事项:

  • 我已仔细阅读下列文档,都没有找到答案:
  • 我已经通过Googleissue区检索功能搜索了我的问题,也没有找到答案。
  • 我明白开源社区是出于兴趣爱好聚集起来的自由社区,不承担任何责任或义务。我会礼貌发言,向每一个帮助我的人表示感谢。
  • 我在此括号内输入x打钩,代表上述事项确认完毕。

版本号

当前最新版本号是:1.5.2
我使用的版本是:1.5.2

我的问题

训练最新的zh wiki抛出数组越界异常

复现问题

[hadoop@LOCAL-202-89 new]$ java -cp hanlp-portable-1.5.2.jar com.hankcs.hanlp.mining.word2vec.Train -input zhwiki-latest-pages-articles.xml.simplified -output zhwiki.txt

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -3
at com.hankcs.hanlp.mining.word2vec.TextFileCorpus.reduceVocab(TextFileCorpus.java:69)
at com.hankcs.hanlp.mining.word2vec.TextFileCorpus.learnVocab(TextFileCorpus.java:142)
at com.hankcs.hanlp.mining.word2vec.Word2VecTraining.trainModel(Word2VecTraining.java:326)
at com.hankcs.hanlp.mining.word2vec.Train.execute(Train.java:33)
at com.hankcs.hanlp.mining.word2vec.Train.main(Train.java:38)

hankcs added a commit that referenced this issue Dec 19, 2017
@hankcs
Copy link
Owner

hankcs commented Dec 19, 2017

感谢反馈,已经修复,请参考上面的commit。
如果还有问题,欢迎重开issue。

@hankcs hankcs closed this as completed Dec 19, 2017
@hankcs hankcs added the bug label Dec 19, 2017
TylunasLi pushed a commit to TylunasLi/HanLP that referenced this issue Dec 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants