Part-of-Speech Tagging
N-gram statistics can be used to guess the part-of-speech of words in text. If the part-of-speech of each word can be tagged correctly, parsing ambiguity is greatly reduced.
'Twas brillig, and the slithy toves
did gyre and gimble in the wabe.[from Jabberwocky, by Lewis Carroll.]
A Hidden Markov Model (HMM) tagger chooses the tag for each word that maximizes: [Jurafsky, op. cit.] P(word | tag) * P(tag | previous n tags)
For a bigram tagger, this is approximated as:
ti = argmaxj P( wi | tj ) P( tj | ti - 1 )
In practice, trigram taggers are most often used, and a search is made for the best set of tags for the whole sentence; accuracy is about 96%.