public ClarifyTextConfig withGranularity(ClarifyTextGranularity granularity) {
        this.granularity = granularity.toString();
        return this;
    }
<p>
The unit of granularity for the analysis of text features. For example, if the unit is <code>'token'</code>, then
each token (like a word in English) of the text is treated as a feature. SHAP values are computed for each
unit/feature.
</p>

@param granularity
       The unit of granularity for the analysis of text features. For example, if the unit is
       <code>'token'</code>, then each token (like a word in English) of the text is treated as a feature. SHAP
       values are computed for each unit/feature.
@return Returns a reference to this object so that method calls can be chained together.
@see ClarifyTextGranularity
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/ClarifyTextConfig.java