-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logic bug in difficult_words_list() #192
Comments
This was referenced Jul 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed this bug when I saw that scores change if I simply duplicate an input text to make it twice as long.
Each difficult word is only counted once, no matter how many times it occurs in the text. This is wrong, because the algorithms need to compute, e.g., difficult word count / total word count. This bug is causing many of the scores to be off. This tests for the problem:
The bug is here, where a set is used. Changing this to a tuple fixes it.
I wrote a PR: #193
The text was updated successfully, but these errors were encountered: