0

i am reading and trying to understand HMM and the area i am looking it is for spell correction. One thing i dont get is how does it handle insertion or deletion. Lets say there is character level model in which expected states are 'c', 'a', 't'. Now say the observed state is 'c', 't'. Now when the model is built there will transitions from 'c' to 'a' but not from 'c' to 't'. Now during correction or prediction phrase how to handle the case of inserting the character 'a' as opposed?

hope i am clear on the question. thanks.

  • I do not think HMMs handle deletion/insertion straightforwardly, but you might want to look into (weighted) Finite State Transducers. It is a formalism related to HMM that is specifically designed for learning mapping between strings with edit operations (deletion, insertion, substitution). – mcoav May 12 '18 at 16:13

1 Answers1

0

a single HMM is a model for a single characters 'c' 'a' 't'. To handle insertion/deletion u need a decoder like HVite or HDecode from HTK. Decoder take decision from hmms and also from some grammar. For example when it found 'c' 't' it will lookup with some cost/probability against language/grammar. For example it will then conclude the word should be 'cat' because its in grammar while 'ct' is not.