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

在线演示和本地运行分词词性不一致 #1336

Closed
1 task done
wangtao208208 opened this issue Dec 3, 2019 · 4 comments
Closed
1 task done

在线演示和本地运行分词词性不一致 #1336

wangtao208208 opened this issue Dec 3, 2019 · 4 comments

Comments

@wangtao208208
Copy link

wangtao208208 commented Dec 3, 2019

注意事项

请确认下列注意事项:

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

版本号

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

我的问题

本地分词的词性("需要"这个词)和在线演示结果不一样:
本地分成了n,线上分成了vn(第一个"需要"),v(第二个"需要")

复现问题

步骤

触发代码

    String words = "当前阶段的配置需要立足防御,同时需要谨防今年强势板块在补跌风险";
    System.out.println(NLPTokenizer.segment(words));

期望输出

[当前/n, 阶段/n, 的/u, 配置/n, 需要/v, 立足/n, 防御/n, ,/w, 同时/n, 需要/v, 谨防/v, 今年/t, 强势/n, 板块/n, 在/p, 补/v, 跌/v, 风险/n]

实际输出

[当前/n, 阶段/n, 的/u, 配置/n, 需要/n, 立足/n, 防御/n, ,/w, 同时/n, 需要/n, 谨防/v, 今年/t, 强势/n, 板块/n, 在/p, 补/v, 跌/v, 风险/n]

线上演示输出:

深度截图_选择区域_20191203095146

@wangtao208208
Copy link
Author

标注模型也换成了 <演示用的是98年6个月的大模型>,问题依然存在

@hankcs
Copy link
Owner

hankcs commented Dec 3, 2019

为什么一定要相同呢?#1205

@wangtao208208
Copy link
Author

是自定义词典的问题.
感谢 @hankcs

@hanlpbot
Copy link
Collaborator

This issue has been mentioned on 蝴蝶效应. There might be relevant details there:

https://bbs.hankcs.com/t/topic/2741/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants