public abstract class AbstractTextSummarizer extends IsCloseableObject implements TextSummarizer, IsCloseable, UsesLogger
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger
Logger used for output.
|
Constructor and Description |
---|
AbstractTextSummarizer()
Create a word tokenizer.
|
Modifier and Type | Method and Description |
---|---|
Logger |
getLogger()
Get the logger.
|
void |
setLogger(Logger logger)
Set the logger.
|
<T extends java.lang.Comparable> |
summarize(java.util.List<java.util.List<T>> sentences)
Summarize text.
|
abstract <T extends java.lang.Comparable> |
summarize(java.util.List<java.util.List<T>> sentences,
int summarySentences)
Summarize text.
|
close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
protected Logger logger
public Logger getLogger()
getLogger
in interface UsesLogger
public void setLogger(Logger logger)
setLogger
in interface UsesLogger
logger
- The logger.public <T extends java.lang.Comparable> java.util.List<java.lang.Integer> summarize(java.util.List<java.util.List<T>> sentences)
summarize
in interface TextSummarizer
sentences
- Tokenized sentences to summarize.public abstract <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
sentences
- Tokenized sentences to summarize.summarySentences
- Maximum number of sentences to return
in the summary.