Class AnalyzeTextOptions
java.lang.Object
com.azure.ai.contentsafety.models.AnalyzeTextOptions
The text analysis request.
-
Constructor Summary
ConstructorsConstructorDescriptionAnalyzeTextOptions(String text) Creates an instance of AnalyzeTextOptions class. -
Method Summary
Modifier and TypeMethodDescriptionGet the blocklistNames property: The names of blocklists.Get the categories property: The categories will be analyzed.Get the outputType property: This refers to the type of text analysis output.getText()Get the text property: The text needs to be analyzed.Get the haltOnBlocklistHit property: When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit.setBlocklistNames(List<String> blocklistNames) Set the blocklistNames property: The names of blocklists.setCategories(List<TextCategory> categories) Set the categories property: The categories will be analyzed.setHaltOnBlocklistHit(Boolean haltOnBlocklistHit) Set the haltOnBlocklistHit property: When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit.setOutputType(AnalyzeTextOutputType outputType) Set the outputType property: This refers to the type of text analysis output.
-
Constructor Details
-
AnalyzeTextOptions
Creates an instance of AnalyzeTextOptions class.- Parameters:
text- the text value to set.
-
-
Method Details
-
getText
Get the text property: The text needs to be analyzed. We support a maximum of 10k Unicode characters (Unicode code points) in the text of one request.- Returns:
- the text value.
-
getCategories
Get the categories property: The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.- Returns:
- the categories value.
-
setCategories
Set the categories property: The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.- Parameters:
categories- the categories value to set.- Returns:
- the AnalyzeTextOptions object itself.
-
getBlocklistNames
Get the blocklistNames property: The names of blocklists.- Returns:
- the blocklistNames value.
-
setBlocklistNames
Set the blocklistNames property: The names of blocklists.- Parameters:
blocklistNames- the blocklistNames value to set.- Returns:
- the AnalyzeTextOptions object itself.
-
isHaltOnBlocklistHit
Get the haltOnBlocklistHit property: When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit.- Returns:
- the haltOnBlocklistHit value.
-
setHaltOnBlocklistHit
Set the haltOnBlocklistHit property: When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit.- Parameters:
haltOnBlocklistHit- the haltOnBlocklistHit value to set.- Returns:
- the AnalyzeTextOptions object itself.
-
getOutputType
Get the outputType property: This refers to the type of text analysis output. If no value is assigned, the default value will be "FourSeverityLevels".- Returns:
- the outputType value.
-
setOutputType
Set the outputType property: This refers to the type of text analysis output. If no value is assigned, the default value will be "FourSeverityLevels".- Parameters:
outputType- the outputType value to set.- Returns:
- the AnalyzeTextOptions object itself.
-