kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.5k stars 513 forks source link

Can stateful query use more than two state instances? #111

Closed ksellesk closed 6 years ago

ksellesk commented 6 years ago

Thx for this awesome project. kenlm is efficient and easy to use.

I want to use it in a beam search decoder for Automatic Speech Recognition. In this situation, much states should be retained during the decode steps. But I found only two state instance can be constructed.

Do kenlm have ways to use more state instances?

ksellesk commented 6 years ago

eg: in python wrapper.

for _ in range(10): ... s = kenlm.State() ... print s ... <kenlm.State object at 0x7fc103f13570> <kenlm.State object at 0x7fc103f135f0> <kenlm.State object at 0x7fc103f13570> <kenlm.State object at 0x7fc103f135f0> <kenlm.State object at 0x7fc103f13570> <kenlm.State object at 0x7fc103f135f0> <kenlm.State object at 0x7fc103f13570> <kenlm.State object at 0x7fc103f135f0> <kenlm.State object at 0x7fc103f13570> <kenlm.State object at 0x7fc103f135f0>

ksellesk commented 6 years ago

Sorry, I use it in a wrong way.