Simple text-rank based summarizer.

summarizer(text, ns = 2L)

# S3 method for document
summarizer(text, ns = 2L)

# S3 method for corpus
summarizer(text, ns = 2L)

Arguments

text

An object of class document or corpus.

ns

Number of sentences.

Examples

# NOT RUN {
init_textanalysis()

# build document
doc <- string_document(
  paste("Assume this Short Document as an example.",
    "Assume this as an example summarizer.",
    "This has too few sentences."
  )
)

summarizer(doc, ns = 2L)
# }