Skip to content
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

It looks like you mixed up Dale-Chall and Spache #3

Closed
davidawad opened this issue Jul 18, 2019 · 2 comments
Closed

It looks like you mixed up Dale-Chall and Spache #3

davidawad opened this issue Jul 18, 2019 · 2 comments

Comments

@davidawad
Copy link

davidawad commented Jul 18, 2019

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.

@wooorm
Copy link
Owner

wooorm commented Jul 19, 2019

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.

@wooorm
Copy link
Owner

wooorm commented Jul 19, 2019

Fixed in the word list packages!

@wooorm wooorm closed this as completed Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants