Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.3 KB

README.md

File metadata and controls

41 lines (26 loc) · 1.3 KB

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