Class: UEAStemmer::CustomRule
Instance Attribute Summary
Attributes inherited from Rule
#pattern, #rule_num, #suffix_size
Instance Method Summary collapse
- #handle(word) ⇒ Object
-
#initialize(pattern, suffix_size, rule_num) ⇒ CustomRule
constructor
A new instance of CustomRule.
Methods inherited from Rule
Methods included from StringHelpers
Constructor Details
#initialize(pattern, suffix_size, rule_num) ⇒ CustomRule
Returns a new instance of CustomRule.
82 83 84 |
# File 'lib/rule.rb', line 82 def initialize(pattern, suffix_size, rule_num) super(pattern, suffix_size, rule_num) end |
Instance Method Details
#handle(word) ⇒ Object
86 87 88 |
# File 'lib/rule.rb', line 86 def handle(word) [stem_with_duplicate_character_check(word), @rule_num, self] if word =~ @pattern end |