1. A method comprising: receiving a collection of candidate phrases for a given topic; filtering the received candidate phrases to remove erroneously included candidate phrases; assigning weights to the candidate phrases, wherein assigning weights includes: scoring each candidate phrase using an initial classifier, and assigning a weight to each of the candidate phrases based on the respective scores from the initial classifier; generating a linear classifier using the filtered and weighted candidate phrases; and adjusting the linear classifier depending on a length of a document being classified, wherein adjusting the linear classifier includes determining whether and to what degree the given topic is affected by document length based on a learning process using a set of labeled example documents, each example document including a score assigned by the linear classifier, the length of the example document, and a label assigned to the example document, wherein the learning process outputs a decision function that assigns a particular label to each pair of score and document length such that a probability that a particular document having a given score from the linear classifier belongs to the topic depends on the length of the document.