-
Notifications
You must be signed in to change notification settings - Fork 510
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
Add access to vocabulary in python bindings #30
Comments
Would a callback from LoadVirtual be sufficient? |
The C++ side doesn't even remember the vocabulary strings by default because users either don't need it or have their own data structure populated by the EnumerateVocab callback API. |
I must say I did not read very deeply into the implementation. Just wondering if it's easy to implement access vocabulary somehow. |
@kpu Is there any way we can access LanguageModel vocab from python wrapper. I am loading model as kenlm.Model(model.klm) in python. "model.klm" is built from command line. |
It would be nice to have access to kenlm.LanguageModel.vocab or even (maybe more pytonic way) to support iterable protocol on kenlm.LanguageModel.
The text was updated successfully, but these errors were encountered: