SentimentSkillV3 Class

public final class SentimentSkillV3
extends SearchIndexerSkill

Using the Text Analytics API, evaluates unstructured text and for each record, provides sentiment labels (such as "negative", "neutral" and "positive") based on the highest confidence score found by the service at a sentence and document-level.

Constructor Summary

Constructor Description
SentimentSkillV3(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs)

Creates an instance of SentimentSkillV3 class.

Method Summary

Modifier and Type Method and Description
static SentimentSkillV3 fromJson(JsonReader jsonReader)

Reads an instance of SentimentSkillV3 from the JsonReader.

SentimentSkillLanguage getDefaultLanguageCode()

Get the defaultLanguageCode property: A value indicating which language code to use.

String getModelVersion()

Get the modelVersion property: The version of the model to use when calling the Text Analytics service.

String getOdataType()

Get the odataType property: The discriminator for derived types.

Boolean isIncludeOpinionMining()

Get the includeOpinionMining property: If set to true, the skill output will include information from Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated assessment (adjective) in the text.

SentimentSkillV3 setContext(String context)

Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content).

SentimentSkillV3 setDefaultLanguageCode(SentimentSkillLanguage defaultLanguageCode)

Set the defaultLanguageCode property: A value indicating which language code to use.

SentimentSkillV3 setDescription(String description)

Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.

SentimentSkillV3 setIncludeOpinionMining(Boolean includeOpinionMining)

Set the includeOpinionMining property: If set to true, the skill output will include information from Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated assessment (adjective) in the text.

SentimentSkillV3 setModelVersion(String modelVersion)

Set the modelVersion property: The version of the model to use when calling the Text Analytics service.

SentimentSkillV3 setName(String name)

Set the name property: The name of the skill which uniquely identifies it within the skillset.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from SearchIndexerSkill

Methods inherited from java.lang.Object

Constructor Details

SentimentSkillV3

public SentimentSkillV3(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs)

Creates an instance of SentimentSkillV3 class.

Parameters:

inputs - the inputs value to set.
outputs - the outputs value to set.

Method Details

fromJson

public static SentimentSkillV3 fromJson(JsonReader jsonReader)

Reads an instance of SentimentSkillV3 from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SentimentSkillV3 if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getDefaultLanguageCode

public SentimentSkillLanguage getDefaultLanguageCode()

Get the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.

Returns:

the defaultLanguageCode value.

getModelVersion

public String getModelVersion()

Get the modelVersion property: The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

Returns:

the modelVersion value.

getOdataType

public String getOdataType()

Get the odataType property: The discriminator for derived types.

Overrides:

SentimentSkillV3.getOdataType()

Returns:

the odataType value.

isIncludeOpinionMining

public Boolean isIncludeOpinionMining()

Get the includeOpinionMining property: If set to true, the skill output will include information from Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated assessment (adjective) in the text. Default is false.

Returns:

the includeOpinionMining value.

setContext

public SentimentSkillV3 setContext(String context)

Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.

Overrides:

SentimentSkillV3.setContext(String context)

Parameters:

context

setDefaultLanguageCode

public SentimentSkillV3 setDefaultLanguageCode(SentimentSkillLanguage defaultLanguageCode)

Set the defaultLanguageCode property: A value indicating which language code to use. Default is `en`.

Parameters:

defaultLanguageCode - the defaultLanguageCode value to set.

Returns:

the SentimentSkillV3 object itself.

setDescription

public SentimentSkillV3 setDescription(String description)

Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.

Overrides:

SentimentSkillV3.setDescription(String description)

Parameters:

description

setIncludeOpinionMining

public SentimentSkillV3 setIncludeOpinionMining(Boolean includeOpinionMining)

Set the includeOpinionMining property: If set to true, the skill output will include information from Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated assessment (adjective) in the text. Default is false.

Parameters:

includeOpinionMining - the includeOpinionMining value to set.

Returns:

the SentimentSkillV3 object itself.

setModelVersion

public SentimentSkillV3 setModelVersion(String modelVersion)

Set the modelVersion property: The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary.

Parameters:

modelVersion - the modelVersion value to set.

Returns:

the SentimentSkillV3 object itself.

setName

public SentimentSkillV3 setName(String name)

Set the name property: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'.

Overrides:

SentimentSkillV3.setName(String name)

Parameters:

name

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

SentimentSkillV3.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to