glin-profanity
Version:
Glin-Profanity is a lightweight and efficient npm package designed to detect and filter profane language in text inputs across multiple languages. Whether you’re building a chat application, a comment section, or any platform where user-generated content
15 lines (14 loc) • 562 B
TypeScript
export declare enum SeverityLevel {
Exact = 1,
Fuzzy = 2,
Merged = 3
}
export interface CheckProfanityResult {
containsProfanity: boolean;
profaneWords: string[];
processedText?: string;
severityMap?: {
[word: string]: SeverityLevel;
};
}
export type Language = 'arabic' | 'chinese' | 'czech' | 'danish' | 'english' | 'esperanto' | 'finnish' | 'french' | 'german' | 'hindi' | 'hungarian' | 'italian' | 'japanese' | 'korean' | 'norwegian' | 'persian' | 'polish' | 'portuguese' | 'russian' | 'turkish' | 'swedish' | 'thai';