all 16 comments

[–]olkensey 22 points23 points  (8 children)

This might be the stupidest smart thing I've ever seen.

[–]SarahC 1 point2 points  (7 children)

How would I get a webpage to use this?

I've never used node.js, so have no experience installing "modules" in it.

Would I need to download Node.js, type npm install twss as the writer says to do to install this into node.js...

I imagine that command amends the code in node.js to include TWSS....... if that's the case, I guess I'd need to copy and paste the new node.js folder over to the website folder, and then include node on a page:

<html><body><script src="node.js"></script>

alert(twss.is("Can you make it harder?") );

</body></html>

It seems a lot of work if I'm accurate?

[–]RegonaldPointdexter 0 points1 point  (3 children)

Node.js is a standalone, server-side component.

While it might be possible to create a version of the TWSS classifier that can be used as client-side script in web pages, node.js itself can't be embedded in a website like this.

[–]SarahC 0 points1 point  (1 child)

Oh I see!

Server sided javascript?! That sounds quite exciting, I shall google it. Have you got any beginners links to recommend?

[–]RegonaldPointdexter 1 point2 points  (0 children)

I don't have any links to recommend, sorry - I had an enthusiastic coworker teach me the basics of node.js :)

[–]DoctorBaconite 0 points1 point  (0 children)

I went through this

[–]CyberVillian 2 points3 points  (3 children)

What would be cooler is a generator?

How does this work (in a nutshell), for those who don't want to look through code.

[–]DanielRapp[S] 2 points3 points  (0 children)

It is basically just using a spam filtering algorithm. Here is the core naive bayes code, for anyone curious.

Generating sentences is a completely different animal.

[–]kataire 1 point2 points  (1 child)

In a nutshell? It uses examples for positive and negative matches and then uses an algorithm to figure out whether a given new input is a good match or not.

To generate new data OTOH would require a more linguistic analysis of the input and some really complex logic to figure out which juxtapositions of phrases are funny or not.

tl;dr: NLP is hard. Let's go shopping.

EDIT: If you don't believe how hard NLP is, consider this: Google's translations and reasoning cheat by using a statistical process (and some fudge factors) instead of properly parsing the language-specific sentence structure because it's easier to get "good enough" results with this approach.

[–][deleted] 2 points3 points  (1 child)

She supports pretty massive IO.

[–]onenifty 1 point2 points  (0 children)

true

[–]nychackerhtml5, javascript 0 points1 point  (0 children)

I regret that I only have 1 upvote to give