Class: Odyssey::Formula

Inherits:
Object
  • Object
show all
Defined in:
lib/odyssey/formulas/formula.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



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