Compartilhar via


TextAnalysisModelFactory.SentenceTarget Method

Definition

Initializes a new instance of SentenceTarget.

public static Azure.AI.Language.Text.SentenceTarget SentenceTarget (Azure.AI.Language.Text.TokenSentiment sentiment = Azure.AI.Language.Text.TokenSentiment.Positive, Azure.AI.Language.Text.TargetConfidenceScoreLabel confidenceScores = default, int offset = 0, int length = 0, string text = default, System.Collections.Generic.IEnumerable<Azure.AI.Language.Text.TargetRelation> relations = default);
static member SentenceTarget : Azure.AI.Language.Text.TokenSentiment * Azure.AI.Language.Text.TargetConfidenceScoreLabel * int * int * string * seq<Azure.AI.Language.Text.TargetRelation> -> Azure.AI.Language.Text.SentenceTarget
Public Shared Function SentenceTarget (Optional sentiment As TokenSentiment = Azure.AI.Language.Text.TokenSentiment.Positive, Optional confidenceScores As TargetConfidenceScoreLabel = Nothing, Optional offset As Integer = 0, Optional length As Integer = 0, Optional text As String = Nothing, Optional relations As IEnumerable(Of TargetRelation) = Nothing) As SentenceTarget

Parameters

sentiment
TokenSentiment

The sentiment of the sentence.

confidenceScores
TargetConfidenceScoreLabel

Represents the confidence scores across all sentiment classes: positive and negative.

offset
Int32

The target offset from the start of the sentence.

length
Int32

The length of the target.

text
String

The target text detected.

relations
IEnumerable<TargetRelation>

The array of either assessment or target objects which is related to the target.

Returns

A new SentenceTarget instance for mocking.

Applies to