Currently, the package includes an abstract language model class, but the decoder class assumes that a kenlm model is being used (type hints use kenlm states). This should be changed to be more generic to better support extending with any alternative language models that can be wrapped in something using the abstract language model class.
A simple way to help do this is to also make an abstract LM state class that is paired with the language model class.
In order to support things like the multi-LM model, I think this should be done with abstract classes rather than generics. This would require runtime type checks that the states match the models, but that should be a very minor cost
Currently, the package includes an abstract language model class, but the decoder class assumes that a kenlm model is being used (type hints use kenlm states). This should be changed to be more generic to better support extending with any alternative language models that can be wrapped in something using the abstract language model class.
A simple way to help do this is to also make an abstract LM state class that is paired with the language model class.
In order to support things like the multi-LM model, I think this should be done with abstract classes rather than generics. This would require runtime type checks that the states match the models, but that should be a very minor cost