Giter Club home page Giter Club logo

tweet-sentiment-analysis's Introduction

Tweet Sentiment Analysis

Collaborated with two team members to build models based on Long Short-Term Memory (LSTM) and Bidirectional Encoder Representations from Transformers (BERT) to predict the overall sentiment (positive, negative, or neural) in tweet dataset, and compare the results. I focused on the LSTM model implementation. Used a training dataset with 27471 tweets and testing dataset with 3534 tweets from Kaggle. Achieved training accuracy up to 88%.

Skills: LSTM, BERT, Keras, Pandas, sci-kit learn, Google Colab

Data Preprocessing

a. Remove all rows containing null values.
b. Remove all punctuations and special symbols except those that are meaningful for sentiment extraction (For example: **** in the sentence of "Son of ****" helps us predict the sentiment as negative.). As a result, we can obtain more precise training result.
c. Convert all characters to lower case so the same letter with different cases will be seen as the same.
d. Tokenize every tweet into separate word using the tokenizer in the deep learning library Keras.
e. Convert distinct words and labels into numeric values (for example: ‘son’, ‘you’, ‘whether’ are converted to number 1, 2,3). Note: we combine the distinct tokenized words in training set and test set before converting them to numbers in order to make sure these 2 data sets have same dimensions of tokenized text.

Report









tweet-sentiment-analysis's People

Contributors

sunnyhuang101 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.