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

請問可以動態載入詞庫嗎? #28

Open
syhlion opened this issue Apr 27, 2017 · 4 comments
Open

請問可以動態載入詞庫嗎? #28

syhlion opened this issue Apr 27, 2017 · 4 comments

Comments

@syhlion
Copy link

syhlion commented Apr 27, 2017

目前看到的方法只有LoadDictionary 這個方法動態調用好像會蓋掉前面的,
有建議可以動態新增詞庫嗎?

@jianzhiyao
Copy link

協程檢測文件是否修改,再重載一次就可以了

@noobJiang
Copy link

協程檢測文件是否修改,再重載一次就可以了

看了结巴分词的代码,有free的方法去释放内存貌似,这里需要释放内存嘛.

@jianzhiyao
Copy link

協程檢測文件是否修改,再重載一次就可以了

看了结巴分词的代码,有free的方法去释放内存貌似,这里需要释放内存嘛.

https://github.com/jianzhiyao/go-segment
此处我用作http分词服务,重载后,无需释放内存

@noobJiang
Copy link

協程檢測文件是否修改,再重載一次就可以了

看了结巴分词的代码,有free的方法去释放内存貌似,这里需要释放内存嘛.

https://github.com/jianzhiyao/go-segment
此处我用作http分词服务,重载后,无需释放内存

你只是启动http服务的时候加载了一次,如果要更新词库的话,肯定要先实例话一个segment再引用赋值,直接load的话dictionary会重新加载,有一段时间切词不可用。

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

No branches or pull requests

3 participants