SentimentSkill Class

public final class SentimentSkill
extends SearchIndexerSkill

Text analytics positive-negative sentiment analysis, scored as a floating point value in a range of zero to 1.

Constructor Summary

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

Deprecated

Creates an instance of SentimentSkill class.

SentimentSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, SentimentSkillVersion version)

Creates an instance of SentimentSkill class.

Method Summary

Modifier and Type Method and Description
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.

SentimentSkillVersion getSkillVersion()

Gets the version of the SentimentSkill.

Boolean isOpinionMiningIncluded()

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.

SentimentSkill 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).

SentimentSkill setDefaultLanguageCode(SentimentSkillLanguage defaultLanguageCode)

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

SentimentSkill setDescription(String description)

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

SentimentSkill setModelVersion(String modelVersion)

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

SentimentSkill setName(String name)

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

SentimentSkill setOpinionMiningIncluded(Boolean opinionMiningIncluded)

Set the opinionMiningIncluded 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.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from SearchIndexerSkill

Methods inherited from java.lang.Object

Constructor Details

SentimentSkill

@Deprecated
public SentimentSkill(List inputs, List outputs)

Deprecated

Creates an instance of SentimentSkill class.

The instance of SentimentSkill uses V1, to set the specific version of the skill use SentimentSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, SentimentSkillVersion version).

Parameters:

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

SentimentSkill

public SentimentSkill(List inputs, List outputs, SentimentSkillVersion version)

Creates an instance of SentimentSkill class.

Parameters:

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

Method Details

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.

getSkillVersion

public SentimentSkillVersion getSkillVersion()

Gets the version of the SentimentSkill.

Returns:

The version of the SentimentSkill.

isOpinionMiningIncluded

public Boolean isOpinionMiningIncluded()

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 SentimentSkill 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:

SentimentSkill.setContext(String context)

Parameters:

context

setDefaultLanguageCode

public SentimentSkill 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 SentimentSkill object itself.

setDescription

public SentimentSkill setDescription(String description)

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

Overrides:

SentimentSkill.setDescription(String description)

Parameters:

description

setModelVersion

public SentimentSkill 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 SentimentSkill object itself.

setName

public SentimentSkill 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:

SentimentSkill.setName(String name)

Parameters:

name

setOpinionMiningIncluded

public SentimentSkill setOpinionMiningIncluded(Boolean opinionMiningIncluded)

Set the opinionMiningIncluded 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:

opinionMiningIncluded - the opinionMiningIncluded value to set.

Returns:

the SentimentSkill object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

SentimentSkill.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to