A method and grammar checking system are provided that generate a stochastic
score,
or a statistical goodness measure, for each of an input string of text and one
or more alternative strings of text. An alternative generator generates the alternative
strings of text, and a ranking parser produces parse trees and corresponding statistical
goodness measures for each of the strings. The string of text having the highest
goodness measure is selected for recommendation to a user.