Skip to content

Commit

Permalink
- fix bug with words ending in -kes being stemmed to -k
Browse files Browse the repository at this point in the history
  • Loading branch information
ealdent committed Sep 30, 2009
1 parent 61034ec commit 1fa6336
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/uea-stemmer.rb
Expand Up @@ -329,6 +329,7 @@ def create_rules
@rules << EndingRule.new('ures', 1, 63.4)
@rules << EndingRule.new('ines', 1, 63.3)
@rules << EndingRule.new('ides', 1, 63.2)
@rules << EndingRule.new('kes', 1, 63.1)
@rules << EndingRule.new('ges', 1, 63.1)
@rules << EndingRule.new('es', 2, 63)
@rules << ConcatenatingEndingRule.new('is', 2, 64, 'e')
Expand Down
2 changes: 2 additions & 0 deletions test/uea_stemmer_test.rb
Expand Up @@ -56,6 +56,8 @@ class UeaStemmerTest < Test::Unit::TestCase
assert_equal @stemmer.stem('things'), 'thing'
assert_equal @stemmer.stem('nothings'), 'nothing' # as in 'sweet nothings'
assert_equal @stemmer.stem('witches'), 'witch'
assert_equal @stemmer.stem('makes'), 'make'
assert_equal @stemmer.stem('smokes'), 'smoke'
end

should "stem acronyms when pluralized otherwise they should be left alone" do
Expand Down

0 comments on commit 1fa6336

Please sign in to comment.