Unprofane
DocsContexts

Contexts

What the text is changes how it is read. Usernames are split into words and checked backwards; comments are read as prose.

context tells the engine what kind of text it is looking at. The lexicon, the transforms and the guards are the same everywhere; what changes is how the text is cut up and which tricks are worth trying.

Context For What is different
general Anything, the default Read as running text. A text that is one handle, written as a name is (words joined by an underscore, camelCase, a number after its letters: Charles_Dickindaughter, mikehunt101), is read as a name: split into its words, with joke names and traded first letters read, but never a username’s reserved names. So is a person’s name of two or three words, each written with a capital (Charles Dickindaughter).
username A handle shown publicly At most 64 characters. camelCase, digit runs and underscores are split, and the string is segmented into words with a frequency list, so xXsh1tXx and ilovesh1t are read. The reversed string is checked too. Reserved names (admin, support, the brand’s own) match.
display_name A name shown beside a person’s content As username, reserved names included, but read as a person’s name: Phuc Nguyen passes, where as a username it reads as profanity spelled by sound.
comment A post or a comment Running text; the model tier is consulted for insults and threats that a word list cannot see.
chat One line of a conversation As comment, tuned for short lines.
gaming A line of a game’s chat, between players As chat to the rules. The model is told it reads a game’s chat, where killing or destroying players describes play and harm outside the game does not. Under every policy but kids, a taunt about how someone plays (noob, gg ez, uninstall) and rudeness are not acted on; under standard, neither is swearing aimed at no one (this lag is fucking unbearable). A slur, a threat, kys, sexual language, swearing with a person in it (fuck you, fuck the devs), an insult about the person (idiot, stupid) and a personal attack are. A threat inside the game (u will die) goes to the model in balanced.
educational A lesson, a paper, a history or a dictionary entry Read as general, with every quotation read as speech: a word quoted, named or reported (the word 'fuck', Nazi propaganda called Jews "untermenschen") is discussed, swearing and slurs included, and the model reads it. A word used on someone (you are a fucking idiot) or a slur outside quotes still counts.
creative Fiction, roleplay, lyrics Read as general, with every quotation read as dialogue: a character’s threat or oath ("I'll kill you for this," she hissed) goes to the model, and the model is told a threat to a real person is not fiction. A slur counts even in dialogue; narration is read as any text is.
review A product or place review As comment. The anatomy and animal guards are widest here: a review of a chicken breast is not profane. A mild insult and rudeness are criticism (below). A review that is one handle is read as a name.
custom_text Text a customer typed for engraving, printing or a product Read as general, names and handles included (mikehunt101); the response is meant to be shown back to the buyer, so censored matters most.

What each context acts on#

The policy decides; the context softens it where a kind of text says hard things that are not abuse. Under kids every context acts as the policy says.

Context insult rude profanity A text of names
general as the policy as the policy as the policy read as names
username as the policy as the policy as the policy words
display_name as the policy as the policy as the policy a name
comment the model’s alone, mild: review as the policy as the policy words
chat as the policy as the policy as the policy words
gaming a taunt about play: allowed allowed aimed at no one: allowed (standard) words
educational as the policy as the policy as the policy read as names
creative a character’s: allowed allowed as the policy read as names
review mild: allowed allowed as the policy words
custom_text as the policy as the policy as the policy read as names
  • Mild is an insult the lexicon grades mild that the model, where it reads the text, rates less than moderate: a review may call the staff idiots. A review that insults with no listed word is read as the model reads it, and one the model rates less than moderate is held for review, as a comment’s is.
  • A character’s insult is one the lexicon grades mild or moderate with no second person in its sentence: the orc called him a filthy bastard is the story’s, you are a pathetic loser is not, and so is the model’s reading of it. A story that gives someone’s address, email, phone number or handle names a real person, and its insults count. Swearing and a strong insult still count.
  • The model’s alone, mild is an insult no listed word carries that the model rates less than moderate: a comment holds it for a person to look at (Suck my finger) rather than blocking it.
  • Read as names: a short text whose words are names, a shop’s or a person’s (Dick's Bakery), is read as names, so a word inside one is the name’s.

Every other category, mild_profanity, sexual, slur, threat, sexual_minors and self_harm, is acted on as the policy says in every context, and reserved names count only in username and display_name.

Which to choose#

Pick the one that names the field. When none does, general. A wrong context is not a broken check; it is a slightly worse one: a username in general is split into words only when it is written as a handle, so ilovesh1t may pass where i_love_sh1t does not.

Game chat#

The same line reads differently in a game. In chat, nice try loser is an insult aimed at someone and blocks under standard; in gaming it is a taunt and is allowed. I know where you live. See you after the match. blocks in both.

Text chat gaming
gg ez, uninstall block allow
nice try loser block allow
kys noob block block
you idiot block block
this lag is fucking unbearable review allow
fuck the devs review review
I know where you live block block

The table is the rules alone (mode: "fast"). An insult about the person (you idiot, stupid mid) is no taunt in a game either; game slang about play (noob, bot, trash) is. In balanced, the model reads the rest: an insult it reads as less than moderate is a taunt, and a personal attack (your mom must be so ashamed of you) is not. A threat inside the game (u will die, te mato) is no certain block in gaming: in balanced the model reads it, and with the rules alone it still blocks. Swearing aimed at a thing (the lag, the game, a play: fuck this game, that was fucking awesome) is allowed under standard, in every language; swearing with a person in the text, the reader, someone named as “he” or “my team”, a group or everyone, is held as in chat. With the rules alone that is all they read; in balanced the model is asked once, as for any line the rules are unsure of, and swearing it reads as insulting someone is acted on (fuck xXSniperXx, camping all game). teen, strict and kids block swearing in a game too, and a policy of your own that sets profanity is taken at its word. A game for children uses policy: "kids", which keeps every rule of chat.

Lessons and fiction#

Quotation marks are read the same way in every language the engine covers ("…", «…», „…“, 「…」).

Text general educational creative
The word 'fuck' has many uses. review allow allow
"You bastard," she hissed. "I'll kill you for this." block allow allow
La palabra «puta» tiene muchos usos. block allow allow
«Я тебя убью, сука», прошептал он. block allow allow
you are a fucking idiot block block block

The table is the rules alone (mode: "fast"). In balanced, the model reads what the rules handed it.

Project defaults#

Set the context once on the project in the dashboard and leave it out of every request. A request that sends one overrides the default.

JSON
{ "text": "xXsh1tXx", "context": "username" }