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

v1.3.3升级指南 #523

Closed
hankcs opened this issue May 7, 2017 · 0 comments
Closed

v1.3.3升级指南 #523

hankcs opened this issue May 7, 2017 · 0 comments

Comments

@hankcs
Copy link
Owner

hankcs commented May 7, 2017

📢 v1.3.3依然保证了所有接口的兼容性。但做了如下两个微小改动:

com.hankcs.hanlp.algorithm 包名拼写错误改正

这个包下面实现了一些算法,并没有在文档中公开。如果你调用了该包下面的算法,可能需要手动修正一下包名。

portable版不再检查文件是否存在

未实现IOAdapter的用户可以忽略这条信息。

在v1.3.2之前,portable会检查配置项中指定的路径是否存在。如果不存在则该配置项不生效,形成一个“防错设计”。但自从引入了IOAdapter机制后,路径可以指向任何地方(远程)。所以不再可能为用户检查路径是否存在。

去掉该检查逻辑后,目前portable版的com.hankcs.hanlp.HanLP.Config#KeyPath与非portable版功能一致,都是KeyPath=root+KeyValue 。

所以如果你实现了自己的IOAdapter,open和create接收的path参数将会以root开头,敬请注意。此时可供参考的措施有:

  • 将配置文件的root设为""
  • 或稍微调整一下自己的IOAdapter

结语

这些改动的目的是为了使项目更加规范,造成不便还望海涵。有任何问题欢迎在此处留言,谢谢!

@hankcs hankcs changed the title 📢v1.3.3升级指南 v1.3.3升级指南 May 7, 2017
@hankcs hankcs changed the title v1.3.3升级指南 📢 v1.3.3升级指南 May 7, 2017
@hankcs hankcs changed the title 📢 v1.3.3升级指南 v1.3.3升级指南 May 7, 2017
@hankcs hankcs closed this as completed May 22, 2017
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

1 participant