The goal of a LM is to determine whether a sentence is correct or incorrect in terms of grammars and pragmatics.