cancel
Showing results for 
Search instead for 
Did you mean: 

i made a sarcasm detector in python 3

hoppingbunny123
Rising Star

the code is in github here is the video of the code and a demo;

 

https://youtu.be/i1lnN1tIFg0

 

GitHub - dothehokiepokie/mystuffyouknow: my stuff

 

i read about darpa making a sarcasm detector so i tried today too.

29 REPLIES 29


@hoppingbunny123 wrote:

The basic problem is the scientific method needs you to see something to prove methodically.

 

Since you don't see what I see you can't prove it scientifically. 


Hmm, no. Scientifically, your code compiles very specific logic. And that logic in no way detects sarcasm. That is a scientific fact based on the code you provided.

 

 

It's about as valid as saying that "X=Y" is the formula for detecting sarcasm. We can't conclude such a thing to be true based on some misinterpretation of the scientific method.

hoppingbunny123
Rising Star

I see it as a basic math problem.

I count one product the thing I have to prove then the other product the code and results while you see nothing to prove that is summary of our discussion. 

 

 


@hoppingbunny123 wrote:

I see it as a basic math problem.

 

 


Sarcasm is language, not math. You can't use math to solve a linguistic problem. Sarcasm requires language evaluation that involves understanding the definition of words, the structure of a sentence, and the context of a statement.

 

Your code does none of those things.

 

Your code does not detect sarcasm. Your code checks for matching letters, and nothing more.

 

If you want to see it as a math problem, then

X = Letter Matching

Y = Detecting Sarcasm

Z = Your code

 

X <> Y

Z = X

Z <> Y

 

btw, here's a great read on how to actually create a Sarcasm Detector:

https://github.com/anebz/papers#sarcasm-detection

 

Note that you need a proper approach with real tools and methodologies, such as NLP, Language Models, etc.

hoppingbunny123
Rising Star

every real approach needs to come from somebody thinking something up or rationalizing something they can prove but have no proof for.

 

its very easy to not see this so when presented with proof not having anything to prove you see nothing. else you find the product divide that by the proof that is non-zero value, (product/non zero value) as to what was rationalized was seen.

 

its a simple concept.

 

 


@hoppingbunny123 wrote:

every real approach needs to come from somebody thinking something up or rationalizing something they can prove but have no proof for.

 


We can safely conclude, using your code as proof, that your code does not detect sarcasm. The proof is the code itself.

 

Also, if you have no proof for something then you cannot prove it.

hoppingbunny123
Rising Star

i see now. ok.

hoppingbunny123
Rising Star

having a moment to ponder the thread it occurred to me the code you say is bad actually uses the factor multiplied by factor to get a product value. if you do not see how let me explain.

 

on one side of the word is a letter, this is a factor  equivalent.

same for the other side of the word.

same for the letter in the middle of the word.

 

the two factors make a product of the letters being a match the product value is how many matching letters are in a word.

 

thats the code factor, the product is the result is seeing the words with their product values beside them. which when takes with the code points at how this product value shows how sarcastic someone is with their words which is the idea or the idea product.

 

i think all you see is a small part of the algorithm and claim to know everything in the algorithm which is shortsighted.

 

the whole program is a logic that follows the scientific method. if either of the factors have no value to you then thats all there is to it.


@hoppingbunny123 wrote:

having a moment to ponder the thread it occurred to me the code you say is bad actually uses the factor multiplied by factor to get a product value.


I never said the code was "bad," I am merely explaining that the code in no way detects sarcasm. 

 

The "value" that your code produces is simply a value within the range of "0 -> Greater than Zero" in cases where matching letters are found.


Matching letters has nothing to do with detecting sarcasm.

 

 


i think all you see is a small part of the algorithm and claim to know everything in the algorithm which is shortsighted.


I don't claim to know everything, I merely claim to have read all 98 lines of your code, and can conclude from a scientifically factual foundation that there's nothing about the 98 lines that detect sarcasm.

 

This is the output line of your so-called "algorithm"

print("\"" + list_of_words[y] + "\"" + " has this many matching sarcastic letter " + string_count)

 

First of all, there's no such thing as a "sarcastic letter." There are sarcastic statements, but not sarcastic letters.

 

Second, your output line would be more accurate this way:

print("\"" + list_of_words[y] + "\"" + " has this many matching letters " + string_count)

 

Just remove the word "sarcasm" from everything and your code is fine; since all it does is get a count of matching letters, and nothing more.

hoppingbunny123
Rising Star

for the reason i stated i find your opinion to be false. i wont say foolish though but the thought had occurred to me.