Class: LLT::Review::Treebank::Difference::Datapoint
- Defined in:
- lib/llt/review/treebank/difference/datapoint.rb
Instance Attribute Summary
Attributes inherited from Generic
Attributes included from Helpers::ReviewReporter
Instance Method Summary collapse
-
#initialize(id, original, new) ⇒ Datapoint
constructor
A new instance of Datapoint.
- #write_to_report(report, unique) ⇒ Object
Methods inherited from Generic
#diff_id, #type, #xml_attributes, #xml_tag
Methods included from Helpers::ReviewReporter
#diff_id, #item, #report_diff, #xml_attributes
Constructor Details
#initialize(id, original, new) ⇒ Datapoint
Returns a new instance of Datapoint.
4 5 6 7 8 9 |
# File 'lib/llt/review/treebank/difference/datapoint.rb', line 4 def initialize(id, original, new) @id = id @original = original @new = new @container = {} end |
Instance Method Details
#write_to_report(report, unique) ⇒ Object
11 12 13 14 15 |
# File 'lib/llt/review/treebank/difference/datapoint.rb', line 11 def write_to_report(report, unique) container = report[:postags][:datapoints] container.add_wrong(unique) container[category][@original].add_wrong(unique) end |