Libraries Used: Scikit-Learn, NLTK, OS, Numpy, pickle
Instructions:
Directories: Put train and test folders in the same directory as the codes.
-
Bernoulli Naive Bayes: Uses two files: BernoulliNaiveClassifier.py as the algorithm class and NB_main.py as the main file. Run the latter for results.
-
NBSVM a novel combination of SVM and Naive Bayes. NBSVMpreprocessing.py is a function file which is used in the NBSVM.py. Run the latter for results.
-
Using Bing Luis Lexicon Features: Submission_Bing_Luis_sentiment.py implements SVM using the aforementioned lexicon. run for results.
-
submission_pipeline_features.py is the comparision between two pipelines for two different methods of feature extraction.
-
Submission_SVM.py is our best and final model producing the results stated in the report.
-
Submission_VADER.py implements the sentiment analysis function of the NLTK library. run for results.
-
Submission_Ensemble.py implements the ensemble method by using voting classifier. run for results.