January 2018
Beginner to intermediate
316 pages
7h 14m
English
The dataset that we will use to achieve this result comes from Kaggle and can be found here at: https://www.kaggle.com/datafiniti/hotel-reviews. It contains over 35,000 distinct reviews of 1,000 different hotels around the world. Our job will be to isolate the text of the reviews and identify topics (what people are talking about). Then, we'll create a machine learning model that can predict/identify the topics of incoming reviews:
First, let's organize our import statements, as follows:
# used for row normalizationfrom sklearn.preprocessing import Normalizer# scikit-learn's KMeans clustering module from sklearn.cluster import KMeans # data manipulation toolimport pandas as pd # import a sentence tokenizer from nltk from ...
Read now
Unlock full access