coleman: Readability: Coleman's Formulas

Description Usage Arguments Details Value Examples

View source: R/wrapper_functions_readability.R

Description

This is just a convenient wrapper function for readability.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
coleman(
  txt.file,
  hyphen = NULL,
  parameters = c(syll = 1),
  clz1 = c(word = 1.29, const = 38.45),
  clz2 = c(word = 1.16, sntc = 1.48, const = 37.95),
  clz3 = c(word = 1.07, sntc = 1.18, pron = 0.76, const = 34.02),
  clz4 = c(word = 1.04, sntc = 1.06, pron = 0.56, prep = 0.36, const = 26.01),
  ...
)

Arguments

txt.file

Either an object of class kRp.text, a character vector which must be be a valid path to a file containing the text to be analyzed, or a list of text features. If the latter, calculation is done by readability.num.

hyphen

An object of class kRp.hyphen. If NULL, the text will be hyphenated automatically.

parameters

A numeric vector with named magic numbers, defining the relevant parameters for all formulas of the index.

clz1

A numeric vector with named magic numbers for the first formula.

clz2

A numeric vector with named magic numbers for the second formula.

clz3

A numeric vector with named magic numbers for the third formula.

clz4

A numeric vector with named magic numbers for the fourth formula.

...

Further valid options for the main function, see readability for details.

Details

This function calculates the four readability formulas by Coleman. In contrast to readability, which by default calculates all possible indices, this function will only calculate the index value.

Value

An object of class kRp.readability.

Examples

1
2
3
4
## Not run: 
coleman(tagged.text)

## End(Not run)

unDocUMeantIt/koRpus documentation built on May 21, 2021, 9:26 p.m.