共用方式為


TextAnalysisModelFactory.SentimentActionResult Method

Definition

Initializes a new instance of SentimentActionResult.

public static Azure.AI.Language.Text.SentimentActionResult SentimentActionResult (string id = default, System.Collections.Generic.IEnumerable<Azure.AI.Language.Text.DocumentWarning> warnings = default, Azure.AI.Language.Text.DocumentStatistics statistics = default, Azure.AI.Language.Text.DocumentSentiment sentiment = Azure.AI.Language.Text.DocumentSentiment.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = default, System.Collections.Generic.IEnumerable<Azure.AI.Language.Text.SentenceSentiment> sentences = default, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = default);
static member SentimentActionResult : string * seq<Azure.AI.Language.Text.DocumentWarning> * Azure.AI.Language.Text.DocumentStatistics * Azure.AI.Language.Text.DocumentSentiment * Azure.AI.Language.Text.SentimentConfidenceScores * seq<Azure.AI.Language.Text.SentenceSentiment> * Azure.AI.Language.Text.DetectedLanguage -> Azure.AI.Language.Text.SentimentActionResult
Public Shared Function SentimentActionResult (Optional id As String = Nothing, Optional warnings As IEnumerable(Of DocumentWarning) = Nothing, Optional statistics As DocumentStatistics = Nothing, Optional sentiment As DocumentSentiment = Azure.AI.Language.Text.DocumentSentiment.Positive, Optional confidenceScores As SentimentConfidenceScores = Nothing, Optional sentences As IEnumerable(Of SentenceSentiment) = Nothing, Optional detectedLanguage As DetectedLanguage = Nothing) As SentimentActionResult

Parameters

id
String

Unique, non-empty document identifier.

warnings
IEnumerable<DocumentWarning>

Warnings encountered while processing document.

statistics
DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

sentiment
DocumentSentiment

Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).

confidenceScores
SentimentConfidenceScores

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

sentences
IEnumerable<SentenceSentiment>

The document's sentences sentiment.

detectedLanguage
DetectedLanguage

If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document.

Returns

A new SentimentActionResult instance for mocking.

Applies to