Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

What is Sentiment Analysis?


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.


Why is sentiment important to measure?

why-is-sentiment-important-to-measure page anchor

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.

sentiment analysis algorithms derive opinion and feelings from unstructured text.

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.


How does sentiment analysis work?

how-does-sentiment-analysis-work page anchor

You can do simple 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(link takes you to an external page)). 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 simple 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(link takes you to an external page) 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:

  • Simple statements — recognizing the positive word in "I enjoy this program"
  • Negation — noting the difference between "this product is great" and "this product is not great"
  • Modifiers — being aware of the emphasis in "I really love this brand"

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!").


How Twilio Can Help Analyze Customer Opinion

how-twilio-can-help-analyze-customer-opinion page anchor

Twilio has partnered with IBM Watson(link takes you to an external page) to feature the Message Sentiment add-on(link takes you to an external page) 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.


_24
{
_24
"code": null,
_24
"message": null,
_24
"results": {
_24
"ibm_watson_sentiment": {
_24
"code": null,
_24
"message": null,
_24
"request_sid": "XRc1479687aadf64c62e6ab2b6e0077a1a",
_24
"result": {
_24
"status": "OK",
_24
"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",
_24
"totalTransactions": "1",
_24
"language": "english",
_24
"docSentiment": {
_24
"mixed": "1",
_24
"score": "-0.24582",
_24
"type": "negative"
_24
}
_24
},
_24
"status": "successful"
_24
}
_24
},
_24
"status": "successful"
_24
}

Sample JSON output from the Twilio Message Sentiment Add-On

Message Sentiment is an easy-to-use 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).


Rate this page: