A sentiment analysis implementation on the Amazon fine food reviews dataset.
In this implementation, i used pretrained word embeddings GloVe 100d as the input of my deep learning model using Bidirectional LSTM.
Created by Ngo Quang Huy @ngoquanghuy99
Email: ngoquanghuy1999lp@gmail.com
label | precision | recall | f1-score | support |
---|---|---|---|---|
0 | 0.79 | 0.73 | 0.76 | 11394 |
1 | 0.95 | 0.96 | 0.96 | 61388 |
accuracy | 0.93 | 72782 |
-
tensorflow>=2.3.1
-
keras>=2.4.3
$ pip3 install -r requirements.txt
$ python train.py
Fine tuning model by changing hyperparameters in config.py
On the assumption that you want to predict directly
$ python test.py --review "this is the worst thing i\'ve ever bought"
Output:
$ 'this is the worst thing i've ever bought' is NEGATIVE 82.63011127710342%