class Bable::Index::Ari

This class is responsible of calculating the Automated Readability Index. Check en.wikipedia.org/wiki/Automated_readability_index for knowing more.

Public Instance Methods

calc() click to toggle source
# 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