Skip to content

Commit 42ae627

Browse files
committed
Add good word
1 parent 75c358f commit 42ae627

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

backend/internal/morse/moderation_goodwords.go

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var falsePositiveWordsList = []string{
1919
"basement",
2020
"bass",
2121
"cass", // cassie, cassandra, carcass
22+
"canu", // can u send, can u see
2223
"butter", // butter, butterfly
2324
"butthe",
2425
"button",

backend/internal/morse/moderation_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,18 @@ func TestContainsHateSpeech(t *testing.T) {
3232
{"t-o-l-m-a-c----o", true},
3333
{"t 0 l m 4 c o spacing ", true},
3434
{"!!!t.0.l.m.@.c.o spacing ", true},
35+
{"tolmaco", true},
36+
{"t0lmaco", true},
37+
{" t0lmaco", true},
38+
{"t0lmaco ", true},
39+
{"t0lmaco assume", true},
40+
{"tolmacotolmacotolmacotolmacotolmacotolmacotolmacotolmacotolmacotolmaco", true},
3541

3642
{"This test will not --pass-- if there is a false positive", false},
3743
{"I'm a business analyst living in sussex.", false},
3844
{"1 in 10 therapists recommend playing the bass", false},
3945
{"It's banal to assume that assassins and cocktails wil not make these tests pass", false},
46+
{"can u send ur earlier message", false},
4047
}
4148

4249
for _, test := range tests {

0 commit comments

Comments
 (0)