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
datafolder. - If training, make changes in file
utils/config.pyif you want. ChangeTRAINING_DATASET_SIZEaccordingly to change the number of training sentences. - Use the
train.ipynbnotebook for training. - If using for test-predictions, download the weights from here and save it in
weightsfolder. - Use
inference.ipynbnotebook.