Stemmer gem

I am a newbie to Ruby so this may be elementary, but I have installed
the gem “stemmer” successfully. But my guesses how to use it have all
been wrong so far. Can anyone advise me?

Regards

John S.

On Tue, Dec 18, 2012 at 4:04 AM, John S.
[email protected] wrote:

I am a newbie to Ruby so this may be elementary, but I have installed
the gem “stemmer” successfully. But my guesses how to use it have all
been wrong so far. Can anyone advise me?

Never heard of it, but it appears pretty straightforward:

1.9.3 (main):0 > require ‘stemmer’
=> true
1.9.3 (main):0 > “foobical”.respond_to? “stem”
=> true
1.9.3 (main):0 > “foobical”.stem
=> “foobic”
1.9.3 (main):0 > “canonical”.stem
=> “canon”
1.9.3 (main):0 > “logical”.stem
=> “logic”
1.9.3 (main):0 > “recreational”.stem
=> “recreat”
1.9.3 (main):0 > “fictitious”.stem
=> “fictiti”

How well it works for your purposes, I’ll leave for you to decide :slight_smile: