32. A computer program embodied on a non-transitory computer readable medium for automatically generating one or more keywords from an electronic document comprising: a code segment for 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; a code segment for 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; a code segment for assigning a numeric score to each candidate entry based on the feature vector for that candidate entry; and a code segment for selecting a specified number of entries to be retained as the keywords.
38. The computer program as recited in claim 32 , wherein the code segment for assigning a numeric score further comprises a code segment for running an unsupervised machine learning algorithm to calculate each score.