TextToxicityDetectorBase<T>
Base Classes · AiDotNet.Safety.Text
Abstract base class for toxicity detection modules.
Inheritance: ModelBase<T, Vector<T>, Vector<T>> → SafetyModuleBase<T> → TextSafetyModuleBase<T> → TextToxicityDetectorBase<T>
Implements: ITextToxicityDetector<T>
For Beginners
This base class provides shared code for all toxicity detectors. Each detector type (rule-based, ML-based, etc.) extends this class and adds its own detection method while reusing common threshold and scoring logic.
How It Works
Provides shared infrastructure for toxicity detectors including the toxicity threshold configuration and common scoring utilities. Concrete implementations provide the actual detection algorithm (rule-based, embedding, classifier, ensemble).
Methods
| Method | Summary |
|---|---|
double GetToxicityScore(string text) |