compute_mattr: Compute the Moving-Average Type-Token Ratio (MATTR)

View source: R/textstat_lexdiv.R

compute_mattrR Documentation

Compute the Moving-Average Type-Token Ratio (MATTR)

Description

From a tokens object, computes the Moving-Average Type-Token Ratio (MATTR) from Covington & McFall (2010), averaging all of the sequential moving windows of tokens of size MATTR_window across the text, returning the average as the MATTR.

Usage

compute_mattr(x, MATTR_window = 100L)

Arguments

x

a tokens object

MATTR_window

integer; the size of the moving window for computation of TTR, between 1 and the number of tokens of the document


quanteda.textstats documentation built on Sept. 11, 2024, 6:39 p.m.