Skip to main content

SentimentedRequest

Stentor API Reference


Stentor API Reference / stentor-models/src / SentimentedRequest

Interface: SentimentedRequest

Defined in: packages/stentor-models/src/Request/Request.ts:131

A request with sentiment analysis information

Extended by​

Properties​

sentimentAnalysis?​

optional sentimentAnalysis: object

Defined in: packages/stentor-models/src/Request/Request.ts:135

An analysis on the user's query text sentiment

sentiment​

sentiment: "POSITIVE" | "NEUTRAL" | "NEGATIVE" | "MIXED"

An abstracted measure of the sentiment.

  • POSITIVE - Query has positive sentiment
  • NEUTRAL - Query has either positive or negative sentiment
  • NEGATIVE - Query has negative sentiment
  • MIXED - Query has both positive and negative sentiment

original?​

optional original: string

The original payload from the sentiment analysis engine stringified

You can use JSON.parse on this data to extract more information.