Skip main navigation

Using Text Analytics

A lot of data is available from customer ratings of Airbnb properties. Watch Raj explain how to mine that text--not numeric--data.
So let’s start this analytics process. After the mental model we’d looking at reviews. Now one of the interesting things about this review data is that it’s all text. It’s not numbers. Now, when you put numbers into a mathematical model it’s easier. It’s and- it’s easier for the model to understand. Now, how do you put text into a mathematical model or predictive model to make it to understand text. Well the issue is predictive models don’t understand text data. You have to process this text data and convert it into a number. And that’s what we’re going to look at. And it’s commonly called as text analytics and we’re not going to delve deeper into this.
That would be an advance marketing analytics course but we will give you an intuition as to how that happens. So let’s look at the intuition for this text analytics that we need to do here. Now I looked up one of the reviews that Fred had and I put that review up here. And what we’re going to look at the first thing is a positive review. And that’s what- let’s look at that first. Now it says here Fred is a great host. Everything was perfect. The flat is amazing, location is in a quiet area near the subway. I definitely come back here. So some of the things you may notice is that this is a real review.
So you know Truth is stranger than fiction. There are going to be grammatical mistakes and all of this that the computer has to understand and that are software like R and other things that use all of this text data and convert it into something called a review sentiment. And if you send this text into R and into this function it give you a number. And that’s what we’re going to say. So how does that work. Now the first thing to see is what are the good words. What are the positive words in this review. It is great. Perfect. Amazing quiet. And another thing to notice is there are no bad words in this review.
So the review sentiment score is positive at 1.22. So it’s a good review. So higher the review sentiments score the more positive the review. Now what I did was dig this review and really manually bent and changed some of the words to make it bad so that we can see if the function actually spits out a lower number if we give a bad review. What I did was go in and changed great to bad host, everything was horrible. Flat is dirty but I still kept some good words like great and quiet. Now when I send this into R, I get a review of sentiment’s score of -0.36. Now compare this to the positive score of 1.22.
So you see that the program is able to take all the stacks and if it see some bad words converted into a review sentiment’s score that is of a lower value. And if it sees only positive scores it can then convert it into a review sentiments score of a positive value. Now what if, we change this into a really bad review score that would give a score of maybe -1.22. So you would take for each of the property all the reviews that is good run it through a code in R and come up with this review sentiments score and you can take that data and then plug it into a predictive model. And that’s what we’re going to see next.

Text analytics–the ability to interpret unstructured text to find patterns and trends–allows marketers to learn from product ratings, editorials, social media posts, etc. Learn how sentiment analysis works in this video.

Then head to the discussions. Where do you see opportunities for using text analytics?

This article is from the free online

Marketing Analytics

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education