How can i use kenlm to check word alignment in a sentence?

351 views Asked by At

I have seen many blogs saying language models can be used for numerous tasks but I cannot find any good implementations other than just the text generation.

My query is, How can i use a language model like kenlm to correct my sentences for alignments and spelling mistakes. I know kenlm already does this for deepspeech but i want to understand how it actually does and how can i implement the same.

1

There are 1 answers

0
Olaf On

Interesting use case for KenLM. It basically is a tree structure for what words are most likely to occur with others. DeepSpeech uses it to find the most probable word for the letters it found in the provided audio. If you want to do something similar, start by reading about CTC beam search and then study the code.