Sentiment Analysis, or opinion mining, is the process of determining whether language reflects positive, negative, or neutral sentiment. Using sentiment algorithms, developers and brand managers can gain insights into customer opinions about a topic.
Customer opinion can make or break a brand's success, and the decision to monitor it can mean the difference between a well-timed course correction or a missed opportunity. Sentiment can also inform marketing and product strategy by revealing chances to reframe the customer experience.
Automated sentiment analysis is a powerful tool for gauging customer opinion at scale. Rather than relying on humans to read and evaluate large volumes of text, an algorithm can process and score sentiment rapidly and efficiently.
You can do sentiment analysis by setting up a dictionary-based model. First, create a set of predetermined words with positive and negative values (or find a pre-made dictionary). Then, write a function that parses text, checks for the presence of those words, and uses the preset sentiment values to calculate the overall sentiment of the text. You can layer on additional functionality by including regular expressions and additional code to check for patterns that resemble sentence structures. This rule-based approach can be quick to implement but may require significant work to derive a nuanced analysis.
Machine learning (ML) algorithms such as the Naive Bayes Classifier can be used for a more data-driven approach to opinion mining. These models are fed sample datasets and trained to recognize positive, negative, and neutral opinions when they encounter a new piece of text.
Most comprehensive sentiment algorithms will cover:
Advanced approaches can discern the subject and object of opinions, parse complex statements ("I used to prefer shopping in-person, but now I love buying online"), and account for slang ("that move was really sick!").
Twilio has partnered with IBM Watson to feature the Message Sentiment Add-on for Programmable SMS. When activated, this Add-on can be used to track opinion across incoming SMS and can be used in support of customer surveys or other feedback-gathering tools.
1{2"code": null,3"message": null,4"results": {5"ibm_watson_sentiment": {6"code": null,7"message": null,8"request_sid": "XRc1479687aadf64c62e6ab2b6e0077a1a",9"result": {10"status": "OK",11"usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",12"totalTransactions": "1",13"language": "english",14"docSentiment": {15"mixed": "1",16"score": "-0.24582",17"type": "negative"18}19},20"status": "successful"21}22},23"status": "successful"24}
Sample JSON output from the Twilio Message Sentiment Add-On
Message Sentiment is a tool for mining insights from unstructured message data. IBM Watson's Natural Language Understanding service is capable of advanced text analysis. The sophisticated algorithm reads text from inbound customer messages, looks for words and phrases indicating sentiment, and scores each message as positive, negative, or mixed. It's smart enough to understand negation and modifiers and speaks seven languages (with more in development).