Description Usage Arguments Details Value See Also Examples
A function for calculating the LIX readability score for the Talk of Norway corpus
1 | lix_ton(ids, ton_path = "../talk-of-norway/", cores = 1)
|
ids |
Character with ToN ids for the speeches to calculate LIX from |
ton_path |
Character specifying the relative path to the talk-of-norway repository folder |
cores |
Integer specifying number of processor cores to run the function on. Requires the |
This is a function that uses the annotated part of the Talk of Norway corpus
for computing LIX readability scores. It is a special wrapper for the more
general lix
function.
A tibble with id, number of words, number of long words, number of sentences, and lix scores.
1 2 3 4 5 6 7 8 | data("tonDemo")
# Computing LIX for whole data
all <- lix_by_id(tonDemo$id, ton_path = "../talk-of-norway/", cores = detectCores()-2)
summary(all$lix)
# Computing LIX for Labor Party (A)
ap <- lix_by_id(tonDemo$id[which(tonDemo$party_id == "A")], ton_path = "../talk-of-norway/", cores = detectCores()-2)
summary(ap$lix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.