Tally the Scrabble letter values of text given a user-supplied function, such as the sum (default) or mean of the character values.
nscrabble(x, FUN = sum)
a character vector
function to be applied to the character values in the text;
a (named) integer vector of Scrabble letter values, computed using
FUN, corresponding to the input text(s)
Character values are only defined for non-accented Latin a-z, A-Z letters. Lower-casing is unnecessary.
We would be happy to add more languages to this extremely useful function if you send us the values for your language!
nscrabble(c("muzjiks", "excellency")) nscrabble(quanteda::data_corpus_inaugural[1:5], mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.