Skip to content

Commit

Permalink
Moderation
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis committed Jan 29, 2025
1 parent dd9f176 commit 68272c5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
58 changes: 30 additions & 28 deletions antiabuse/normalize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,77 @@
# Used to convert slang in an input string to a more standard form so that it's
# easier to detect coarse language later on
_normalization_map = {
"[l1]0[l1]i": "loli",
"[l1]0[l1]icon": "lolicon",
"a[s5$]{2}": "ass",
"b[a4]ck ?sh[o0]t[s$z]": "backshots",
"b": "be",
"b[a4]ck ?sh[o0]t[s$z]": "backshots",
"b[i1y]?tch": "bitch",
"b[o0][o0]b[i1][e3][s$z]": "boobies",
"btch": "bitch",
"c+[uv]+m+": "cum",
"c+[uv]+m+s+": "cums",
"c[a4][s$z]h[a4]pp": "cashapp",
"c[o0]ck": "cock",
"c[o0]ck[s$z][uv]ck[e3]r": "cocksucker",
"cok": "cock",
"c+[uv]+m+": "cum",
"c[uv]mming": "cumming",
"c[uv]m[s$z]h[o0]t": "cumshot",
"c+[uv]+m+s+": "cums",
"c[uv]mming": "cumming",
"cok": "cock",
"d[iy1]k[e3]": "dyke",
"dyck": "dick",
"ejaku[l1]ate": "ejaculate",
"fcked": "fucked",
"fck": "fuck",
"fcking": "fucking",
"fked": "fucked",
"fk": "fuck",
"fking": "fucking",
"f[a4]*g+[o0]*t": "faggot",
"f[o0]{2}tj[o0]b": "footjob",
"f[o0]{2}tj[o0]b[s$z]": "footjobs",
"f[uv]ck[e3]d": "fucked",
"f[uv]ck": "fuck",
"f[uv]ck[e3]d": "fucked",
"f[uv]ckin": "fucking",
"f[uv]cking": "fucking",
"f[uv]ked": "fucked",
"f[uv]k": "fuck",
"f[uv]ked": "fucked",
"f[uv]king": "fucking",
"gr[o0][o0]mer": "groomer",
"fck": "fuck",
"fcked": "fucked",
"fcking": "fucking",
"fk": "fuck",
"fked": "fucked",
"fking": "fucking",
"gr[o0][o0]m": "groom",
"gr[o0][o0]mer": "groomer",
"h[@a4]rm": "harm",
"k[iy1][l1][l1]": "kill",
"[l1]0[l1]icon": "lolicon",
"[l1]0[l1]i": "loli",
"n[i1ye3]*g+(a|uh|e)": "nigga",
"n[i1ye3]*g+([e3]*r)?": "nigger",
"n[i1ye3]*g+(a|uh|e)": "nigga",
"n[i1ye3]*g+[e3]*r[s$z]": "niggers",
"n[i1ye3]gg[l1]et": "niglet",
"n[i1ye3]g+uh*": "nigga",
"n[i1ye3]gg[l1]et": "niglet",
"n[ie]g{1,2}re{1,2}s+": "negress",
"p[e3]d[o0]": "pedo",
"pissin": "pissing",
"p[iy1][s$][s$]": "piss",
"p[o0]rn": "porn",
"pissin": "pissing",
"pr[o0]n": "porn",
"r[@a4]p[e3]-?ab[l1]e": "rapeable",
"r[a4]p[e3]d": "raped",
"r[@a4]p[e3]": "rape",
"r": "are",
"r[@a4]p[e3]": "rape",
"r[@a4]p[e3]-?ab[l1]e": "rapeable",
"r[@a4]p[e3]d": "raped",
"r[@a4]p[i1]ng": "raping",
"raype": "rape",
"s[e3][l1]f": "self",
"sht": "shit",
"s[uv][i1]c[i1]d[e3]": "suicide",
"sht": "shit",
"sxy": "sexy",
"tr[@a4]nnie[s$z]": "trannies",
"tr[@a4]nny": "tranny",
"tr[o0]{2}n[s$z]": "troons",
"tr[o0]{2}n": "troon",
"un-?r[@a4]p[e3]-?ab[l1]e": "unrapeable",
"tr[o0]{2}n[s$z]": "troons",
"u": "you",
"un-?r[@a4]p[e3]": "unrape",
"urse[l1]f": "yourself",
"un-?r[@a4]p[e3]-?ab[l1]e": "unrapeable",
"ur": "your",
"u": "you",
"wh[o0]r[e3][s$z]": "whores",
"urse[l1]f": "yourself",
"wh[o0]r[e3]": "whores",
"wh[o0]r[e3][s$z]": "whores",
}


Expand Down
4 changes: 4 additions & 0 deletions antiabuse/normalize/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ def test_normalize_string(self):

self.assertEqual(normalize_string("nigg"), "nigger")

self.assertEqual(normalize_string("fag0t"), "faggot")

self.assertEqual(normalize_string("r@ping"), "raping")


if __name__ == '__main__':
unittest.main()

0 comments on commit 68272c5

Please sign in to comment.