quantgov
quantgov copied to clipboard
fix Flesch reading score
The sentence counter in textstat is not good and often returns incorrect values, which negatively affects the accuracy of the Flesch reading score, as implemented. We need to fix this in one of two ways:
- Use textblob sentence counter and textstat syllables counter to manually produce the Flesch scores. More code to change, but may be a safer fix. or
- Import the jnelson16/textstat fork of textstat, which fixes the sentence counter in textstat itself. This may be more difficult with pipenv, but less code to change.
This issue has been taken care of internally, but leaving open to correct in the quantgov library itself.