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