lib/opener/opinion_detector_basic/kaf/document.rb
##
# Method for adding opinion holders, targets and expressions.
#
Method for adding opinion holders, targets and expressions.
Method for adding opinion holders targets and expressions .
def add_opinion_element node, ids
          lemmas    = terms.select{|t| ids.include?(t.id)}.map(&:lemma).join(' ')
          comment   = Nokogiri::XML::Comment.new(document, lemmas)
          node.add_child comment
          span_node = new_node('span', node)
          ids.each do |id|
            target_node       = new_node('target', span_node)
            target_node['id'] = id.to_s
          end
        end
def add_opinion_element node , ids lemmas = terms . select { | t | ids . include? ( t . id ) } . map ( & :lemma ) . join ( ' ' ) comment = Nokogiri :: XML :: Comment . new ( document , lemmas ) node . add_child comment span_node = new_node ( 'span' , node ) ids . each do | id | target_node = new_node ( 'target' , span_node ) target_node [ 'id' ] = id . to_s end end
Method for adding opinion holders, targets and expressions.
Method for adding opinion holders targets and expressions .
node
<not_specific>
ids
<not_specific>