Skip to content

Instantly share code, notes, and snippets.

@matpalm
Created August 20, 2009 12:24
Show Gist options
  • Save matpalm/171035 to your computer and use it in GitHub Desktop.
Save matpalm/171035 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
STDIN.each do |line|
terms = line.downcase.gsub(/\'/,'').gsub(/[^a-z0-9]/,' ').chomp.strip.split
terms.each { |term| puts "LongValueSum:#{term}\t1" }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment