View source: R/type_token_ratio.R
type_token_ratio | R Documentation |
Calculate type-token ratio by grouping variable.
type_token_ratio(text.var, grouping.var = NULL, n.words = 1000, ...)
text.var |
The text variable |
grouping.var |
The grouping variables. Default |
n.words |
An integer specifying the number of words in each chunk. |
... |
ignored. |
Returns a list of class type_text_ratio
. This object
contains a type-token ratio for the overall text and a data frame
type-token ratios per grouping vriable.
Baker, P. (2006) Using Corpora in Discourse Analysis. London: Continuum.
with(raj, type_token_ratio(dialogue, person))
plot(with(raj, type_token_ratio(dialogue, person)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.