Class: Odyssey::Formula
- Inherits:
-
Object
- Object
- Odyssey::Formula
- Defined in:
- lib/odyssey/formulas/formula.rb
Direct Known Subclasses
Ari, ColemanLiau, FakeFormula, FleschKincaidGl, FleschKincaidRe, GunningFog, Smog
Instance Method Summary collapse
- #name ⇒ Object
-
#score(text, stats) ⇒ Object
text will be a Hash like so: data = { ‘raw’ => String, ‘words’ => Array, ‘sentences’ => Array, ‘syllables’ => Array }.
- #score_by_sentence(text, stats_split) ⇒ Object
Instance Method Details
#name ⇒ Object
29 30 31 |
# File 'lib/odyssey/formulas/formula.rb', line 29 def name 'Generic' end |
#score(text, stats) ⇒ Object
text will be a Hash like so: data =
'raw' => String,
'words' => Array,
'sentences' => Array,
'syllables' => Array
stats will be a Hash like so:
'string_length' => Fixnum,
'letter_count' => Fixnum,
'syllable_count' => Fixnum,
'word_count' => Fixnum,
'sentence_count' => Fixnum,
'average_words_per_sentence' => Float,
'average_syllables_per_word' => Float
21 22 23 |
# File 'lib/odyssey/formulas/formula.rb', line 21 def score(text, stats) 0 end |
#score_by_sentence(text, stats_split) ⇒ Object
25 26 27 |
# File 'lib/odyssey/formulas/formula.rb', line 25 def score_by_sentence(text, stats_split) 0 end |