Skip to content

The main goal of this repository is to obtain the phrases or words from a given sentence which strongly agree to the corresponding sentiment

Notifications You must be signed in to change notification settings

mano3-1/Sentiment-Extraction-from-tweets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

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"

About

The main goal of this repository is to obtain the phrases or words from a given sentence which strongly agree to the corresponding sentiment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published