Open cypreess opened 9 years ago
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.