Class: Bable::Index::Ari
Overview
This class is responsible of calculating the Automated Readability Index. Check en.wikipedia.org/wiki/Automated_readability_index for knowing more.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Bable::Index::Base
Instance Method Details
#calc ⇒ Object
7 8 9 10 |
# File 'lib/bable/index/ari.rb', line 7 def calc (4.71 * text.characters_count / text.words_count + 0.5 * text.words_count / text.sentences_count - 21.43).round(2) end |