Skip to content

qew21/sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment Analysis Using Transformer

BERT base model (uncased)

Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper and first released in this repository. This model is uncased: it does not make a difference between english and English.

IMDB Dataset

Large Movie Review Dataset. This is a dataset for binary sentiment classification containing substantially more data than previous benchmark datasets. We provide a set of 25,000 highly polar movie reviews for training, and 25,000 for testing. There is additional unlabeled data for use as well.

Quick start

Train

python train.py 

Predict

python predict.py 

Serve

python server.py 
This film is terrible! predicted result: negative, predicted probability: 0.994263231754303
This film is great! predicted result: positive, predicted probability: 0.9927541613578796
This film is not terrible! predicted result: positive, predicted probability: 0.7570403218269348
This film is not great! predicted result: negative, predicted probability: 0.9897279143333435

Reference

About

Sentiment analysis using transformer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published