Closed hturner closed 2 years ago
Seeing as I am on a working on some other fixes anyways, I said I would take a look at this (hope that's okay @benmarwick!)
This is related to the issue described and fixed in #13, where the necessary korPus
language package (in this case "en") was missing, causing koRpus:::tokenize()
to fail.
It was fixed at the time for the text_stats()
function by requiring the "en" language package when the text_stats()
function is called (which explains why the bug doesn't appear if you call text_stats()
before readability()
). However, a similar fix was not implemented for the readability()
function.
This is addressed as part of #48 - the readability()
function now similarly installs the relevant language package, and so will work in a brand new session without needing to call text_stats()
first.
Thanks for the nice add-in, I was looking for something to compute readability scores and it's nice to have the word count as a bonus!
The readability function works fine if I call it after the word count function (
text_stats()
). But if I call the readability function without callingtext_stats()
earlier in the session, then I get the following error:Created on 2019-09-21 by the reprex package (v0.3.0)