Closed davidawad closed 5 years ago
So I think you mixed up the measures for easy words and familiar words in index.js around line 380.
From https://github.com/wooorm/readability/blob/src/src/index.js#L383-L398 :
// Find unique unfamiliar words for spache. if ( spache.indexOf(normalized) !== -1 && familiarWords[normalized] !== true ) { familiarWords[normalized] = true familiarWordCount++ } // Find unique difficult words for dale-chall. if (daleChall.indexOf(normalized) !== -1 && easyWord[normalized] !== true) { easyWord[normalized] = true easyWordCount++ } } }
The docs for Dale-chall describe it as "List of familiar American-English words: The New Dale-Chall (1995)."
The docs for Spache describe it as a "List of easy American-English words: Revised Spache (1974)."
So I think you just have to switch the counts.
Checking the formula’s (spache, dale-chall), the correct counts are used (familiar/unfamiliar, easy/difficult). So I’d say the descriptions of the lists need to be fixed.
Fixed in the word list packages!
So I think you mixed up the measures for easy words and familiar words in index.js around line 380.
From https://github.com/wooorm/readability/blob/src/src/index.js#L383-L398 :
The docs for Dale-chall describe it as "List of familiar American-English words: The New Dale-Chall (1995)."
The docs for Spache describe it as a "List of easy American-English words: Revised Spache (1974)."
So I think you just have to switch the counts.