Skip to content

A simple NLP sentiment analysis model that is trained on sentences from 'imdb', 'amazon', and 'yelp'.

Notifications You must be signed in to change notification settings

salma97/Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment-Analysis

A simple sentiment analysis model:

Layer one: Input layer
Layer two: keras' Embedding layer, note that i used GloVe's pretrained word embeddings
Layer three: Global max pooling
Layer four: 10 neurons Dense layer with relu activation
Layer five: 1 neuron Dense layer with sigmoid activation

Trained on labelled sentences from 'imdb'

Training Accuracy: 1.0000
Testing Accuracy: 0.7680

Trained on labelled sentences from 'amazon'

Training Accuracy: 1.0000
Testing Accuracy: 0.7960

Trained on labelled sentences from 'yelp'

Training Accuracy: 1.0000
Testing Accuracy: 0.8128

SA.py contains the model and the function used for training

demo.py is used for prediction

About

A simple NLP sentiment analysis model that is trained on sentences from 'imdb', 'amazon', and 'yelp'.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages