We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请确认下列注意事项:
当前最新版本号是:1.7.2 我使用的版本是:1.7.2
需要实现载入内存后字典的更新 想达到效果如修改txt词典增加词语后,jar能重新载入 发现提供了CustomDictionary.reload,故使用此api过程中产生了与预期不一致的分词情况
public void testIssue1234() throws Exception { String text = "盒饭日料真好吃"; System.out.println(StandardTokenizer.segment(text )); Thread.sleep(60000); //此时在新增的词典menu.txt中加入 <真好吃> CustomDictionary.reload(); System.out.println(StandardTokenizer.segment(text)); }
期望第一次输出:<盒饭> <日料> <真> <好吃> 期望第二次输出:<盒饭> <日料> <真好吃> 期望输出
### 实际输出 第一次输出:<盒饭> <日料> <真> <好吃> 第二次输出:<盒饭> <日料> <真> <好吃> reload并没有更新各个分词器中dat原有数据内容 ,仅更新了 CustomDictionary中自有的dat
实际输出
## 其他信息 <!-- 任何可能有用的信息,包括截图、日志、配置文件、相关issue等等。-->
The text was updated successfully, but these errors were encountered:
478f895
感谢反馈,已经修复,请参考上面的commit。 如果还有问题,欢迎重开issue。
Sorry, something went wrong.
@hankcs 感谢 请问什么时候合到1.7.2 或者1.7.3
没有固定的计划,建议自行编译。
优化DoubleArrayTrie fix hankcs#1136
42d4f4d
优化DoubleArrayTrie fix #1136
7c057d1
No branches or pull requests
注意事项
请确认下列注意事项:
版本号
当前最新版本号是:1.7.2
我使用的版本是:1.7.2
我的问题
需要实现载入内存后字典的更新
想达到效果如修改txt词典增加词语后,jar能重新载入
发现提供了CustomDictionary.reload,故使用此api过程中产生了与预期不一致的分词情况
复现问题
步骤
触发代码
期望输出
期望第一次输出:<盒饭> <日料> <真> <好吃>
期望第二次输出:<盒饭> <日料> <真好吃>
期望输出
实际输出
The text was updated successfully, but these errors were encountered: