Class: LLT::Review::Common::Sentence

Inherits:
Object
  • Object
show all
Includes:
Core::Structures::HashContainable
Defined in:
lib/llt/review/common/sentence.rb

Direct Known Subclasses

Alignment::Sentence, Treebank::Sentence

Instance Method Summary collapse

Instance Method Details

#cloneObject



20
21
22
23
24
# File 'lib/llt/review/common/sentence.rb', line 20

def clone
  cloned = super
  cloned.replace_with_clone(:report)
  cloned
end

#compare(other, comparables = nil) ⇒ Object



14
15
16
17
18
# File 'lib/llt/review/common/sentence.rb', line 14

def compare(other, comparables = nil)
  diff = new_sentence_diff
  words.each { |id, word| word.compare(other[id], diff, comparables) }
  diff
end

#reportObject



10
11
12
# File 'lib/llt/review/common/sentence.rb', line 10

def report
  @report ||= create_report
end

#wordsObject



6
7
8
# File 'lib/llt/review/common/sentence.rb', line 6

def words
  @container
end