System of correcting misspelled words in input text detects a misspelled
word in the input text, determines a list of alternative words for the
misspelled word, and ranks the list of alternative words based on a
context of the input text. In certain embodiments, finite state machines
(FSMs) are utilized in the spelling and grammar correction process,
storing one or more lexicon FSMs, each of which represents a set of
correctly spelled reference words. Storing the lexicon as one or more
FSMs facilitates those embodiments of the invention employing a
clinet-server architecture. The input text to be corrected may also be
encoded as a FSM, which includes alternative word(s) for word(s) in need
of correction along with associated weights. The invention adjusts the
weights by taking into account the grammatical context in which the word
appears in the input text. In certain embodiments the modification is
performed by applying a second FSM to the FSM that was generated for the
input text, where the second FSM encodes a grammatically correct sequence
of words, thereby generating an additional FSM.