42. A non-transitory computer-readable storage medium storing program instructions, wherein the program instructions are computer-executable to implement a language input mechanism for converting a phonetic language text to a written language text, wherein the language input mechanism is configured to: generate a plurality of possible phonetic language syllable segmentations for a phonetic language input text string; generate a plurality of possible written language sentences each including one or more written language words, wherein each sentence corresponds to one of the syllable segmentations, and wherein each word in each sentence corresponds to one or more of the syllables in the corresponding syllable segmentation; determine probability scores for the words and for sequences of two or more words in the sentences according to a language model comprising written language words and a history cache of previously selected written language words; generate a list of candidate output words for a current selection position in the phonetic language input text string from the sentences, wherein the list of candidate output words is sorted according to the probability scores; determine one of the possible written language sentences as a most probable candidate output sentence for the phonetic language input text string according to the probability scores; and output at least a portion of the list of sorted candidate output words and the candidate output sentence.
42. A non-transitory computer-readable storage medium storing program instructions, wherein the program instructions are computer-executable to implement a language input mechanism for converting a phonetic language text to a written language text, wherein the language input mechanism is configured to: generate a plurality of possible phonetic language syllable segmentations for a phonetic language input text string; generate a plurality of possible written language sentences each including one or more written language words, wherein each sentence corresponds to one of the syllable segmentations, and wherein each word in each sentence corresponds to one or more of the syllables in the corresponding syllable segmentation; determine probability scores for the words and for sequences of two or more words in the sentences according to a language model comprising written language words and a history cache of previously selected written language words; generate a list of candidate output words for a current selection position in the phonetic language input text string from the sentences, wherein the list of candidate output words is sorted according to the probability scores; determine one of the possible written language sentences as a most probable candidate output sentence for the phonetic language input text string according to the probability scores; and output at least a portion of the list of sorted candidate output words and the candidate output sentence. 43. The non-transitory computer-readable storage medium as recited in claim 42 , wherein the language input mechanism is further configured to write the candidate output written language sentence and the list of sorted candidate output written language words to a user interface of the language input mechanism on a display device.