Git Product home page Git Product logo

sentiment-extraction-from-tweets's Introduction

Sentiment-Extraction-from-tweets

The main goal of this repository is to obtain the phrases or words from a given sentence which strongly agree to the corresponding sentiment. For a detailed information about the tweet sentiment extraction problem and XLNet I strongly suggest this medium post written by me.

What is sentiment extraction?

Sentiment extraction is natural language processing task where a sentence and it's corresponding sentiment(whether it is a positive or negaitve or neutral sentence) will be given and model is supposed to extract phrases or set of words which strongly support the given sentiment.

About Data and Task

The data I used in this repository is from kaggle's tweet sentiment extraction challenge.
In each row ,it has text and corresponding sentiment and selected text.
The challenge is to learn a model to map text ,sentiment to selected text.

Method:

We used transformer based models like ALBERT ,XLNET ,ROBERTA to with a CNN head on top.We trained these BERT models along with CNN head using a binary cross entropy model(with 0.1 label smoothing).We tried to predict the start and end indicies ,thereby obtaining the selected text.

Training Strategy:

We used Stratified K-fold method to reduce the variance in the model.

About Metric:

Jacaard metric is used to evaluate the model.Jacaard metric is quiet similar to IOU in computer vision.To know more about the jaccard metric ,I strongly suggest you to take a look at this awesomely written medium post.

Results:

XLNET RESULTS:

Negative :
"negative"
Positive :
"positive"
"positive"
Neutral :
"neutral"

Roberta RESULTS:

Negative :
"negative"
Positive :
"positive"
"positive"
Neutral :
"neutral"

sentiment-extraction-from-tweets's People

Contributors

mano3-1 avatar

Stargazers

 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.