Skip to content

Instantly share code, notes, and snippets.

@sunnygleason
Created January 11, 2012 21:35
Show Gist options
  • 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