Class: AjaxCat::Request::Simple
- Defined in:
- lib/ajax-cat/request/simple.rb
Instance Attribute Summary
Attributes inherited from Raw
Instance Method Summary collapse
-
#initialize(sentence) ⇒ Simple
constructor
A new instance of Simple.
- #process_line(line) ⇒ Object
- #result ⇒ Object
Methods inherited from Raw
parse_position, #prepare_moses_request, #tokenize
Constructor Details
#initialize(sentence) ⇒ Simple
Returns a new instance of Simple.
9 10 11 12 |
# File 'lib/ajax-cat/request/simple.rb', line 9 def initialize(sentence) super(sentence) @best_translation = false end |
Instance Method Details
#process_line(line) ⇒ Object
18 19 20 |
# File 'lib/ajax-cat/request/simple.rb', line 18 def process_line(line) @best_translation = line.split(" ||| ")[1] unless @best_translation end |
#result ⇒ Object
14 15 16 |
# File 'lib/ajax-cat/request/simple.rb', line 14 def result @best_translation end |