Sentiment analysis is a natural language processing (NLP) technique used to determine whether data is positive, negative. It is applied on text data. This project is a mini project in the Deep Learning Nanodegree at Udacity.
The dataset consists of positive and negative reviews of movie. It is prepared by Udacity.
The high-level steps of the project include:
- Data preprocessing (include tokenization, remove outliers, padding/truncate and split the data)
- Build RNN network (Embedding layer, LSTM layer and fully connected layer)
- Training and testing
- Inference
I test the model with my own reviews, the results are showed below.
- "I really like it!" >> Positive review detected!
- "I really do not like it!" >> Negative review detected.
- Python 3.7
- Numpy
- Torch
- Jupyter Notebook
- Maybe needs to use GPU
The whole project is located in the jupyter notebook file Sentiment_RNN_Exercise.ipynb
, you can use the Anaconda environment to open the Jupyter Notebook and install the requirement.