Class: UEAStemmer::NonExhaustiveEndingRule
- Inherits:
-
EndingRule
- Object
- Rule
- EndingRule
- UEAStemmer::NonExhaustiveEndingRule
- Defined in:
- lib/uea-stemmer/rule.rb
Instance Attribute Summary
Attributes inherited from EndingRule
Attributes inherited from Rule
#pattern, #rule_num, #suffix_size
Instance Method Summary collapse
Methods inherited from EndingRule
Methods inherited from Rule
Methods included from StringHelpers
Constructor Details
This class inherits a constructor from UEAStemmer::EndingRule
Instance Method Details
#handle(word) ⇒ Object
75 76 77 |
# File 'lib/uea-stemmer/rule.rb', line 75 def handle(word) super(word) if word != @original_pattern end |
#to_s ⇒ Object
79 80 81 |
# File 'lib/uea-stemmer/rule.rb', line 79 def to_s "rule ##{@rule_num} (remove -#{@original_pattern[@original_pattern.size - @suffix_size, @suffix_size]} when the word ends in -#{@original_pattern} unless the word is #{@original_pattern})" end |