Git Product home page Git Product logo

sentiment_analysis's Introduction

Sentiment_analysis

The above model works on a sentiment analysis on 1.4M tweets into 2 classes namely Posititve and Negative.

The embedding can also be downloaded from the same link.

Dependencies:

tensorflow(2.1)

Description:

Download the data and embedding and put them in the manner shown below.

To train the above model run the train.py file inside the codes folder.

You can download the training dataset from the google drive link given here. https://drive.google.com/drive/folders/1JbaMolCoqdWw3hI2Yy0Keu5MLjsK6jyv?usp=sharing

Arrange your directory in the given manner.

Outputs

Next run train.py to train the model which will generate the output_data folder with the tensorboard_logs output_logs and also the pickle tokenizer for inference.The saved_model is also saved in the folder.

Architecture

The model architecture can be seen above.

Prediction:

To predict from a saved model use the predict.py function and to generate the predictions.

Current State:

The model achieves around 80% accuracy with the given architecture and embedding. Increasing the size of the embedding may help generate better results. More embedding files can be dowloaded from the link https://nlp.stanford.edu/projects/glove/

Future Goals:

You can change the embedding file or train your own embedding.That is something to be experimented with.

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.