0
0
Fork 0

a simple stemmer which should work for very simple things

it should get extended in the feature to do all the stuff for english
languages
This commit is contained in:
Gibheer 2011-06-10 15:30:20 +02:00
parent 8e6c5fa321
commit 9fa082d8d9
3 changed files with 1 additions and 6 deletions

View File

@ -8,5 +8,4 @@ module Polecat
require 'polecat/index_searcher'
require 'polecat/query'
require 'polecat/term'
require 'polecat/stemmer'
end

View File

@ -4,7 +4,7 @@ module Polecat
# This class can be used for cleaning strings in the most simple way. If it
# does not do, what you intent it to do, inherit from Polecat::Stemmer and
# implement your own.
class SimpleStemmer < Polecat::Stemmer
class SimpleStemmer
def stem word
if word.class == Array
word.each {|w| self.stem w }

View File

@ -5,8 +5,4 @@ describe Polecat::SimpleStemmer do
it "creates a new SimpleStemmer" do
subject.class.should be(Polecat::SimpleStemmer)
end
it "is a stemmer" do
subject.kind_of?(Polecat::Stemmer).should be(true)
end
end