护栏与审查

gg-friggin-ez

@ItisShikhar2TypeScriptMIT更新于 2026-09-20可当场跑

基于 TypeSafe AI Jev 的 Node.js 快速脏话和有害内容检测工具,支持多语言变体,延迟约 50-500 毫秒。

英文原文

Fast, drop-in profanity and toxicity screener for Node.js, powered by TypeSafe AI Jev. Catches leetspeak, character spacing, and romanized profanity across languages including Kannada, Telugu, Tamil, Hindi, and Bengali. ~50-500ms latency.

ItisShikhar/gg-friggin-ez

它在哪儿调用了 Jev

: 'https://api.typesafe.ai/v1/systemone');

src/jev/client.ts:59

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 demo/js/client-screener.js:6

  1. is_toxic是/否

    Is this message toxic, hostile, insulting, or harassing toward an individual or group? This strictly includes identity attacks, hate speech, slurs, demeaning tropes, or discrimination based on caste (e.g. Dalit, Chamar, Bhangi slurs), religion (communal slurs, religious hatred), gender (misogyny, sexist abuse, "go back to kitchen"), or sexual orientation, or offensive visual gestures (such as ASCII middle fingers). Friendly banter, gaming hype, self-deprecation, and clean competitive callouts are NOT toxic.

  2. is_profane是/否

    Does this message contain explicit profanity, vulgar slang, swear words, derogatory caste/religious/gender slurs, or obscene visual gestures (including ASCII art / symbol drawings depicting an obscene middle finger or sexual anatomy)? Non-profane mild insults like "you are stupid" or "noob" do NOT count as profanity.

  3. severity打分

    Rate the severity of toxicity, hate speech, profanity, or offensive gestures in this message on a calibrated 0-2 scale.

    • 0None / Clean (normal conversation or clean gaming callout)
    • 1Mild mockery or insult (e.g. calling someone noob, mental, loosu playfully or mildly)
    • 2Severe toxicity, identity attack, caste/religious slur, misogynistic abuse, vulgar profanity, sexualized abuse, harassment, or obscene visual gestures (e.g. ASCII middle fingers)
  4. language_guess选项

    Which language is this text primarily written in? This screener accepts text in any language or script — pick the closest matching option below, or "other" for any language/script not explicitly listed (the is_toxic, is_profane, and severity answers remain reliable either way).

    • englishStandard English
    • hindiStandard Hindi (हिन्दी)
    • hinglishRomanized Hindi (Hinglish)
    • bengaliBengali (Bangla / Benglish)
    • frenchFrench (Français)
    • japaneseJapanese (日本語 / Romaji)
    • tamilTamil (Tamil script / Tanglish)
    • spanishSpanish (Español)
    • germanGerman (Deutsch)
    • russianRussian (Русский)
    • teluguTelugu (Telugu script / Tenglish)
    • kannadaKannada (Kannada script / Kanglish)
    • marathiMarathi (मराठी / Marlish)
    • bhojpuriBhojpuri (भोजपुरी / Romanized)
    • malayalamMalayalam (Manglish)
    • punjabiPunjabi (Punglish)
    • gujaratiGujarati (Gujlish)
    • otherOther language, script, symbols, ASCII art, or mixed/unclear
  5. obfuscation_type选项

    What evasion or obfuscation technique is used in the text, if any?

    • noneStandard phonetic romanization or plain text without deliberate evasion
    • ascii_artASCII art or symbol drawings used to depict gestures, middle fingers, or shapes
    • leetspeakNumbers or symbols substituted for letters (e.g., p00da, sh1t, thal3, $olo, b4kwaas)
    • mixed_scriptMixing Latin letters with native scripts (Devanagari, Tamil, Cyrillic, etc.) inside words to bypass filters (e.g., chuतिya)
    • spaced_charactersIntentional spacing inserted between letters (e.g., p a i t h i y a m)
    • repeated_charactersExcessive letter repetitions to evade filters (e.g., looooosuuuu, paaaagal)
    • symbol_substitutionsAsterisks, punctuation, or special characters used to mask words

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_toxic: { type: 'boolean', instructions: 'Is this message toxic, hostile, insulting, or harassing toward an individual or group? This strictly includes identity attacks, hate speech, slurs, demeaning tropes, or discrimination based on caste (e.g. Dalit, Chamar, Bhangi slurs), religion (communal slurs, religious hatred), gender (misogyny, sexist abuse, "go back to kitchen"), or sexual orientation, or offensive visual gestures (such as ASCII middle fingers). Friendly banter, gaming hype, self-deprecation, and clean competitive callouts are NOT toxic.' },
    is_profane: { type: 'boolean', instructions: 'Does this message contain explicit profanity, vulgar slang, swear words, derogatory caste/religious/gender slurs, or obscene visual gestures (including ASCII art / symbol drawings depicting an obscene middle finger or sexual anatomy)? Non-profane mild insults like "you are stupid" or "noob" do NOT count as profanity.' },
    severity: { type: 'score', instructions: 'Rate the severity of toxicity, hate speech, profanity, or offensive gestures in this message on a calibrated 0-2 scale.',
      criteria: ['None / Clean (normal conversation or clean gaming callout)', 'Mild mockery or insult (e.g. calling someone noob, mental, loosu playfully or mildly)', 'Severe toxicity, identity attack, caste/religious slur, misogynistic abuse, vulgar profanity, sexualized abuse, harassment, or obscene visual gestures (e.g. ASCII middle fingers)'] },
    language_guess: { type: 'choice', instructions: 'Which language is this text primarily written in? This screener accepts text in any language or script — pick the closest matching option below, or "other" for any language/script not explicitly listed (the is_toxic, is_profane, and severity answers remain reliable either way).',
      criteria: { english: 'Standard English', hindi: 'Standard Hindi (हिन्दी)', hinglish: 'Romanized Hindi (Hinglish)', bengali: 'Bengali (Bangla / Benglish)', french: 'French (Français)', japanese: 'Japanese (日本語 / Romaji)', tamil: 'Tamil (Tamil script / Tanglish)', spanish: 'Spanish (Español)', german: 'German (Deutsch)', russian: 'Russian (Русский)', telugu: 'Telugu (Telugu script / Tenglish)', kannada: 'Kannada (Kannada script / Kanglish)', marathi: 'Marathi (मराठी / Marlish)', bhojpuri: 'Bhojpuri (भोजपुरी / Romanized)', malayalam: 'Malayalam (Manglish)', punjabi: 'Punjabi (Punglish)', gujarati: 'Gujarati (Gujlish)', other: 'Other language, script, symbols, ASCII art, or mixed/unclear' } },
    obfuscation_type: { type: 'choice', instructions: 'What evasion or obfuscation technique is used in the text, if any?',
      criteria: { none: 'Standard phonetic romanization or plain text without deliberate evasion', ascii_art: 'ASCII art or symbol drawings used to depict gestures, middle fingers, or shapes', leetspeak: 'Numbers or symbols substituted for letters (e.g., p00da, sh1t, thal3, $olo, b4kwaas)', mixed_script: 'Mixing Latin letters with native scripts (Devanagari, Tamil, Cyrillic, etc.) inside words to bypass filters (e.g., chuतिya)', spaced_characters: 'Intentional spacing inserted between letters (e.g., p a i t h i y a m)', repeated_characters: 'Excessive letter repetitions to evade filters (e.g., looooosuuuu, paaaagal)', symbol_substitutions: 'Asterisks, punctuation, or special characters used to mask words' } },
  },
});

同类的其他项目