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
confidence |
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
|
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
Opinion[]
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
Azure SDK for JavaScript