Bitzu

AI-901 ยท Text and speech solutions

Reading sentiment analysis results

Understanding responses: sentiment labels and confidence scores per sentence and document, entity categories and confidence, key phrase lists, and handling errors and language.

Key points

  • Each document result has a sentiment label plus confidence_scores (positive, neutral, negative) that add up to 1, and a sentences list with the same fields per sentence.
  • Sentences are positive, negative or neutral; a document can also be mixed (at least one positive and one negative sentence).
  • Check is_error before reading a result.
  • Opinion mining (show_opinion_mining=True) adds targets and assessments.

Source: https://learn.microsoft.com/en-us/azure/ai-services/language-service/sentiment-opinion-mining/how-to/call-api

Practice questions

Single choice

For one sentence, what do the positive, neutral and negative confidence scores add up to?

  1. 1
  2. 3
  3. 100
  4. It varies by sentence length
Show answer

Answer: A. 1

The three scores are a distribution over the labels and sum to 1; they are not independent percentages.

Select all that apply

Which statements about the sentiment response are true?

  1. Each sentence carries its own label and confidence scores
  2. Only a document, not a sentence, can be labeled mixed
  3. Scores for one document add up to 1
  4. A sentence can be labeled mixed
  5. Positive and negative scores are independent and can both be 0.9
Show answer

Answer: A. Each sentence carries its own label and confidence scores, B. Only a document, not a sentence, can be labeled mixed, C. Scores for one document add up to 1

Labels and scores exist at both document and sentence level, mixed appears only on documents, and scores sum to 1. Sentences are never mixed, and key phrase order is chosen by the model, so it should not be read as a strict ranking.

True or false

A document labeled positive with a positive score of 0.62 means that 62 percent of its sentences are positive.

Show answer

Answer: False

False. The score expresses how confident the model is in the label, not the share of positive sentences. Closer to 1 means higher confidence.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AI-901 topics in this module