Modern language models are neural networks which are trained to predict a word by the context in which it appears. In this way, they learn an accurate representation for all words in the text and is capable of semantically comparing and classifying text passages.