Giter VIP home page Giter VIP logo

nlp_final_project's Introduction

NLP_Final_Project

Sarcasm detection with Logistic Regression and LTSM with Pytorch

This project implements a sarcasm detection model using both Long Short-Term Memory (LSTM) networks and Logistic Regression. The models are trained on the Sarcasm Headlines Dataset from Kaggle to classify headlines as sarcastic or non-sarcastic.

Features Data Preprocessing: Text data is preprocessed using SpaCy for tokenization, lemmatization, and stopword removal.

Word Embeddings: Text is converted to numerical representations using word embeddings for the LSTM model and CountVectorizer for the Logistic Regression model.

LSTM Model: An LSTM network is employed to capture temporal dependencies in the text data.

Logistic Regression: A baseline model is implemented using logistic regression.

PyTorch Implementation: The LSTM model is built and trained using PyTorch, leveraging its powerful neural network capabilities.

Evaluation: The models' performance is evaluated using accuracy metrics on a test set.

Dataset The Sarcasm Headlines Dataset is sourced from Kaggle and contains headlines labeled as sarcastic or non-sarcastic. The dataset is preprocessed to remove stopwords and lemmatize words.

google colab link: https://colab.research.google.com/drive/1VDaJDApyivwcHDjhnnhI5JAXNQb8fQu0?usp=sharing

nlp_final_project's People

Contributors

kanatello7 avatar

Watchers

 avatar

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.