Class: JLDrill::Tatoeba::TatoebaExample
- Inherits:
-
ExampleSentence
- Object
- ExampleSentence
- JLDrill::Tatoeba::TatoebaExample
- Defined in:
- lib/jldrill/model/Tatoeba.rb
Overview
Represents an Example sentence in the Tatoeba database
Constant Summary collapse
- INDEX_RE =
/^(\d*)[\t](\d*)[\t](.*)/
Instance Attribute Summary
Attributes inherited from ExampleSentence
Instance Method Summary collapse
-
#initialize(targetIndex, nativeIndex, key, sentences) ⇒ TatoebaExample
constructor
A new instance of TatoebaExample.
- #nativeLanguage ⇒ Object
- #targetLanguage ⇒ Object
Methods inherited from ExampleSentence
#nativeOnly_to_s, #targetOnly_to_s, #to_s
Constructor Details
#initialize(targetIndex, nativeIndex, key, sentences) ⇒ TatoebaExample
Returns a new instance of TatoebaExample.
94 95 96 97 98 99 100 |
# File 'lib/jldrill/model/Tatoeba.rb', line 94 def initialize(targetIndex, nativeIndex, key, sentences) @sentences = sentences @targetIndex = targetIndex @nativeIndex = nativeIndex @key = key end |
Instance Method Details
#nativeLanguage ⇒ Object
102 103 104 |
# File 'lib/jldrill/model/Tatoeba.rb', line 102 def nativeLanguage() return "#{@nativeIndex}: #{@sentences.sentenceAt(@nativeIndex)}" end |
#targetLanguage ⇒ Object
106 107 108 |
# File 'lib/jldrill/model/Tatoeba.rb', line 106 def targetLanguage() return "#{@targetIndex}: #{@sentences.sentenceAt(@targetIndex)}" end |