Learn how Text Analytics Sentiment API discerns emotions in text, providing valuable insights like identifying positivity from phrases like “Peter was surprised and very happy to meet Sara in Paris.
Table of Contents
Question
You are using Text Analytics Sentiment API to analyze the following sentence: “Peter was surprised and very happy to meet Sara in Paris.”
What a sentiment value should you expect in the API response?
A. neutral
B. positive
C. happy
D. negative
E. surprise
Answer
B. positive
Explanation
The sentiment value in the API response is expected to be “positive.” The API evaluates sentiments as positive, negative, or neutral based on the overall emotional tone of the text.
Sentiment Analysis is a Text Analytics service that helps analyze text and returns sentiment scores (between 0 and 1) for each sentence.
A score close to 0 means a negative sentiment, and a score close to 1 – positive. And in cases with a neutral or undefined sentiment, the score is 0.5.
In our problem, the sentiment of the sentence is positive, with a confidence score of 1.0.
Here is the JSON result.
All other options are incorrect.
Microsoft Azure AI Fundamentals AI-900 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Fundamentals AI-900 exam and earn Microsoft Azure AI Fundamentals AI-900 certification.