Skip to content

Sentiment Analysis On Stanford Dataset using State-of-the-Art models (Contextualized Embedding)

Notifications You must be signed in to change notification settings

frozentoad9/SentimentAnalysis

Repository files navigation

Sentiment Analysis

Sentiment analysis neural network trained by fine-tuning BERT, ALBERT, or DistilBERT on the Stanford Sentiment Treebank.

Install requirements

pip install numpy pandas torch transformers

Train model

python train.py --model_name_or_path bert-base-uncased --output_dir my_model --num_eps 2

bert-base-uncased, albert-base-v2, distilbert-base-uncased, and other similar models are supported.

Evaluate the model that you have trained

python evaluate.py --model_name_or_path my_model

Analyze your inputs with the model you have trained

python analyze.py --model_name_or_path my_model

Setup server

pip install flask flask_cors

Run server

python server.py --model_name_or_path my_model

Setup client

cd client
npm install

Run client

cd client
npm run serve

References

  1. https://www.curiousily.com/posts/sentiment-analysis-with-bert-and-hugging-face-using-pytorch-and-python/
  2. https://jalammar.github.io/illustrated-bert/

About

Sentiment Analysis On Stanford Dataset using State-of-the-Art models (Contextualized Embedding)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published