 Grammar rules are traditionally viewed in computational linguistics as defining the valid sentences in a language.Within this mindset, the idea of associating each rule with a probability then provides the relative frequency of any given grammar rule and, by deduction, the probability of a complete parse for a sentence.