This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 26f8c915f9aa1d3d08b369daaa9925602e1f39d6
tree ccd0bca7aab8963250f86a76046b66ec5a7a28e3
parent 7fc7b903235c985c3b6fbdfbc8e21b34d22ac837
tree ccd0bca7aab8963250f86a76046b66ec5a7a28e3
parent 7fc7b903235c985c3b6fbdfbc8e21b34d22ac837
| name | age | message | |
|---|---|---|---|
| |
.document | Wed Oct 28 11:12:10 -0700 2009 | |
| |
.gitignore | Mon Nov 02 07:07:42 -0800 2009 | |
| |
MIT-LICENSE | Tue Feb 10 07:26:07 -0800 2009 | |
| |
README.rdoc | Fri Nov 06 02:32:35 -0800 2009 | |
| |
Rakefile | Mon Nov 02 07:06:09 -0800 2009 | |
| |
VERSION | Fri Nov 06 02:44:34 -0800 2009 | |
| |
ext/ | Fri Nov 06 02:32:35 -0800 2009 | |
| |
lib/ | Mon Nov 02 11:49:45 -0800 2009 | |
| |
libstemmer_c/ | Mon Nov 02 06:38:33 -0800 2009 | |
| |
test/ | Mon Nov 02 11:49:45 -0800 2009 |
README.rdoc
Ruby-Stemmer
Ruby-Stemmer exposes SnowBall API to Ruby.
This package includes libstemmer_c library released under BSD licence and available for free at: snowball.tartarus.org/dist/libstemmer_c.tgz.
For more details about libstemmer_c please visit the SnowBall website.
Usage
require 'rubygems'
require 'lingua/stemmer'
stemmer= Lingua::Stemmer.new(:language => "ro")
stemmer.stem("netăgăduit") #=> netăgădu
Alternative
require 'rubygems'
require 'lingua/stemmer'
Lingua.stemmer( %w(incontestabil neîndoielnic), :language => "ro" ) #=> ["incontest", "neîndoieln"]
Lingua.stemmer("installation") #=> "instal"
Lingua.stemmer("installation", :language => "fr", :encoding => "ISO_8859_1") do | word |
puts "~> #{word}" #=> "instal"
end # => #<Lingua::Stemmer:0x102501e48>
Rails
# in config/environment.rb: config.gem 'ruby-stemmer', :version => '>=0.6.2', :lib => 'lingua/stemmer'
More details
- Complete API in RDoc format
- More usage on the test file
Install
Standard install with:
gem install ruby-stemmer
Please not that Windows is not supported at this time.
Development version
$ git clone git://github.com/aurelian/ruby-stemmer.git $ cd ruby-stemmer $ rake -T #<== see what we've got $ rake compile #<== builds the extension do'h $ rake test
NOT A BUG
The stemming process is an algorithm to allow one to find the stem of an word (not the root of it). For further reference on stem vs. root, please check wikipedia articles on the topic:
TODO
- Open issues
- Release Windows Gem
Note on Patches/Pull Requests
- Fork the project from github
- Make your feature addition or bug fix
- Add tests for it. This is important so I don’t break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history.
if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull
- Send me a pull request. Bonus points for topic branches.
Alternative Stemmers for Ruby
- stemmer4r (ext)
- fast-stemmer (ext)
- uea-stemmer (ext)
- stemmer (pure ruby)
- [add yours]
Copyright
Copyright © 2008,2009 Aurelian Oancea. See MIT-LICENSE for details.
Contributors
- Aurelian Oancea
- Yury Korolev - various bug fixes
- Aaron Patterson - rake compiler (windows support), code cleanup
Real life usage
- planet33.ru is using Ruby-Stemmer together with Classifier to automatically rate places based on users comments.







