Since dale-chall-formula's gradeMap has
10: [16, Infinity]
and readability has:
daleChallFormula.gradeLevel(daleChallFormula(counts))[1]
Then when Dale-Chall does not recognize the word, Mean tries to calculate including a value of infinity and so becomes NAN.
Perhaps Dale-Chall should be counted as 17 in that case, instead of Infinity.
It could either be changed in dale-chall-formula or in readability when doing math with the scores - I'm not sure which would be better.
Since dale-chall-formula's gradeMap has
10: [16, Infinity]
and readability has:daleChallFormula.gradeLevel(daleChallFormula(counts))[1]
Then when Dale-Chall does not recognize the word, Mean tries to calculate including a value of infinity and so becomes NAN. Perhaps Dale-Chall should be counted as 17 in that case, instead of Infinity. It could either be changed in dale-chall-formula or in readability when doing math with the scores - I'm not sure which would be better.