Learn R Programming

koRpus (version 0.10-2)

harris.jacobson: Readability: Harris-Jacobson indices

Description

This is just a convenient wrapper function for readability.

Usage

harris.jacobson(txt.file, word.list, parameters = c(char = 6), hj1 = c(dword
  = 0.094, asl = 0.168, const = 0.502), hj2 = c(dword = 0.14, asl = 0.153,
  const = 0.56), hj3 = c(asl = 0.158, lword = 0.055, const = 0.355),
  hj4 = c(dword = 0.07, asl = 0.125, lword = 0.037, const = 0.497),
  hj5 = c(dword = 0.118, asl = 0.134, lword = 0.032, const = 0.424), ...)

Arguments

txt.file

Either an object of class kRp.tagged-class, 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.

word.list

A vector or matrix (with exactly one column) which defines familiar words. For valid results the short Harris-Jacobson word list for grades 1 and 2 (english) should be used.

parameters

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

hj1

A numeric vector with named magic numbers for the first of the formulas.

hj2

A numeric vector with named magic numbers for the second of the formulas.

hj3

A numeric vector with named magic numbers for the third of the formulas.

hj4

A numeric vector with named magic numbers for the fourth of the formulas.

hj5

A numeric vector with named magic numbers for the fifth of the formulas.

...

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

Value

An object of class kRp.readability-class.

Details

This function calculates the revised Harris-Jacobson readability formulas (1 to 5), as described in their paper for the 18th Annual Meeting of the College Reading Association (Harris & Jacobson, 1974). In contrast to readability, which by default calculates all possible indices, this function will only calculate the index values.

This formula doesn't need syllable count.

References

Harris, A.J. & Jacobson, M.D. (1974). Revised Harris-Jacobson readability formulas. In 18th Annual Meeting of the College Reading Association, Bethesda.

Examples

Run this code
# NOT RUN {
harris.jacobson(tagged.text, word.list=harris.jacobson.wl)
# }

Run the code above in your browser using DataLab