1. A method, performed by one or more server or client devices, for completing fragments of text, the method comprising: obtaining, using one or more processors associated with the one or more server or client devices, a text fragment; identifying, using one or more processors associated with the one or more server or client devices, one or more documents based, at least in part on the text fragment; identifying, using one or more processors associated with the one or more server or client devices, sentences within the one or more documents that include the text fragment; determining, using one or more processors associated with the one or more server or client devices, sentence endings associated with the identified sentences; determining a measure of popularity for each of the sentence endings, where the measure of popularity for one of the sentence endings is based, at least in part, on a quantity of documents within a document corpus that includes the one of the sentence endings; ordering the sentence endings based, at least in part, on the determined measure of popularity for each of the sentence endings; and presenting, using one or more processors associated with the one or more server or client devices, the ordered sentence endings as potential completions for the text fragment.
5. The method of claim 1 , further comprising: identifying two or more of the sentence endings that have text in common; and merging the identified two or more sentence endings into a merged sentence ending, and where presenting includes: presenting the merged sentence ending as a potential completion for the text fragment.