class Lingo::Attendee::Stemmer

Public Instance Methods

control(*) click to toggle source
# File lib/lingo/attendee/stemmer.rb, line 40
def control(*)
end
init() click to toggle source
# File lib/lingo/attendee/stemmer.rb, line 33
def init
  extend(Lingo.get_const(get_key('type', 'porter'), self.class))

  @wc  = get_key('wordclass', LA_STEM)
  @all = get_key('mode', '').downcase == 'all'
end
process(obj) click to toggle source
# File lib/lingo/attendee/stemmer.rb, line 43
def process(obj)
  if obj.is_a?(Word) && obj.unknown?
    stem = stem(Unicode.downcase(obj.form), @all)
    obj << Lexical.new(stem, @wc) if stem
  end

  forward(obj)
end