憎悪的、虐待的、冒涜的なコンテンツの検出
最終更新: 2024年7月29日
のWatson自然言語処理HAP検出は、憎悪的、虐待的、冒涜的なコンテンツを特定します(
テキスト内のコンテンツ。HAP
ブロック名
classification_transformer_en_slate.38m.hap
サポート対象言語
HAP 検出ブロックは、英語のテキストでのみ HAP を検出できます。
機能
このブロックを使用して、テキスト内の憎悪的、虐待的、または冒とく的なコンテンツを検出します。
他のブロックへの依存関係
なし
コード・サンプル
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)
コードサンプルの出力
{ "classes": [ { "class_name": "has_HAP", "confidence": 0.9629989862442017 }, { "class_name": "no_HAP", "confidence": 0.03700101003050804 } ], "producer_id": { "name": "Transformer-based Text Classifier", "version": "0.0.1" } }
親トピック:Watson自然言語処理タスクカタログ
トピックは役に立ちましたか?
0/1000