SentenceSentiment interface

The predicted sentiment for a given span of text. For more information regarding text sentiment, see https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/how-tos/text-analytics-how-to-sentiment-analysis.

Properties

confidenceScores

The sentiment confidence score between 0 and 1 for the sentence for all classes.

length

The length of the sentence text.

offset

The sentence text offset from the start of the document.

opinions

The list of opinions mined from this sentence. For example in "The food is good, but the service is bad", we would mine these two opinions "food is good", "service is bad". Only returned if includeOpinionMining is set to True in the call to analyzeSentiment.

sentiment

The predicted Sentiment for the sentence.

text

The sentence text.

Property Details

confidenceScores

The sentiment confidence score between 0 and 1 for the sentence for all classes.

confidenceScores: SentimentConfidenceScores

Property Value

length

The length of the sentence text.

length: number

Property Value

number

offset

The sentence text offset from the start of the document.

offset: number

Property Value

number

opinions

The list of opinions mined from this sentence. For example in "The food is good, but the service is bad", we would mine these two opinions "food is good", "service is bad". Only returned if includeOpinionMining is set to True in the call to analyzeSentiment.

opinions: Opinion[]

Property Value

sentiment

The predicted Sentiment for the sentence.

sentiment: SentenceSentimentLabel

Property Value

text

The sentence text.

text: string

Property Value

string