Skip to content

Instantly share code, notes, and snippets.

@DRMacIver
Created January 27, 2009 00:15
Show Gist options
  • Save DRMacIver/53070 to your computer and use it in GitHub Desktop.
Save DRMacIver/53070 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