Class: WordAligner::WordErrorRate
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- WordAligner::WordErrorRate
- Defined in:
- lib/word_aligner/word_error_rate.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #correct_words ⇒ Object
- #incorrect_words ⇒ Object
-
#initialize(data) ⇒ WordErrorRate
constructor
A new instance of WordErrorRate.
- #percentage_accurate ⇒ Object
- #percentage_correct ⇒ Object
- #percentage_incorrect ⇒ Object
- #words ⇒ Object
Constructor Details
#initialize(data) ⇒ WordErrorRate
Returns a new instance of WordErrorRate.
8 9 10 11 |
# File 'lib/word_aligner/word_error_rate.rb', line 8 def initialize(data) @data = data super(data) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/word_aligner/word_error_rate.rb', line 6 def data @data end |
Instance Method Details
#correct_words ⇒ Object
17 18 19 |
# File 'lib/word_aligner/word_error_rate.rb', line 17 def correct_words matching end |
#incorrect_words ⇒ Object
21 22 23 |
# File 'lib/word_aligner/word_error_rate.rb', line 21 def incorrect_words align_cost end |
#percentage_accurate ⇒ Object
25 26 27 |
# File 'lib/word_aligner/word_error_rate.rb', line 25 def percentage_accurate 100-percentage_incorrect end |
#percentage_correct ⇒ Object
29 30 31 |
# File 'lib/word_aligner/word_error_rate.rb', line 29 def percentage_correct percent_rate(correct_words) end |
#percentage_incorrect ⇒ Object
33 34 35 |
# File 'lib/word_aligner/word_error_rate.rb', line 33 def percentage_incorrect percent_rate(incorrect_words) end |
#words ⇒ Object
13 14 15 |
# File 'lib/word_aligner/word_error_rate.rb', line 13 def words transcription_words end |