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 Sampson_
on 2012-12-18 13:05
on 2012-12-18 17:19
On Tue, Dec 18, 2012 at 4:04 AM, John Sampson <sampson.john7@googlemail.com> 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 :-)
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.