"Profanity" (組込み分類器)
"Profanity" (組込み分類器)
与えられたテキストに不敬な言葉が含まれているかどうかを判別する.
クラス
例題
すべて開く すべて閉じる例 (2)
組込みの"Profanity"分類器を使って,テキストに過激な言葉が含まれている場合はTrueを,それ以外の場合はFalseを返すようにする:
Classify["Profanity", Import["http://www.urbandictionary.com/random.php"]]Classify["Profanity", {"I love this movie", "I am so sad", "My phone broke again"}]Classify["Profanity", "This is a normal sentence", "Probabilities"]この分類器のClassifierFunctionを得る:
c = Classify["Profanity"]c[{"This is a regular sentense", "I am so sad", "My phone broke again"}]スコープ (1)
組込み分類器に対応するClassifierFunctionをロードする:
c = Classify["Profanity"]Information[c, "Classes"]オプション (3)
ClassPriors (1)
カスタムのClassPriorsを使って可能な出力を制限する:
Classify["Profanity", "There is nothing good about the
fellas in this movie", ClassPriors -> <|True -> 0.5, False -> 0.5|>]IndeterminateThreshold (1)
カスタムのIndeterminateThresholdを使う:
Classify["Profanity", "My car broke again", IndeterminateThreshold -> 0.99]UtilityFunction (1)
utility = Information[Classify["Profanity"], "UtilityFunction"]この効用関数に変更を加え,Trueが誤ってFalseと分類された場合にペナルティを科すようにする:
utility[True, False] = -1.;Classify["Profanity", Import["http://www.urbandictionary.com/random.php"], UtilityFunction -> utility]関連項目
Classify NetModel TextCases TextSentences WolframLanguageData
分類器: Sentiment Spam FacebookTopic
メソッド: NaiveBayes
関連するガイド
-
▪
- 機械学習
履歴
2018 で導入 (11.3)