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

python 默认加载的是lite模型么? #107

Open
joyeJ opened this issue Jan 13, 2021 · 2 comments
Open

python 默认加载的是lite模型么? #107

joyeJ opened this issue Jan 13, 2021 · 2 comments

Comments

@joyeJ
Copy link

joyeJ commented Jan 13, 2021

如题。python 默认加载的是lite模型么?

@joyeJ
Copy link
Author

joyeJ commented Jan 13, 2021

是不是Model1呀?

@secsilm
Copy link

secsilm commented Mar 13, 2021

看了看源码,加载的哪个模型要看 seg_only 的值了(默认 False):

  • True -> cws_model.bin
  • False -> model_c_model.bin

if(self.__seg_only):
self.__cws_tagging_decoder = CBTaggingDecoder()
self.__cws_tagging_decoder.init((self.__prefix+"cws_model.bin"), (self.__prefix+"cws_dat.bin"),(self.__prefix+"cws_label.txt"))
self.__cws_tagging_decoder.threshold = 0
self.__cws_tagging_decoder.separator = self.__separator
self.__cws_tagging_decoder.setLabelTrans()
else:
self.__tagging_decoder = CBTaggingDecoder()
self.__tagging_decoder.init((self.__prefix+"model_c_model.bin"),(self.__prefix+"model_c_dat.bin"),(self.__prefix+"model_c_label.txt"))
self.__tagging_decoder.threshold = 10000
self.__tagging_decoder.separator = self.__separator
self.__tagging_decoder.setLabelTrans()

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

2 participants