corpus_summarize {sentometrics} | R Documentation |
Summarize the sento_corpus object
Description
Summarizes the sento_corpus
object and returns insights about the evolution of
documents, features and tokens over time.
Usage
corpus_summarize(x, by = "day", features = NULL)
Arguments
x |
is a |
by |
a single |
features |
a |
Details
This function summarizes the sento_corpus
object by generating statistics about
documents, features and tokens over time. The insights can be narrowed down to a chosen set of metadata
features. The same tokenization as in the sentiment calculation in compute_sentiment
is used.
Value
returns a list
containing:
stats |
a |
plots |
a |
Author(s)
Jeroen Van Pelt, Samuel Borms, Andres Algaba
Examples
data("usnews", package = "sentometrics")
corpus <- sento_corpus(usnews)
# summary of corpus by day
summary1 <- corpus_summarize(corpus)
# summary of corpus by month for both journals
summary2 <- corpus_summarize(corpus, by = "month",
features = c("wsj", "wapo"))