Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Pre-trained That's-What-She-Said (TWSS) classifier in Ruby
branch: master
Failed to load latest commit information.
data Larger test set, changing default threshold
lib threshold change
script New training data
.gitignore creating files
Gemfile removing jeweler
Gemfile.lock removing jeweler
README.markdown updating readme
Rakefile removing jeweler
twss.gemspec threshold change



Because automation knows no bounds... including lowbrow comedy.

TWSS is a simple Bayes classifer trained off of a


gem install twss


require 'rubygems'
require 'twss'
TWSS("hey, did you resolve that ticket?") # => false
TWSS("not yet, it's taking a while") # => false
TWSS("well hurry up, you're not going fast enough") # => true

You can also adjust the scoring threshold for your comedic customization. The lower the value, the more "obscure" the jokes can be.

TWSS.threshold = 5.0

It's far from perfect, but it's accurate enough to be funny. I'll probably continue tweaking it some (increase the training set size and whatnot). I'm not being all that scientific about, so we'll see :).


There aren't any, other than to laugh.

I made twssbot which is a TWSS IRC bot that uses twss and isaac

I'd love to see some other random applications of twss, but not a twitter bot. For the love of all things good in this world, please don't make a Twitter bot out of this. #ihatetwitterbots

A few things to keep in mind when using this:

  • I coded this on my 20 minute bus ride home from work. Needless to say - it's not robust and probably wrong more than it's right (which in and of itself is funny).
  • The very existence of this gem was intended as a joke. In fact, it's sort of a meta-joke (which should please all you hipster-hackers out there).

Forks, patches, and tests welcome!

Have fun!

Something went wrong with that request. Please try again.