16 ms·
Twss.js
- yuvadam 15y agoA while back I was interested in implementing a much less naive algorithm for classifying TWSS expressions, based on this [1] paper. Never actually got around to finishing the work. Interesting problem though, and nice work. [1] - http://www.cs.washington.edu/homes/brun/pubs/pubs/Kiddon11.pdf http://www.cs.washington.edu/homes/brun/pubs/pubs/Kiddon11.p...
- TwistedWeasel 15y agoSoon to be implemented in all IRC bots the world over
- asm89 15y agoThere was a similar project before that implemented this for an IRC bot. You can also train this bot by telling it what jokes are good and bad ones. :) https://github.com/jsocol/scottbot https://github.com/jsocol/scottbot http://coffeeonthekeyboard.com/say-hi-to-scottbot-594/ http://coffeeonthekeyboard.com/say-hi-to-scottbot-594/
- jarek 15y agoOur IRC bot had this feature before it was popular...
- tibbon 15y agoI've never had a script do that for me
- deleted 15y ago[deleted]
- emehrkay 15y agotwss?
- tibbon 15y agoNow I'm just waiting for someone to make a Twitter bot that randomly samples tweets and responds to them with this...
- hanula 15y agohttp://twitter.com/Michael_Scott http://twitter.com/Michael_Scott here's agent Michael Scarn's friend, although not very active recently.
- sc00ter 15y agoAlready done (and undone) it would seem: https://github.com/DanielRapp/twss.js/commit/d025aa46eef855927256dbaba97dfe6ed06ccddd#diff-2 https://github.com/DanielRapp/twss.js/commit/d025aa46eef8559...
- mattspitz 15y agoThere's this, too. http://yepthatswhatshesaid.com http://yepthatswhatshesaid.com It randomly samples tweets for training, but it doesn't write back automatically. If you find one you like on the site, though, you can tweet it. </shamelessselfpromotion>
- corin_ 15y agoWould interest me much more if you open sourced it, are you already decided on not doing so? edit: I see you do actually have it at https://github.com/mattspitz/yepthatswhatshesaid https://github.com/mattspitz/yepthatswhatshesaid - is it up to date? Thanks for sharing!
- ecaron 15y agoI tried to do this last year, but every single twss-related handle was taken. Don't believe me, look for yourself. I can't wait for the day when Twitter starts reclaiming unusued/squatted names (and have a pay for service that let's you claim it for life.)
- phreeza 15y agoHas anyone thrown this on a web server with a simple interface?
- dangrossman 15y agoSure, why not -- http://pulse.w3counter.com:8080/ http://pulse.w3counter.com:8080/
- hawtshot 15y agoIt seems to be returning a lot of false positives, at least with the default options. "Good morning" = true, "How are you?" = true
- dangrossman 15y agoI tried adding dropdowns to change the algorithm and threshold, but changing to knn crashes out ("ReferenceError: trainingPrompt is not defined"), so scrapped that and just left the demo running the defaults.
- svdad 15y ago"Capitalism without failure isn't capitalism." That's what she said.
- LeafStorm 15y agoBased on my linear algebra homework: > "You need to use Gauss-Jordan elimination." > That's what she said.
- johndoie 15y ago> That's That's what she said.
- blahpro 15y agoRelated: http://www.quora.com/How-would-you-programmatically-parse-a-sentence-and-decide-whether-to-answer-thats-what-she-said http://www.quora.com/How-would-you-programmatically-parse-a-...
- tnorthcutt 15y agoI've seen a Siri proxy TWSS implementation: http://www.youtube.com/watch?v=p4LamngB070 http://www.youtube.com/watch?v=p4LamngB070
- mertd 15y agoThe training data is pretty funny. I suppose he collected it from an online TWSS thread.
- Rapp 15y agoI scraped the last sentence of pretty much all posts on http://twssstories.com http://twssstories.com and tweets that was replied with "that's what she said". Though it's currently using just twssstories data.
- burgerbrain 15y ago@Rapp You seem to have been hellbanned 132 days ago.
- Rapp 15y ago@burgerbrain Thank you for letting me know! Is there anything I can do about it?
- bjornsteffanson 15y agoThis is probably the first time I've understood node.js.
- adam_albrecht 15y agoWell that open source project left me satisfied and smiling
- zeratul 15y agoDanielRapp: in file twss.js/lib/classifier/knn.js, number of NN should be odd to prevent ties [EDIT: also, NN should be large enough to prevent over-fitting; small NN would mean that the difference (decision boundary) between twss and not-twss is highly non-linear; you need to implement cross-validation to find best NN] Note to self: machine learning using node.js; what's the speed of calculations, what's the memory management in node.js, can I find pure JS implementation of SVM?
- DanielRapp 15y agoThanks. I did do a simple analysis[1] and changed it[2] to 5 neighbors. Though when I look at the graph now, I see that 4 is actually the optimal value.. Swedish graph (täckning = recall): http://cl.ly/BJRa/pr.png http://cl.ly/BJRa/pr.png [1] https://github.com/DanielRapp/twss.js/blob/master/lib/analyze.js#L16 https://github.com/DanielRapp/twss.js/blob/master/lib/analyz... [2] https://github.com/DanielRapp/twss.js/commit/3cfcda78558308473f1bc1ee9fcd010371deb2a3 https://github.com/DanielRapp/twss.js/commit/3cfcda785583084...
- zeratul 15y agoWhy don't you try 10-fold CV (http://en.wikipedia.org/wiki/Cross-validation_%28statistics%29 http://en.wikipedia.org/wiki/Cross-validation_%28statistics%...) - the graph might drastically change. Here is example how to do it: https://onlinecourses.science.psu.edu/stat857/book/export/html/21 https://onlinecourses.science.psu.edu/stat857/book/export/ht... If precision & recall monotonically go down when increasing NN then it means you don't have enough training data.
- driverdan 15y agoAn interesting (and funny) exercise. For those interested in neural networks and Bayesian classifiers check out the brain.js library: http://harthur.github.com/brain/ http://harthur.github.com/brain/ It works in both node and the browser.
- mckoss 15y agoMRI's have shown that humans are able to do this because of a dedicated site in the brain called "Scott's region". Once activated, this linguistic region is constantly searching for linguistic cues, surfacing signals to our conscious thoughts when the cues are strong enough.
- donohoe 15y agoI'm still looking for a classifier that will take a phrase, determine if and what the "In Soviet Russia X Y you" response would be. Anyone?
- samg_ 15y agoI don't think that would be a classifier, or at least not reasonably. You could have "In Soviet Russie X Y you" for each X,Y as your classes, but that would be unreasonable. Yakov Smirnoff is a structural joke. You would need to parse sentences, pattern match, transform it, and then do some kind of regression on the phrase to get its humor quotient. The Stanford Parser for structural parsing, then some custom pattern matching and transforming code, might get you somewhere.
- aidenn0 15y agoA first approximation might just taking the simple permutation's such as You can X Y <-> Y X you and find the probability that it is an english sentence
- Zelphyr 15y agoWhile it seems on the surface like a waste of time (albeit amusing one), I actually expect this is a great project to learn from because of its use of Bayesian classifiers. In other words, I'm TOTALLY going to be using this on my next project.
- aithleyadeno 15y agogoo.gl/39SLa
- deleted 15y ago[deleted]
- TWSS 15y agoI approve this post.
- notb 15y agoI think your negative sample set is a little biased. Since all the phrases start with verbs like "was in the car" or "went to the park", these kinds of phrases are given lower probabilities. For example: > twss.prob("was on a stiff pole"); 0.016050826334564946 Only 1.6% chance of that's what she said?!? EDIT: Counter example: > twss.prob("that's one stiff pole"); 0.9767718880285885
- deleted 15y ago[deleted]
- loganlinn 15y agoLooks like this could easily be integrated into a script for Hubot
- radikalus 15y agoGreat start -- interesting to watch it go vs the twitter stream. (If you restrict to < 8 word tweets)
- tlrobinson 15y agoWhat exactly is Node.js specific about this?
- ricardobeat 15y agoUsing exports, NPM package, and an executable that depends on /usr/bin/node? What's your point?
- tlrobinson 15y agoI just hate when people release JavaScript libraries that needlessly depend on specific platforms. For awhile that dependency was usually jQuery, then with the rise of server-side JavaScript it was the DOM in general, now it appears to be Node.js. Just write "X for JavaScript", dammit. That said, this doesn't appear to have any Node.js specific dependencies, it could be used in any CommonJS environment.
- DanielRapp 15y agoThe reason I chose node over "browser-js" is because it was originally going to be a Twitter bot, but decided to simplify the GitHub repo into just a node module to make it more useful. But you're totally correct. This could've easily be written in any language.
- ricardobeat 15y agoThe source is open and it is really easy to port it to the browser, so this shouldn't warrant a complaint. Each one works with what he feels more comfortable with.
- jfriedly 15y agoWe made our IRC bot respond to TWSS jokes, but ours was just a dumb match from a set of few thousand jokes that we scraped from offline. You can look at the code at: https://github.com/jfriedly/jenni https://github.com/jfriedly/jenni Now that I took Stanford's Machine Learning class though, I think I might just duplicate what this guy did for our bot.
- deleted 15y ago[deleted]
- VolatileVoid 15y agoI was wondering if anyone knew of a place where I could learn about this stuff in general. I know nothing about unigrams, bigrams, trigrams, tf-idf, Bayesian filtering, etc. Maths - while not awful - is not my strongest point, but I think I could grok a well-written tutorial to this stuff (with code examples!). I was hoping/wondering if anyone knew of sites I could start learning about this from? I find this very interesting, and I'm sure it could be highly useful and applicable to many different types of problems...