1. A method for automatically generating one or more keywords from an electronic document, the method comprising the steps of: identifying candidate entries for the keywords by extracting all n-grams up to a specified length that do not cross sentence boundaries, reducing a size of a data set consisting of the extracted n-grams by applying one or more filters and balancing a distribution of positive and negative examples whenever the data set is derived from a training data set; constructing a feature vector for each candidate entry, wherein the feature vector comprises at least one feature selected from the group consisting of one or more discourse comprehension features, one or more part-of-speech pattern features, and one or more encyclopedic annotation features using a computer; assigning a numeric score to each candidate entry based on the feature vector for that candidate entry using a computer; and selecting a specified number of candidate entries to be retained as the keywords.