Skip to content

Commit

Permalink
Moderation 2025-01-24 (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis authored Jan 23, 2025
1 parent adbab48 commit 56bf01a
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 22 deletions.
3 changes: 3 additions & 0 deletions antiabuse/antirude/profile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

_strings = [
"1488",
"beaner",
"cervix",
"chink",
"chinks",
Expand Down Expand Up @@ -44,6 +45,8 @@
"nigger",
"niggerlicious",
"niggers",
"niglet",
"pajeet",
"rape",
"rapeable",
"rapebait"
Expand Down
40 changes: 24 additions & 16 deletions antiabuse/normalize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
# easier to detect coarse language later on
_normalization_map = {
"a[s5$]{2}": "ass",
"b[a4]ck ?sh[o0]t[s$z]": "backshots",
"b": "be",
"btch": "bitch",
"c0ck": "cock",
"c0cksucker": "cocksucker",
"c[a4][s$]h[a4]pp": "cashapp",
"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",
"cvmming": "cumming",
"cvmshot": "cumshot",
"dyck": "dick",
"ejakulate": "ejaculate",
"fcked": "fucked",
Expand All @@ -24,42 +25,49 @@
"fked": "fucked",
"fk": "fuck",
"fking": "fucking",
"fuckin": "fucking",
"fuked": "fucked",
"fuk": "fuck",
"fuking": "fucking",
"fvcked": "fucked",
"fvck": "fuck",
"fvcking": "fucking",
"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]ckin": "fucking",
"f[uv]cking": "fucking",
"f[uv]ked": "fucked",
"f[uv]k": "fuck",
"f[uv]king": "fucking",
"h[@a4]rm": "harm",
"k[iy]ll": "kill",
"l0licon": "lolicon",
"l0li": "loli",
"ngger": "nigger",
"nggr": "nigger",
"n[ie]g{1,2}re{1,2}s+": "negress",
"niga": "nigga",
"nigge": "nigger",
"nigglet": "niglet",
"nigg": "nigger",
"p0rn": "porn",
"p[e3]d[o0]": "pedo",
"pissin": "pissing",
"p[o0]rn": "porn",
"p[o0]rn": "porn",
"pr[o0]n": "porn",
"r[@a4]p[e3]-?able": "rapeable",
"r[a4]p[e3]d": "raped",
"r[@a4]p[e3]": "rape",
"r": "are",
"raype": "rape",
"s[e3]lf": "self",
"sxy": "sexy",
"tr[@a4]nnies": "trannies",
"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]-?able": "unrapeable",
"un-?r[@a4]p[e3]": "unrape",
"urself": "yourself",
"ur": "your",
"u": "you",
"wh0res": "whores",
"wh0re": "whore",
"wh[o0]r[e3][s$z]": "whores",
"wh[o0]r[e3]": "whores",
}


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

self.assertEqual(normalize_string("niga"), "nigga")

self.assertEqual(normalize_string("wh0r3$"), "whores")

self.assertEqual(normalize_string("fo0tj0b$"), "footjobs")

self.assertEqual(normalize_string("fo0tj0b"), "footjob")

self.assertEqual(normalize_string("tr00nz"), "troons")

self.assertEqual(normalize_string("r4p3d"), "raped")

self.assertEqual(normalize_string("b4ck sh0tz"), "backshots")


if __name__ == '__main__':
unittest.main()
2 changes: 2 additions & 0 deletions banned-club.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,7 @@ VALUES
('i am nine years old'),
('i am not a rapist'),
('i am not a rapist anymore'),
('iamracist'),
('i am seventeen years old'),
('i am seven years old'),
('i am sixteen years old'),
Expand Down Expand Up @@ -2463,6 +2464,7 @@ VALUES
('raceplay'),
('race war now'),
('racis'),
('racisisto'),
('racism'),
('racism inc'),
('racism is funny'),
Expand Down
2 changes: 1 addition & 1 deletion service/chat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

class IntroRateLimit(Enum):
NONE = 0
UNVERIFIED = 15
UNVERIFIED = 10
BASICS = 40
PHOTOS = 100

Expand Down
6 changes: 5 additions & 1 deletion service/chat/rude/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"assfucked",
"assfucker",
"assfucking",
"back shots",
"backshots",
"ballsack",
"bash your",
"beaner",
"beastial",
"beastiality",
"bellend",
Expand Down Expand Up @@ -200,6 +200,8 @@
"gaysex",
"genitalia",
"genitals",
"get piped",
"getting piped",
"gimme head",
"give me head",
"goatse",
Expand Down Expand Up @@ -283,6 +285,7 @@
"nigger",
"niggerlicious",
"niggers",
"niglet",
"nigs",
"nutsack",
"orgasim",
Expand Down Expand Up @@ -465,6 +468,7 @@
"you will never be a woman",
"you'll never be a woman",
"your throat",
"your virginity",
"ywnbaw",
"zoophilia",
]
Expand Down
8 changes: 7 additions & 1 deletion service/chat/rude/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ def test_rude_strings(self):
self.assertTrue(
is_rude("I am a p3d0"))

def test_inrude_strings(self):
self.assertTrue(
is_rude("Wanna get piped down?"))

def test_non_rude_strings(self):
self.assertFalse(
is_rude("She piped up after realizing that"))

self.assertFalse(
is_rude("go hug urself please"))

Expand Down
2 changes: 1 addition & 1 deletion test/functionality4/xmpp-rate-limit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ test_rate_limit () {
}

test_rate_limit \
15 \
10 \
1 \
'<duo_message_blocked id="id999" reason="rate-limited-1day" subreason="unverified-basics"/>'

Expand Down
4 changes: 2 additions & 2 deletions verification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def process_response(
# numbers.
#
# edit_truthiness_threshold = 0.9
# gender_truthiness_threshold = 0.5
# gender_truthiness_threshold = 0.6
# age_truthiness_threshold = 0.5
# minimum_age_truthiness_threshold = 0.8
# ethnicity_truthiness_threshold = 0.4
Expand All @@ -241,7 +241,7 @@ def process_response(
general_truthiness_threshold = 0.7

edit_truthiness_threshold = 0.9
gender_truthiness_threshold = 0.5
gender_truthiness_threshold = 0.6
age_truthiness_threshold = 0.5
minimum_age_truthiness_threshold = 0.8
ethnicity_truthiness_threshold = 0.4
Expand Down

0 comments on commit 56bf01a

Please sign in to comment.