public class SimpleTextSummarizer extends AbstractTextSummarizer implements TextSummarizer
This summarizer produces a summary by finding the (up to) 100 most commonly used words in a text (not including stop words) and outputting the first sentence containing each common word. This works adequately for news articles or blog posting, but rather badly for literature.
logger
Constructor and Description |
---|
SimpleTextSummarizer()
Create the default summarizer.
|
Modifier and Type | Method and Description |
---|---|
<T extends java.lang.Comparable> |
summarize(java.util.List<java.util.List<T>> sentences,
int summarySentences)
Summarize text.
|
getLogger, setLogger, summarize
close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
summarize
close
public SimpleTextSummarizer()
public <T extends java.lang.Comparable> java.util.List<java.lang.Integer> summarize(java.util.List<java.util.List<T>> sentences, int summarySentences)
summarize
in interface TextSummarizer
summarize
in class AbstractTextSummarizer
sentences
- Tokenized sentences to summarize.summarySentences
- Maximum number of sentences to return
in the summary.