Hacker News new | ask | show | jobs
by lucb1e 3778 days ago
Why do we need an API for this? A library seems easier, and even that is a stretch for doing `$wordcount / 200 = minutes required to read`. Does this make an estimate of the article's complexity and adjust how many words a person reads per minute?

(Source for 200 words per minute: https://en.wikipedia.org/wiki/Words_per_minute#Reading_and_c... )

1 comments

We definitely don't need an API. Then again, we basically don't need most APIs. This doesn't estimate the article's complexity as of now, but its main point is not just getting the length of the entire site, but locating the most likely main content area and THEN doing the /250.
You can use something like:

https://github.com/grangier/python-goose

https://pypi.python.org/pypi/textstat/

+ using word counts that adjust for reading ease