Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

Amazon Comprehend Targeted Sentiment adaugă suport sincron

Mai devreme anul asta, Amazon Comprehend, un serviciu de procesare a limbajului natural (NLP) care utilizează învățarea automată (ML) pentru a descoperi informații din text, launched the Targeted Sentiment feature. With Targeted Sentiment, you can identify groups of mentions (co-reference groups) corresponding to a single real-world entity or attribute, provide the sentiment associated with each entity mention, and offer the classification of the real-world entity based on a listă predeterminată de entități.

Today, we’re excited to announce the new synchronous API for targeted sentiment in Amazon Comprehend, which provides a granular understanding of the sentiments associated with specific entities in input documents.

In this post, we provide an overview of how you can get started with the Amazon Comprehend Targeted Sentiment synchronous API, walk through the output structure, and discuss three separate use cases.

Cazuri de utilizare a sentimentelor vizate

Real-time targeted sentiment analysis in Amazon Comprehend has several applications to enable accurate and scalable brand and competitor insights. You can use targeted sentiment for business-critical processes such as live market research, producing brand experience, and improving customer satisfaction.

The following is an example of using targeted sentiment for a movie review.

“Movie” is the primary entity, identified as type movie, and is mentioned two more times as “movie” and the pronoun “it.” The Targeted Sentiment API provides the sentiment towards each entity. Green refers to a positive sentiment, red for negative, and blue for neutral.

Traditional analysis provides sentiment of the overall text, which in this case is mixed. With targeted sentiment, you can get more granular insights. In this scenario, the sentiment towards the movie is both positive and negative: positive in regards to the actors, but negative in relation to the overall quality. This can provide targeted feedback for the film team, such as to exercise more diligence in script writing, but to consider the actors for future roles.

Prominent applications of real-time sentiment analysis will vary across industries. It includes extracting marketing and customer insights from live social media feeds, videos, live events, or broadcasts, understanding emotions for research purposes, or deterring cyberbullying. Synchronous targeted sentiment drives business value by providing real-time feedback within seconds so that you can make decisions in real time.

Let’s take a closer look at these various real-time targeted sentiment analysis applications and how different industries may use them:

  • Scenariul 1 – Opinion mining of financial documents to determine sentiment towards a stock, person, or organization
  • Scenariul 2 – Real-time call center analytics to determine granular sentiment in customer interactions
  • Scenariul 3 – Monitoring organization or product feedback across social media and digital channels, and providing real-time support and resolutions

În secțiunile următoare, discutăm mai detaliat fiecare caz de utilizare.

Scenario 1: Financial opinion mining and trading signal generation

Sentiment analysis is crucial for market-makers and investment firms when building trading strategies. Determining granular sentiment can help traders infer what reaction the market may have towards global events, business decisions, individuals, and industry direction. This sentiment can be a determining factor on whether to buy or sell a stock or commodity.

To see how we can use the Targeted Sentiment API in these scenarios, let’s look at a statement from Federal Reserve Chair Jerome Powell on inflation.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

As we can see in the example, understanding the sentiment towards inflation can inform a buy or sell decision. In this scenario, it can be inferred from the Targeted Sentiment API that Chair Powell’s opinion on inflation is negative, and this is most likely going to result in higher interest rates slowing economic growth. For most traders, this could result in a sell decision. The Targeted Sentiment API can provide traders faster and more granular insight than a traditional document review, and in an industry where speed is crucial, it can result in substantial business value.

The following is a reference architecture for using targeted sentiment in financial opinion mining and trading signal generation scenarios.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

Scenario 2: Real-time contact center analysis

A positive contact center experience is crucial in delivering a strong customer experience. To help ensure positive and productive experiences, you can implement sentiment analysis to gauge customer reactions, the changing customer moods through the duration of the interaction, and the effectiveness of contact center workflows and employee training. With the Targeted Sentiment API, you can get granular information within your contact center sentiment analysis. Not only can we determine the sentiment of the interaction, but now we can see what caused the negative or positive reaction and take the appropriate action.

We demonstrate this with the following transcripts of a customer returning a malfunctioning toaster. For this example, we show sample statements that the customer is making.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai. Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai. Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai. Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

As we can see, the conversation starts off fairly negative. With the Targeted Sentiment API, we’re able to determine the root cause of the negative sentiment and see it’s regarding a malfunctioning toaster. We can use this information to run certain workflows, or route to different departments.

Through the conversation, we can also see the customer wasn’t receptive to the offer of a gift card. We can use this information to improve agent training, reevaluate if we should even bring up the topic in these scenarios, or decide if this question should only be asked with a more neutral or positive sentiment.

Lastly, we can see that the service that was provided by the agent was received positively even though the customer was still upset about the toaster. We can use this information to validate agent training and reward strong agent performance.

The following is a reference architecture incorporating targeted sentiment into real-time contact center analytics.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

Scenario 3: Monitoring social media for customer sentiment

Social media reception can be a deciding factor for product and organizational growth. Tracking how customers are reacting to company decisions, product launches, or marketing campaigns is critical in determining effectiveness.

We can demonstrate how to use the Targeted Sentiment API in this scenario by using Twitter reviews of a new set of headphones.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai. Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

In this example, there are mixed reactions to the launch of the headphones, but there is a consistent theme of the sound quality being poor. Companies can use this information to see how users are reacting to certain attributes and see where product improvements should be made in future iterations.

The following is a reference architecture using the Targeted Sentiment API for social media sentiment analysis.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

Get started with Targeted Sentiment

To use targeted sentiment on the Amazon Comprehend console, complete the following steps:

  1. În consola Amazon Comprehend, alegeți Lansați Amazon Comprehend.
    Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.
  2. Pentru Introdu textul, enter any text that you want to analyze.
  3. Alege Analiza.
    Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

After the document has been analyzed, the output of the Targeted Sentiment API can be found on the Sentiment țintit filă din Insights section. Here you can see the analyzed text, each entity’s respective sentiment, and the reference group it’s associated with.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

În Integrarea aplicației section, you can find the request and response for the analyzed text.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.

Programmatically use Targeted Sentiment

To get started with the synchronous API programmatically, you have two options:

  • detect-targeted-sentiment – This API provides the targeted sentiment for a single text document
  • batch-detect-targeted-sentiment – This API provides the targeted sentiment for a list of documents

You can interact with the API with the Interfața liniei de comandă AWS (AWS CLI) or through the AWS SDK. Before we get started, make sure that you have configured the AWS CLI, and have the required permissions to interact with Amazon Comprehend.

The Targeted Sentiment synchronous API requires two request parameters to be passed:

  • LanguageCode – The language of the text
  • Text or TextList – The UTF-8 text that is processed

The following code is an example for the detect-targeted-sentiment API-uri:

{
"LanguageCode": "string", 
"Text": "string"
}

The following is an example for the batch-detect-targeted-sentiment API-uri:

{

"LanguageCode": "string", 
"TextList": ["string"]

}

Now let’s look at some sample AWS CLI commands.

The following code is an example for the detect-targeted-sentiment API-uri:

aws comprehend 
--region us-east-2 
detect-targeted-sentiment  
--text "I like the burger but service was bad" 
--language-code en

The following is an example for the batch-detect-targeted-sentiment API-uri:

aws comprehend 
--region us-east-2 
batch-detect-targeted-sentiment 
--text-list "We loved the Seashore Hotel! It was clean and the staff was friendly. However, the Seashore was a little too noisy at night." "I like the burger but service is bad" 
--language-code en

The following is a sample Boto3 SDK API call:

import boto3
import subprocess

session = boto3.Session()
comprehend_client = session.client(service_name='comprehend', region_name='us-east-2')

Următorul este un exemplu de detect-targeted-sentiment API-uri:

response = comprehend_client.detect_targeted_sentiment(
LanguageCode='en',
Text = "I like the burger but service was bad"
)
print(response)

Următorul este un exemplu de batch-detect-targeted-sentiment API-uri:

response = comprehend_client.batch_detect_targeted_sentiment(
    LanguageCode='en',
    TextList = ["I like the burger but service was bad","The staff was really sweet though"]
)

For more details about the API syntax, refer to the Ghidul dezvoltatorului Amazon Comprehend.

Structura de răspuns API

API-ul Targeted Sentiment oferă o modalitate simplă de a consuma rezultatul joburilor dvs. Oferă o grupare logică a entităților (grupuri de entități) detectate, împreună cu sentimentul pentru fiecare entitate. Următoarele sunt câteva definiții ale câmpurilor care sunt în răspuns:

  • entități – Părțile semnificative ale documentului. De exemplu, Person, Place, Date, Food, Sau Taste.
  • Mențiuni – Referințele sau mențiunile entității din document. Acestea pot fi pronume sau substantive comune precum „el”, „el”, „carte” și așa mai departe. Acestea sunt organizate în ordinea locației (offset) în document.
  • DescriptiveMentionIndex – Indexul în Mentions care oferă cea mai bună descriere a grupului de entități. De exemplu, „ABC Hotel” în loc de „hotel”, „it” sau alte mențiuni substantive comune.
  • GroupScore – Încrederea că toate entitățile menționate în grup sunt legate de aceeași entitate (cum ar fi „eu”, „eu” și „eu însumi” referindu-se la o singură persoană).
  • Text – The text in the document that depicts the entity.
  • Tip – O descriere a ceea ce descrie entitatea.
  • Scor – Încrederea modelului că aceasta este o entitate relevantă.
  • Menționați Sentimentul – Sentimentul real găsit pentru mențiune.
  • Sentiment – The string value of positive, neutral, negative, or mixed.
  • SentimentScore – Încrederea modelului pentru fiecare sentiment posibil.
  • BeginOffset – Deplasarea în textul documentului unde începe mențiunea.
  • EndOffset – Deplasarea în textul documentului unde se termină mențiunea.

For a more detailed breakdown, refer to Extrageți sentimentul granular din text cu Amazon Comprehend Targeted Sentiment or Output file organization.

Concluzie

Sentiment analysis remains crucial for organizations for a myriad of reasons—from tracking customer sentiment over time for businesses, to inferring whether a product is liked or disliked, to understanding opinions of users of a social network towards certain topics, or even predicting the results of campaigns. Real-time targeted sentiment can be effective for businesses, allowing them to go beyond overall sentiment analysis to explore insights to drive customer experiences using Amazon Comprehend.

To learn more about Targeted Sentiment for Amazon Comprehend, refer to Sentiment țintit.


Despre autori

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai. Raj Pathak este arhitect de soluții și consilier tehnic pentru clienții Fortune 50 și Mid-Size FSI (bancare, asigurări, piețe de capital) din Canada și Statele Unite. Raj este specializat în învățare automată cu aplicații în extragerea documentelor, transformarea centrului de contact și viziunea computerizată.

Amazon Comprehend Targeted Sentiment adaugă suport sincron PlatoBlockchain Data Intelligence. Căutare verticală. Ai.Wrick Talukdar is a Senior Architect with Amazon Comprehend Service team. He works with AWS customers to help them adopt machine learning on a large scale. Outside of work, he enjoys reading and photography.

Timestamp-ul:

Mai mult de la Învățare automată AWS