Learn R Programming

koRpus (version 0.13-8)

MTLD: Lexical diversity: Measure of Textual Lexical Diversity (MTLD)

Description

This is just a convenient wrapper function for lex.div.

Usage

MTLD(
  txt,
  factor.size = 0.72,
  min.tokens = 9,
  detailed = FALSE,
  char = FALSE,
  MA = FALSE,
  steps = 1,
  ...
)

Arguments

txt

An object of class kRp.text containing the tagged text to be analyzed.

factor.size

A real number between 0 and 1, defining the MTLD factor size.

min.tokens

An integer value, how many tokens a full factor must at least have to be considered for the MTLD-MA result.

detailed

Logical, whether full details of the analysis should be calculated. It defines if all factors should be kept in the object. This slows down calculations considerably.

char

Logical, defining whether data for plotting characteristic curves should be calculated.

MA

Logical, defining whether the newer moving-average algorithm (MTLD-MA) should be calculated.

steps

An integer value for MTLD-MA, defining the step size for the moving window, in tokens. The original proposal uses an incremet of 1. If you increase this value, computation will be faster, but your value can only remain a good estimate if the text is long enough.

...

Further valid options for the main function, see lex.div for details.

Value

An object of class kRp.TTR.

Details

This function calculates the measure of textual lexical diversity (MTLD; see McCarthy & Jarvis, 2010). In contrast to lex.div, which by default calculates all possible measures and their progressing characteristics, this function will only calculate the MTLD value, and characteristics are off by default.

If you set MA=TRUE, the newer MTLD-MA (moving-average method) is used instead of the classic MTLD.

References

McCarthy, P. M. & Jarvis, S. (2010). MTLD, vocd-D, and HD-D: A validation study of sophisticated approaces to lexical diversity assessment. Behaviour Research Methods, 42(2), 381--392.

See Also

kRp.POS.tags, kRp.text, kRp.TTR

Examples

Run this code
# NOT RUN {
MTLD(tagged.text)
# }

Run the code above in your browser using DataLab