Script to extract keywords from the comments on Airbnb reviews file using NLTK module of Python
- As the csv file contains more than 600,000 records and I am writing the keywords into csv file, this script takes a long time to run.
- So, here I have run the script on a subset of the original file.
- Link to original csv file can be found in the text file.
- Have removed any non english word from the comments
- Can make more use of NLTK Wordnet to discover word collocations
- Spelling correction with Enchant
- Replace negation with antonyms
- After extracting relevant keywords from reviews, sentiment analyasis can be easily carried after creating bag of words, features and featureset with relevant words
- Result of Naive Bayes, scikit learn and other classifiers can be combined with voting to give higher accuracy, AUROC and other estimators of the model