Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lex.div.num

Calculate lexical diversity


Description

This function is a stripped down version of lex.div. It does not analyze text, but takes the numbers of tokens and types directly to calculate measures for which this information is sufficient:

  • "TTR"The classic Type-Token Ratio

  • "C"Herdan's C

  • "R"Guiraud's Root TTR

  • "CTTR"Carroll's Corrected TTR

  • "U"Dugast's Uber Index

  • "S"Summer's index

  • "Maas" Maas' (a^2)

See lex.div for further details on the formulae.

Usage

lex.div.num(
  num.tokens,
  num.types,
  measure = c("TTR", "C", "R", "CTTR", "U", "S", "Maas"),
  log.base = 10,
  quiet = FALSE
)

Arguments

num.tokens

Numeric, the number of tokens.

num.types

Numeric, the number of types.

measure

A character vector defining the measures to calculate.

log.base

A numeric value defining the base of the logarithm. See log for details.

quiet

Logical. If FALSE, short status messages will be shown. TRUE will also suppress all potential warnings regarding the validation status of measures.

Value

An object of class kRp.TTR.

References

Maas, H.-D., (1972). \"Uber den Zusammenhang zwischen Wortschatzumfang und L\"ange eines Textes. Zeitschrift f\"ur Literaturwissenschaft und Linguistik, 2(8), 73–96.

Tweedie. F.J. & Baayen, R.H. (1998). How Variable May a Constant Be? Measures of Lexical Richness in Perspective. Computers and the Humanities, 32(5), 323–352.

See Also

Examples

lex.div.num(
  num.tokens=104,
  num.types=43
)

koRpus

Text Analysis with Emphasis on POS Tagging, Readability, and Lexical Diversity

v0.13-6
GPL (>= 3)
Authors
Meik Michalke [aut, cre], Earl Brown [ctb], Alberto Mirisola [ctb], Alexandre Brulet [ctb], Laura Hauser [ctb]
Initial release
2021-05-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.