lib/opener/opinion_detector_basic/legacy_processor.rb
##
# Apply strength to the next term after a shifter or intensifier.
#
Apply strength to the next term after a shifter or intensifier.
Apply strength to the next term after a shifter or intensifier .
def apply_modifiers
        terms_count = terms.count
        terms.each.with_index do |term, i|
          if i+1 < terms_count
            if term.use && (term.is_shifter? || term.is_intensifier?)
              terms[i+1].accumulated_strength *= term.accumulated_strength
              terms[i+1].list_ids += term.list_ids
              term.use = false
            end
          end
        end
      end
def apply_modifiers terms_count = terms . count terms . each . with_index do | term , i | if i + 1 < terms_count if term . use && ( term . is_shifter? || term . is_intensifier? ) terms [ i + 1 ] . accumulated_strength *= term . accumulated_strength terms [ i + 1 ] . list_ids += term . list_ids term . use = false end end end end
Apply strength to the next term after a shifter or intensifier.
Apply strength to the next term after a shifter or intensifier .