Sentiment Analysis

Overview

Sentiment Analysis is the process of computationally identifying and categorizing opinions expressed in an article or text. This helps to determine whether the writer’s attitude towards a particular topic, product, etc. is positive, negative, or neutral.

Businesses today are connected with their customers through different channels like social, blogs, e-commerce sites, etc. Customers typically express their experience in reviews about the product over such different channels. It’s critical for the business to analyze these reviews and drive analytics to drive product future.

Sample Review:
Great value smartphone! Good camera & picture quality. Easy to use Android system. Good battery life. There is no external SD slot is a big issue for me. Amazon did a great job getting it to me quickly. I am not able to install new apps because of insufficient Storage.

AmplifyReach Catalyst Platform scans the above text and provides an overall sentiment for the customer review as “positive”. It also does a detailed analysis of each statement and provides sentiment and feature for each statement individually.

Analysis:
Overall: Positive
Statement: Great value smartphone!
Sentiment: Positive
Feature: value phone

Statement: Good battery life.
Sentiment: Positive
Feature: battery

Statement: There is no external SD slot is a big issue for me.
Sentiment: Negative
Feature: SD slot

Sentiment Analysis Using Catalyst UI

  • Goto AmplifyReach Dashboard -> Bot Studio -> Left Navigation Sidebar
  • Select Core Services >Sentiment Analysis.
  • Enter text for Sentiment Analysis. 
  • Press Analyze button.
  • Sentiment analysis results will be shown.
  • For Developers, you can view JSON by clicking </> View JSON on right corner.

Sentiment Analysis Using Catalyst API

 Tip: Register your account on AmplifyReach and contact us at kick-start@amplifyreach.com to get Developer ID and Access Token.

URL & Objects

The following URLs are available.

URLDescription
PUT /textanalysis/v1/sentimentAnalysisPut Articles or Text for Sentiment Analysis.
GET /textanalysis/v1/sentimentAnalysis/{UID}Get Sentiment Analysis from Articles or Text.

PUT /textanalysis/v1/sentimentAnalysis

PUT https://apps.amplifyreach.com/textanalysis/v1/sentimentAnalysis

Headers:

NameDescription
Content-Typeapplication/json
authTokenYOUR_DEVELOPER_ACCESS_TOKEN
cidYOUR_DEVELOPER_ID

cURL-PUT Request for Text Request

curl \
-H “Content-Type: application/json” \
-H “cid:” \
-H “authtoken:” \
-X PUT \
-d ‘{“text”:””}’ \
https://apps.amplifyreach.com/textanalysis/v1/sentimentAnalysis

Put Response

The sentiment analysis put API response JSON structure.

NameTypeDescription
statusStringRequest Status (Reference: Status & Error Codes).
uidStringUID is unique request identifier ID which to get result in Get API.

Example: PUT Response

{   "status":"success",   
    "uid":"4f057e01d88ff7aa82a8610dc651e8fe",   
    "license":"By accessing AmplifyReach or using information generated by AmplifyReachAPI, 
    you are agreeing to be bound by the AmplifyReach Terms of Use."
}

GET /textanalysis/v1/sentimentAnalysis/{UID}

GET https://apps.amplifyreach.com/textanalysis/v1/sentimentAnalysis/{UID}

NameDescription
Content-Typeapplication/json
authTokenYOUR_DEVELOPER_ACCESS_TOKEN
cidYOUR_DEVELOPER_ID

cURL-GET Request for UID Request

curl \
-H "Content-Type: application/json" \
-H "cid:<YOUR_DEVELOPER_ID>" \
-H "authtoken:<YOUR_DEVELOPER_ACCESS_TOKEN>" \
-X GET \
https://apps.amplifyreach.com/textanalysis/v1/sentimentAnalysis/{UID}

Sentiment Analysis Object

The sentiment analysis response JSON structure.

NameTypeDescription
statusStringRequest Status (Reference:  Status & Error Codes ).
accuracyDoubleConfidence score return by AmplifyReach Platform. It will be 0 to 100
resultStringSentiment Result of Text (Positive, Negative or Neutral)
summaryStringSummarized text of Input Text.
textStringInput Text which is given to Sentiment Analysis.
linkArray Of StringFound links in input text.
emailArray Of StringFound email in input text.
inDepthJSONArray Of ObjectArray of Multiple feature.
inDepth.resultStringSentiment Result of Text (Positive, Negative or Neutral).
inDepth.featureStringFeature name which are detected.
inDepth.textStringRelated text about particular feature.
profanityJSONArray
profanity.dirtyDoubleDirty profanity indicated by range between 0 to 100.
profanity.strongDoubleStrong profanity indicated by range between 0 to 100.
profanity.mildDoubleMild profanity indicated by range between 0 to 100.
profanity.sexualDoubleSexual profanity indicated by range between 0 to 100.
profanity.excretoryDoubleExcretory profanity indicated by range between 0 to 100.

Example: Profanity Object

{
      "result": "Positive",
      "summary": "Great value smartphone! Good camera & picture quality. Easy to use Android system. Good battery life. There is no external SD slot is a big issue for me. Amazon did a great job getting it to me quickly.",
      "link": [],
      "accuracy": 99.99993886651386,
      "text": "Great value smartphone! Good camera & picture quality. Easy to use Android system. Good battery life. There is no external SD slot is a big issue for me. Amazon did a great job getting it to me quickly. I am not able to install new apps because of insufficient Storage. ",
      "profanity": {
         "dirty": 0,
         "strong": 0,
         "excretory": 0,
         "mild": 0,
         "sexual": 0
      },
      "id": "6c66b75ed9e156ae0d053c231b907af4",
      "type": 0,
      "email": [],
      "status": "success",
      "inDepth": [
         {
            "result": "Positive",
            "feature": "Easy",
            "text": "Easy to use android system."
         },
         {
            "result": "Positive",
            "feature": "camera picture",
            "text": "Good camera & picture quality."
         },
         {
            "result": "Negative",
            "feature": "SD slot",
            "text": "There is no external SD slot is a big issue for me."
         },
         {
            "result": "Positive",
            "feature": "battery",
            "text": "Good battery life."
         },
         {
            "result": "Positive",
            "feature": "Amazon",
            "text": "Amazon did a great job getting it to me quickly."
         },
         {
            "result": "Positive",
            "feature": "value phone",
            "text": "Great value smart phone!"
         }
      ]
}