Git Product home page Git Product logo

sarcasm-detection's Introduction

SARCASM DETECTION

Files:

nlp_report.pdf : Report of the project with all the details related to development.

GetTweets.py - Running this will generate the sarcastic or non sarcastic tweet data based on the query nonsarcasmfull.csv - This contains all the non sarcastic tweet data generated by GetTweets.py sarcasmfull.csv - This contains all the sarcastic tweet data generated by GetTweets.py

preprocess.py - takes the above csv files and preprocesses it and generates clean data nonsarcpreproc.npy - clean non sarcastic tweet data generated by preprocess.py sarcpreproc.npy - clean sarcastic tweet data generated by preprocess.py

feature_extraction.py - Takes an input string and genearates all the feature required for training and testing training.py - takes the clean tweet data files and creates feature set for each tweet and trains it and stores the classifier in the file. classif_all.p - classifier which is trained by the training.py is stored here vecdict.p - This is the dictionary vector object to convert from the lists of feature value to vectors to train or test

sarcasm.py - This is the main program to check sarcasm score. It uses classif_all.p and vecdict.p to to extract featureset from the new input sentence and clasifies to either sarcastic or non sarcastic and gives a quantitative score

Running the program:

$ python sarcasm.py // And enter the input to console to get output score

example: $ python sarcasm.py enter the sentence Donald trump will make america great again 18 enter the sentence Messi is the best footballer in the world -70

sarcasm-detection's People

Contributors

varunmuthanna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

sarcasm-detection's Issues

TypeError: a bytes-like object is required, not 'str'

Hello im trying to run your program on my computer and this error always come up:

Traceback (most recent call last):
File "sarcasm.py", line 25, in
vec = pickle.load(file1)

TypeError: a bytes-like object is required, not 'str'

Ive tried solutions but it still didnt work. My python version is 3.6.2.

Thanks :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.