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/language-service/sentiment-opinion-mining/overview.

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", the following two opinions will be returned: "food is good" and "service is bad".

It is non-empty only returned if includeOpinionMining was set to true.

sentiment

The predicted Sentiment for the sentence. For a list of possible values, see SentenceSentimentLabel

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", the following two opinions will be returned: "food is good" and "service is bad".

It is non-empty only returned if includeOpinionMining was set to true.

opinions: Opinion[]

Property Value

sentiment

The predicted Sentiment for the sentence. For a list of possible values, see SentenceSentimentLabel

sentiment: SentenceSentimentLabel

Property Value

text

The sentence text.

text: string

Property Value

string