Learn R Programming

koRpus (version 0.13-8)

coleman: Readability: Coleman's Formulas

Description

This is just a convenient wrapper function for readability.

Usage

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.

Value

An object of class kRp.readability.

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.

Examples

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

Run the code above in your browser using DataLab