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.
URL | Description |
---|---|
PUT /textanalysis/v1/sentimentAnalysis | Put 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:
Name | Description |
---|---|
Content-Type | application/json |
authToken | YOUR_DEVELOPER_ACCESS_TOKEN |
cid | YOUR_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.
Name | Type | Description |
---|---|---|
status | String | Request Status (Reference: Status & Error Codes). |
uid | String | UID 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}
Name | Description |
---|---|
Content-Type | application/json |
authToken | YOUR_DEVELOPER_ACCESS_TOKEN |
cid | YOUR_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.
Name | Type | Description |
---|---|---|
status | String | Request Status (Reference: Status & Error Codes ). |
accuracy | Double | Confidence score return by AmplifyReach Platform. It will be 0 to 100 |
result | String | Sentiment Result of Text (Positive, Negative or Neutral) |
summary | String | Summarized text of Input Text. |
text | String | Input Text which is given to Sentiment Analysis. |
link | Array Of String | Found links in input text. |
Array Of String | Found email in input text. | |
inDepth | JSONArray Of Object | Array of Multiple feature. |
inDepth.result | String | Sentiment Result of Text (Positive, Negative or Neutral). |
inDepth.feature | String | Feature name which are detected. |
inDepth.text | String | Related text about particular feature. |
profanity | JSONArray | |
profanity.dirty | Double | Dirty profanity indicated by range between 0 to 100. |
profanity.strong | Double | Strong profanity indicated by range between 0 to 100. |
profanity.mild | Double | Mild profanity indicated by range between 0 to 100. |
profanity.sexual | Double | Sexual profanity indicated by range between 0 to 100. |
profanity.excretory | Double | Excretory 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!"
}
]
}