The Watson Natural Language Processing HAP detection identifies hateful, abusive, and profane content (HAP content) in texts.
Block name
classification_transformer_en_slate.38m.hap
Supported languages
The HAP Detection block is able to detect HAP in English texts only.
Capabilities
Use this block to detect hateful, abusive or profane content in texts.
Dependencies on other blocks
None
Code sample
import watson_nlp
# Load the HAP model
hap_model = watson_nlp.load('classification_transformer_en_slate.38m.hap')
# Run the HAP model and print the result
hap_prediction = hap_model.run('Spiders are disgusting.')
print(hap_prediction)
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.