Calculates lexical diversity metrics to measure vocabulary richness. MTLD and MATTR are most stable and text-length independent.
Arguments
- dfm_object
A document-feature matrix or tokens object from quanteda
- measures
Character vector of measures to calculate. Options: "all", "MTLD" (recommended), "MATTR" (recommended), "MSTTR", "TTR", "CTTR", "Maas", "K", "D"
- texts
Optional character vector of original texts for calculating average sentence length
