Learn R Programming

koRpus (version 0.13-8)

kRp.TTR,-class: S4 Class kRp.TTR

Description

This class is used for objects that are returned by lex.div and its wrapper functions (like TTR, MSTTR, MTLD, etc.).

Arguments

Slots

param

Relevant parameters of the given analysis, as given to the function call, see lex.div for details.

tt

The analyzed text in tokenized form, with eight elements ("tokens", "types", "lemmas", "type.in.txt", "type.in.result", "num.tokens", "num.types", "num.lemmas").

TTR

Value of the classic type-token ratio. NA if not calculated.

MSTTR

Mean segmental type-token ratio, including the actual "MSTTR", TTR values of each segment ("TTR.seg"), and the number of dropped words due to segment size ("dropped"). NA if not calculated.

MATTR

Moving-average type-token ratio, including the actual "MATTR", TTR values of each window ("TTR.win"), and standard deviation of TTRs ("sd"). NA if not calculated.

C.ld

Herdan's C. NA if not calculated.

R.ld

Guiraud's R. NA if not calculated.

CTTR

Carroll's CTTR. NA if not calculated.

U.ld

Uber Index. NA if not calculated.

S.ld

Summer's S. NA if not calculated.

K.ld

Yule's K. NA if not calculated.

Maas

Maas' a. NA if not calculated.

lgV0

Maas' \(\lg{V_0}\). NA if not calculated.

lgeV0

Maas' \(\lg{}_{e}{V_0}\). NA if not calculated.

Maas.grw

Maas' relative type growth \(V'\). NA if not calculated.

HDD

The actual HD-D value ("HDD"), a vector with the probabilies for each type ("type.probs"), a "summary" on these probabilities and their standard deviation "sd".

MTLD

Measure of textual lexical diversity, including the actual "MTLD", two matrices with detailed information on forward and backward factorization ("all.forw" & "all.back"), a named vector holding both calculated factors values ("factors"), and a named list with information on the number or tokens in each factor, both forward and backward, as well as their mean and standard deviation ("lengths"). NA if not calculated.

MTLDMA

Moving-average MTLD, including the actual "MTLDMA", its standard deviation, a list ("all") with detailed information on factorization, the step size, and a named list with information on the number or tokens in each factor, as well as their mean and standard deviation ("lengths"). NA if not calculated.

TTR.char

TTR values, starting with the first steplength of tokens, then adding the next one, progressing until the whole text is analyzed. The matrix has two colums, one for the respective step ("token") and one for the actual values ("value"). Can be used to plot TTR characteristic curves. NA if not calculated.

MATTR.char

Equivalent to TTR.char, but calculated using MATTR algorithm. NA if not calculated.

C.char

Equivalent to TTR.char, but calculated using Herdan's C algorithm. NA if not calculated.

R.char

Equivalent to TTR.char, but calculated using Guiraud's R algorithm. NA if not calculated.

CTTR.char

Equivalent to TTR.char, but calculated using Carroll's CTTR algorithm. NA if not calculated.

U.char

Equivalent to TTR.char, but calculated using the Uber Index algorithm. NA if not calculated.

S.char

Equivalent to TTR.char, but calculated using Summer's S algorithm. NA if not calculated.

K.char

Equivalent to TTR.char, but calculated using Yule's K algorithm. NA if not calculated.

Maas.char

Equivalent to TTR.char, but calculated using Maas' a algorithm. NA if not calculated.

lgV0.char

Equivalent to TTR.char, but calculated using Maas' \(\lg{V_0}\) algorithm. NA if not calculated.

lgeV0.char

Equivalent to TTR.char, but calculated using Maas' \(\lg{}_{e}{V_0}\) algorithm. NA if not calculated.

HDD.char

Equivalent to TTR.char, but calculated using the HD-D algorithm. NA if not calculated.

MTLD.char

Equivalent to TTR.char, but calculated using the MTLD algorithm. NA if not calculated.

MTLDMA.char

Equivalent to TTR.char, but calculated using the moving-average MTLD algorithm. NA if not calculated.

Contructor function

Should you need to manually generate objects of this class (which should rarely be the case), the contructor function kRp_TTR(...) can be used instead of new("kRp.TTR", ...).