10. A system comprising: one or more computers configured to perform operations comprising: receiving a collection of documents; for each document of the collection of documents: breaking the document into pieces of text, and extracting n+k-grams from each piece of text separately such that each n+k-gram does not overlap; using the extracted n+k-grams for each document as a collection of candidate phrases for a given topic; assigning weights to the candidate phrases; and generating a linear classifier using the weighted candidate phrases, wherein the linear classifier varies the weights for each phrase candidate depending on the length of a document being classified.
17. The system of claim 10 , wherein the one or more computers are further configured to perform operations comprising: varying the weights for each phrase candidate depending on the length of the document being classified is based upon a learning process using a set of labeled example documents, each example document including a score assigned by the linear classifier, a number of words in the corresponding example document, and a label, wherein the learning process outputs a decision function that assigns a label to each pair of score and document length.