TargetSentiment interface

TargetSentiment contains the predicted sentiment, confidence scores and other information about an target of a product. A target of a product/service is a key component of that product/service. For example in "The food at Hotel Foo is good", "food" is a target of "Hotel Foo".

Properties

confidenceScores

The sentiment confidence score between 0 and 1 for the target for 'positive' and 'negative' labels.

length

The length of the Target text.

offset

The Target text offset from the start of the sentence.

sentiment

The predicted Sentiment for the Target. Possible values include 'positive', 'mixed', and 'negative'.

text

The target text.

Property Details

confidenceScores

The sentiment confidence score between 0 and 1 for the target for 'positive' and 'negative' labels.

confidenceScores: TargetConfidenceScoreLabel

Property Value

length

The length of the Target text.

length: number

Property Value

number

offset

The Target text offset from the start of the sentence.

offset: number

Property Value

number

sentiment

The predicted Sentiment for the Target. Possible values include 'positive', 'mixed', and 'negative'.

sentiment: TokenSentimentValue

Property Value

text

The target text.

text: string

Property Value

string