Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@DRMacIver
Created January 27, 2009 00:15
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 DRMacIver/53071 to your computer and use it in GitHub Desktop.
Save DRMacIver/53071 to your computer and use it in GitHub Desktop.
require "set"
stopwords = Set[*
IO.read("smart.txt").lines.reject{|x| x =~ /^#/}.map(&:strip)
]
STDIN.lines.each do |l|
c, t = l.split
puts l unless stopwords.include? t.strip
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment