Learn R Programming

corpus (version 0.9.1)

text_stats: Text Statistics

Description

Report descriptive statistics for a set of texts.

Usage

text_stats(x, filter = text_filter(x))

Arguments

x

a text corpus.

filter

a text filter specifying the tokenization rules.

Value

A data frame with columns named tokens, types, and sentences, with one row for each text.

Details

text_stats reports descriptive statistics for a set of texts: the number of tokens, unique types, and sentences.

See Also

text_filter, term_stats.

Examples

Run this code
# NOT RUN {
    text_stats(c("A rose is a rose is a rose.",
                  "A Rose is red. A violet is blue!"))
# }

Run the code above in your browser using DataLab