ClarifyTextConfigProperty Struct
A parameter used to configure the SageMaker Clarify explainer to treat text features as text so that explanations are provided for individual units of text.
Required only for natural language processing (NLP) explainability.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const clarifyTextConfigProperty: sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty = {
granularity: 'granularity',
language: 'language',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker
clarify_text_config_property = sagemaker.CfnEndpointConfig.ClarifyTextConfigProperty(
granularity="granularity",
language="language"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;
ClarifyTextConfigProperty clarifyTextConfigProperty = ClarifyTextConfigProperty.builder()
.granularity("granularity")
.language("language")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var clarifyTextConfigProperty = new ClarifyTextConfigProperty {
Granularity = "granularity",
Language = "language"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
clarifyTextConfigProperty := &ClarifyTextConfigProperty{
Granularity: jsii.String("granularity"),
Language: jsii.String("language"),
}
Properties
The unit of granularity for the analysis of text features.
For example, if the unit is 'token' , then each token (like a word in English) of the text is treated as a feature. SHAP values are computed for each unit/feature.
Specifies the language of the text features in [ISO 639-1](https://docs.aws.amazon.com/ https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) or ISO 639-3 code of a supported language.
For a mix of multiple languages, use code
'xx'.