Skip to content

Instantly share code, notes, and snippets.

@sunnygleason
Created January 11, 2012 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunnygleason/1596875 to your computer and use it in GitHub Desktop.
Save sunnygleason/1596875 to your computer and use it in GitHub Desktop.
Apply Snowball Stemming Algorithm to Words
require 'lingua/stemmer'
stemmer = Lingua::Stemmer.new(:language => "en")
puts ARGV.map { |w| stemmer.stem(w) }.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment