edu.northwestern.at.utils.corpuslinguistics.textsummarizer
Class SimpleTextSummarizer

java.lang.Object
  extended by edu.northwestern.at.utils.IsCloseableObject
      extended by edu.northwestern.at.utils.corpuslinguistics.textsummarizer.AbstractTextSummarizer
          extended by edu.northwestern.at.utils.corpuslinguistics.textsummarizer.SimpleTextSummarizer
All Implemented Interfaces:
TextSummarizer, IsCloseable, UsesLogger
Direct Known Subclasses:
DefaultTextSummarizer

public class SimpleTextSummarizer
extends AbstractTextSummarizer
implements TextSummarizer

SimpleTextSummarizer: Simple text summarizer.

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.


Field Summary
 
Fields inherited from class edu.northwestern.at.utils.corpuslinguistics.textsummarizer.AbstractTextSummarizer
logger
 
Constructor Summary
SimpleTextSummarizer()
          Create the default summarizer.
 
Method Summary
<T extends java.lang.Comparable>
java.util.List<java.lang.Integer>
summarize(java.util.List<java.util.List<T>> sentences, int summarySentences)
          Summarize text.
 
Methods inherited from class edu.northwestern.at.utils.corpuslinguistics.textsummarizer.AbstractTextSummarizer
getLogger, setLogger, summarize
 
Methods inherited from class edu.northwestern.at.utils.IsCloseableObject
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.northwestern.at.utils.corpuslinguistics.textsummarizer.TextSummarizer
summarize
 
Methods inherited from interface edu.northwestern.at.utils.IsCloseable
close
 

Constructor Detail

SimpleTextSummarizer

public SimpleTextSummarizer()
Create the default summarizer.

Method Detail

summarize

public <T extends java.lang.Comparable> java.util.List<java.lang.Integer> summarize(java.util.List<java.util.List<T>> sentences,
                                                                                    int summarySentences)
Summarize text.

Specified by:
summarize in interface TextSummarizer
Specified by:
summarize in class AbstractTextSummarizer
Parameters:
sentences - Tokenized sentences to summarize.
summarySentences - Maximum number of sentences to return in the summary.
Returns:
Summary of the input text.