Skip to content

Instantly share code, notes, and snippets.

@tylor
Created January 9, 2012 06:57
Show Gist options
  • Save tylor/1581579 to your computer and use it in GitHub Desktop.
Save tylor/1581579 to your computer and use it in GitHub Desktop.
Try DanielRapp/twss.js against The Office
true - How about a big round of applause for Mr. Dwight Schrute. This is huge.
true - Come on, let's gangbang this thing and go home.
true - Hold it in your mouth if you can't swallow.
true - It was easy to get in but impossible to rise up.
false - And you were directly under her the entire time?
true - Come again.
true - I need two men on this.
false - You're hardly my first.
true - The thought of popping one of your beets into my mouth makes me want to vomit.
true - Does the skin look red and swollen.
true - I can’t stay on top of you 24/7.
true - At least we put this matter to bed.
true - Man, that thing’s bigger than I am.
true - You already did me.
true - They taste so good in my mouth.
true - Oscar, would you reach over and touch his thing.
true - ...his thing is so small. If it were an iPod it would be a shuffle.
true - Wow, that is really hard. You really think you can go all day long? Well, you always left me satisfied and smiling.
true - My mother’s coming.
false - He gets very excited, but he’s also under a lot of pressure, which builds up until he’s ready to explode…it’s my job to release that pressure, so he can enjoy himself, if only for a moment.
Accuracy: 0.85
// https://github.com/DanielRapp/twss.js
var twss = require('twss');
// From: http://twssstories.com/theoffice
var data = [ "How about a big round of applause for Mr. Dwight Schrute. This is huge."
, "Come on, let's gangbang this thing and go home."
, "Hold it in your mouth if you can't swallow."
, "It was easy to get in but impossible to rise up."
, "And you were directly under her the entire time?"
, "Come again."
, "I need two men on this."
, "You're hardly my first."
, "The thought of popping one of your beets into my mouth makes me want to vomit."
, "Does the skin look red and swollen."
, "I can’t stay on top of you 24/7."
, "At least we put this matter to bed."
, "Man, that thing’s bigger than I am."
, "You already did me."
, "They taste so good in my mouth."
, "Oscar, would you reach over and touch his thing."
, "...his thing is so small. If it were an iPod it would be a shuffle."
, "Wow, that is really hard. You really think you can go all day long? Well, you always left me satisfied and smiling."
, "My mother’s coming."
, "He gets very excited, but he’s also under a lot of pressure, which builds up until he’s ready to explode…it’s my job to release that pressure, so he can enjoy himself, if only for a moment."
];
var test = null;
var positives = 0;
var length = data.length;
for (var i = 0; i < length; i++) {
test = twss.is(data[i]);
if (test === true) {
positives++;
}
console.log(test + ' - ' + data[i]);
}
console.log('Accuracy: ' + positives/length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment