concept language model in category nlp
appears as: lguage models, language model, lguage model, lguage model, lguage models

This is an excerpt from Manning's book Real-World Natural Language Processing.
Formerly, a language model is a statistical model that gives a probability to a piece of text. An English language model would assign higher probabilities to sentences that look like English. For example, an English language model would give a higher probability to “My trip to the beach was ruined by bad weather” than it does to “My trip to the beach was ruined by bad dogs” or even “by weather was trip my bad beach the ruined to.” The more grammatical and the more “sense” the sentence makes, the higher the probability is.
Figure 5.13: Instance for training a language model
![]()