2 MINUTE READ | November 9, 2016
A Simple Look At Natural Language Processing
Quick question: What Is Natural Language Processing?
I’ll save you some time Googling it:
In layman’s terms, it is the processing of real life human communication by computers. It often comes in the form of a human generated text string that is then processed by a computer, and then analyzed in some way. This analysis generally holds the intention of quickly ingesting and understanding the meaning of these strings just as a human would. Essentially NLP scientists are trying to make the Her a reality.
An example of where NLP becomes extremely helpful for the modern day digital marketer is through its application with a social media platform like Twitter. Twitter is a wealth of self reported first party text strings neatly bundled into 140 character count snippets. This makes a perfect starting point for our data set.
Using a package like Tweepy we are able to access the entire universe of tweets through Twitter’s API. Once this is paired with a free NLP package, in our case TextBlob, we can begin to analyze the way people feel about any topic you desire using only a few simple lines of Python*.
For instance during this election cycle you may want to know the average sentiment of your favorite political candidate. After running my script I see that the nation feels relatively positive about electing Morgan Freeman, with an aggregate polarity of .4. The TextBlob package analyzes text strings and gives them a sentiment score ranging from -1 to 1, with -1 being the most negative tweet possible and 1 the most positive. Text strings like “…he is a national treasure” register as a much more positive chunk of text, helping to affect the overall sentiment of people discussing this topic on Twitter.
Though this is a relatively quick and simple look at this vast field of data science, it is important for us as digital marketers to understand there are so many useful applications of this discipline sitting directly in front of us. So get out there, and try it for yourself!
Stay in touch
Subscribe to our newsletter
* If you want to learn more about the nitty gritty with setting up this sentiment analysis check out this video.
Posted by: John Stewart