text_stats: Text Statistics

Description Usage Arguments Details Value See Also Examples

View source: R/text_stats.R

Description

Report descriptive statistics for a set of texts.

Usage

1

Arguments

x

a text corpus.

filter

if non-NULL, a text filter to to use instead of the default text filter for x.

...

additional properties to set on the text filter.

Details

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

Value

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

See Also

text_filter, term_stats.

Examples

1
2
text_stats(c("A rose is a rose is a rose.",
             "A Rose is red. A violet is blue!"))

Example output

  tokens types sentences
1      9     4         1
2     10     8         2

corpus documentation built on May 2, 2021, 9:06 a.m.