SentimentSkill Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. SearchIndexerSkill - com.
azure. search. documents. indexes. models. SentimentSkill
- com.
- com.
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
Use SentimentSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, SentimentSkillVersion version) as V1 is deprecated. See skill deprecation for more information.
Creates an instance of Sentiment |
SentimentSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, SentimentSkillVersion version) |
Creates an instance of Sentiment |
Method Summary
Modifier and Type | Method and Description |
---|---|
Sentiment |
getDefaultLanguageCode()
Get the default |
String |
getModelVersion()
Get the model |
Sentiment |
getSkillVersion()
Gets the version of the SentimentSkill. |
Boolean |
isOpinionMiningIncluded()
Get the include |
Sentiment |
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). |
Sentiment |
setDefaultLanguageCode(SentimentSkillLanguage defaultLanguageCode)
Set the default |
Sentiment |
setDescription(String description)
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill. |
Sentiment |
setModelVersion(String modelVersion)
Set the model |
Sentiment |
setName(String name)
Set the name property: The name of the skill which uniquely identifies it within the skillset. |
Sentiment |
setOpinionMiningIncluded(Boolean opinionMiningIncluded)
Set the opinion |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from SearchIndexerSkill
Methods inherited from java.lang.Object
Constructor Details
SentimentSkill
@Deprecated
public SentimentSkill(List
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:
SentimentSkill
public SentimentSkill(List
Creates an instance of SentimentSkill class.
Parameters:
Method Details
getDefaultLanguageCode
public SentimentSkillLanguage getDefaultLanguageCode()
Get the defaultLanguageCode property: A value indicating which language code to use. Default is en.
Returns:
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:
getSkillVersion
public SentimentSkillVersion getSkillVersion()
Gets the version of the SentimentSkill.
Returns:
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:
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:
setDefaultLanguageCode
public SentimentSkill setDefaultLanguageCode(SentimentSkillLanguage defaultLanguageCode)
Set the defaultLanguageCode property: A value indicating which language code to use. Default is en.
Parameters:
Returns:
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:
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:
Returns:
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:
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:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
SentimentSkill.toJson(JsonWriter jsonWriter)Parameters:
Throws:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for