odyssey
odyssey copied to clipboard
Text readability analyzer using Flesch-Kincaid and others
Hi all! I am talking about [this](https://github.com/cameronsutter/odyssey/blob/fd13e9e5bede733ceff4b6a95f2ac516c19cb5f9/lib/odyssey/engine.rb#L18) regular expression, which is later used to coun sentences: ``` SENTENCE_REGEX = /[^\.!?\s][^\.!?]*(?:[\.!?](?!['"]?\s|$)[^\.!?]*)*[\.!?]?['"]?(?=\s|$)/ ``` For texts like "Mr. Smith is a doctor" this...
There are a number of issues with the current API. - [x] formulas aren't namespaced. That is, `require "odyssey"` pollutes the global namespace with the formula classes. - [x] the...
`Odyssey.analyze_all(text)` Executes and returns good results for Flesh-Kincaid GL but zero for the Gunning Fog index, whatever is supplied as `text`. `Odyssey.flesch_kincaid_gl(text)` Again, works as expected, but: `Odyssey.gunning_fog(text)` Errors with:...