To directly calculate polarity of a text, run GUI.py-
- Enter text in the first input field, and click on calculate button.
- Lexical Polarity Score and labels from SVM, NB and NN clasifier will be displayed.
- Enter User data into input fields
- Click on insert to insert into sql database dtab.db
To run the training scripts-
- imdb-nn.ipyb: It contains the training code for nueral network.
- imdb-nb.ipyb: It contains the training code for Naive Bayes classifier.
- imdb-svm.ipynb: It contains the training code for Support Vector Machine Classifier.
These scripts generate models and also the saved weights produced during training.
The scripts svm_predict, pred_twitter_kaggle and nb_predict load the saved model from files generated after training.
The scripts nb_realtime, svm_realtime and nn_realtime have functions which use trained weigths to provide prediction for new data.