Sentiment Analysis using simple LSTM and Conv1D layers.
This is model that is used to get the sentiment rating(0-1 range). 0 means bad/worse and 1 means good sentiment.
- Python 3+
- Keras with tensorflow backend
- nvidia gpu (for training purpose as it use CuDNNLSTM layer that is accelerated by CuDNN library by nvidia)
- Numpy
- Fork this repo
- Download the dataset from here .
- Download the GloVe Word embeddings from here.
- Save both data and GloVe embeddings in
data
folder. - If training, make changes in file
utils/config.py
if you want. ChangeTRAINING_DATASET_SIZE
accordingly to change the number of training sentences. - Use the
train.ipynb
notebook for training. - If using for test-predictions, download the weights from here and save it in
weights
folder. - Use
inference.ipynb
notebook.