python-course
python-course copied to clipboard
Is the test for compute_ARI() correct?
In book branch, chapter 5 I believe the test for compute_ARI isn't correct. I have checked that the Automatic Readability Index for the sentence 'This was rather easy. Please give me something more challenging' is 6.033
The condition however is abs(compute_ARI(sentences) - 4.442) < 0.001 which will always be false
Thanks for this. Chapter five still needs quite some polishing. This will be helpful in that.
Okay I figured out that the ARI of sentences when it is
sentences = [["this", "was", "rather", "easy"],
["Please", "give", "me", "something", "more", "challenging"]]
is 6.033. However, if you sentences[0].append(".") or add a period there, the ARI of sentences become 4.442.
Not saying that the period should be there, it shouldn't. Only thought it'll be helpful to know where you got that magic number 4.442 in the condition from.