-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement Kincaid-Fleisch test on comments #16
Comments
Since the comments are independent from each other, each peace of a comment accross all the code files should be extracted and tested manually for readability. Correct? |
Actually
|
I corrected this on Gitter: we should first assign comments to individual functions or modules, and then extract readability statistics per code unit (module, function, or other top level declaration ). |
Okay. I'm getting familiar with the code. It's unclear still how it works -- the algorithms for different metircs, parsing... |
This issue is now published on WorksHub. If you would like to work on this issue you can |
@willnwhite started working on this issue via WorksHub. |
How accurate must the Kincaid-Fleisch test be? The test depends on the number of syllables, and I think the only way to accurately get the number of syllables in a word is by using a list of all words and how many syllables each one has... no algorithm is more accurate than that. However, this would add to program size/network requests compared to using an algorithm. |
I bet that syllabification can be super-simple, with only checking consecutive stretches of vowels and consonants. This is statistics, small errors should not change much. So you can have:
Same for sentences:
|
Please note that the code will be probably too short to justify Kincaid-Fleisch package on its own. |
The test is very sensitive to the syllable count. I ran your algorithm on a comment from this project and the score was -66, versus the real score of 30. Could that still be useful, e.g. for relative scores, or not? |
Did you split words before running syllable count? |
Yes. |
Tell me your branch, and I will try to help you find the bug. |
Kincaid-Fleisch readability test on comments is easy to compute metric that allows to estimate how hard it is to read the comment.
The text was updated successfully, but these errors were encountered: