-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
怎么打包能让词典放在外面方便修改? #72
Comments
你把 word.conf 配置中的词典路径改成你外部词典的路径就可以了 |
似乎不支持相对路径. dic.txt 和 jar 放在同目录, |
你都放到 jar 外面了,当然要使用绝对路径 |
因为 HanLP 是用相对地址配置的, 然后觉得这应该是差不多的. 然后发现设计思路还是差很多的...
Files.lines(Paths.get("dic.txt")); 改成 (Stream<String>) new FileInputStream(new File("dic.txt")); 首次读取成功, 但是还是会有别的问题... 改用网络地址了, 要改的地方太多了, 不折腾了... 而且网络比本地灵活多了... |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
打包为 jar, 如何修改才能读取外面的词典.
我打包直接去掉资源文件就找不到词典了.
The text was updated successfully, but these errors were encountered: