terlik.js 2.3.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -107
- package/dist/index.d.mts +16 -14
- package/dist/index.d.ts +16 -14
- package/dist/index.js +495 -32
- package/dist/index.mjs +495 -32
- package/package.json +14 -6
package/dist/index.js
CHANGED
|
@@ -181,18 +181,45 @@ function compilePatterns(entries, suffixes, charClasses, normalizeFn) {
|
|
|
181
181
|
for (const [, entry] of entries) {
|
|
182
182
|
const allForms = [entry.root, ...entry.variants];
|
|
183
183
|
const sortedForms = allForms.map((w) => normalizeFn(w)).filter((w) => w.length > 0).filter((w, i, arr) => arr.indexOf(w) === i).sort((a, b) => b.length - a.length);
|
|
184
|
-
const formPatterns = sortedForms.map(
|
|
185
|
-
(w) => wordToPattern(w, charClasses, normalizeFn)
|
|
186
|
-
);
|
|
187
|
-
const combined = formPatterns.join("|");
|
|
188
184
|
const useSuffix = entry.suffixable && suffixGroup.length > 0;
|
|
189
185
|
let pattern;
|
|
190
186
|
if (useSuffix) {
|
|
187
|
+
const formPatterns = sortedForms.map(
|
|
188
|
+
(w) => wordToPattern(w, charClasses, normalizeFn)
|
|
189
|
+
);
|
|
190
|
+
const combined = formPatterns.join("|");
|
|
191
191
|
pattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${suffixGroup}{0,${MAX_SUFFIX_CHAIN}}${WORD_BOUNDARY_AHEAD}`;
|
|
192
|
+
} else if (suffixGroup.length > 0) {
|
|
193
|
+
const MIN_VARIANT_SUFFIX_LEN = 4;
|
|
194
|
+
const strictForms = [];
|
|
195
|
+
const suffixableForms = [];
|
|
196
|
+
for (const w of sortedForms) {
|
|
197
|
+
if (w.length >= MIN_VARIANT_SUFFIX_LEN) {
|
|
198
|
+
suffixableForms.push(wordToPattern(w, charClasses, normalizeFn));
|
|
199
|
+
} else {
|
|
200
|
+
strictForms.push(wordToPattern(w, charClasses, normalizeFn));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const parts = [];
|
|
204
|
+
if (suffixableForms.length > 0) {
|
|
205
|
+
parts.push(`(?:${suffixableForms.join("|")})${suffixGroup}{0,${MAX_SUFFIX_CHAIN}}`);
|
|
206
|
+
}
|
|
207
|
+
if (strictForms.length > 0) {
|
|
208
|
+
parts.push(`(?:${strictForms.join("|")})`);
|
|
209
|
+
}
|
|
210
|
+
pattern = `${WORD_BOUNDARY_BEHIND}(?:${parts.join("|")})${WORD_BOUNDARY_AHEAD}`;
|
|
192
211
|
} else {
|
|
212
|
+
const formPatterns = sortedForms.map(
|
|
213
|
+
(w) => wordToPattern(w, charClasses, normalizeFn)
|
|
214
|
+
);
|
|
215
|
+
const combined = formPatterns.join("|");
|
|
193
216
|
pattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${WORD_BOUNDARY_AHEAD}`;
|
|
194
217
|
}
|
|
195
|
-
if (pattern.length > MAX_PATTERN_LENGTH
|
|
218
|
+
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
219
|
+
const formPatterns = sortedForms.map(
|
|
220
|
+
(w) => wordToPattern(w, charClasses, normalizeFn)
|
|
221
|
+
);
|
|
222
|
+
const combined = formPatterns.join("|");
|
|
196
223
|
pattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${WORD_BOUNDARY_AHEAD}`;
|
|
197
224
|
}
|
|
198
225
|
try {
|
|
@@ -206,7 +233,8 @@ function compilePatterns(entries, suffixes, charClasses, normalizeFn) {
|
|
|
206
233
|
} catch (err) {
|
|
207
234
|
if (useSuffix) {
|
|
208
235
|
try {
|
|
209
|
-
const
|
|
236
|
+
const fallbackForms = sortedForms.map((w) => wordToPattern(w, charClasses, normalizeFn)).join("|");
|
|
237
|
+
const fallbackPattern = `${WORD_BOUNDARY_BEHIND}(?:${fallbackForms})${WORD_BOUNDARY_AHEAD}`;
|
|
210
238
|
const regex = new RegExp(fallbackPattern, "gi");
|
|
211
239
|
patterns.push({
|
|
212
240
|
root: entry.root,
|
|
@@ -418,13 +446,16 @@ var Detector = class _Detector {
|
|
|
418
446
|
while ((match = pattern.regex.exec(searchText)) !== null) {
|
|
419
447
|
const matchedText = match[0];
|
|
420
448
|
const matchIndex = match.index;
|
|
449
|
+
if (whitelist.has(matchedText)) continue;
|
|
421
450
|
const normalizedMatch = this.normalizeFn(matchedText);
|
|
422
451
|
if (whitelist.has(normalizedMatch)) continue;
|
|
423
452
|
const surrounding = this.getSurroundingWord(searchText, matchIndex, matchedText.length);
|
|
453
|
+
if (whitelist.has(surrounding)) continue;
|
|
424
454
|
const normalizedSurrounding = this.normalizeFn(surrounding);
|
|
425
455
|
if (whitelist.has(normalizedSurrounding)) continue;
|
|
426
456
|
if (isNormalized) {
|
|
427
457
|
const mapped = this.mapNormalizedToOriginal(originalText, matchIndex, matchedText);
|
|
458
|
+
if (mapped && whitelist.has(mapped.word.toLowerCase())) continue;
|
|
428
459
|
if (mapped && !existingIndices.has(mapped.index)) {
|
|
429
460
|
results.push({
|
|
430
461
|
word: mapped.word,
|
|
@@ -698,7 +729,18 @@ var dictionary_default = {
|
|
|
698
729
|
"sikti\u011Fimin",
|
|
699
730
|
"sikermisiniz",
|
|
700
731
|
"sikermisin",
|
|
701
|
-
"siktirmi\u015Fcesine"
|
|
732
|
+
"siktirmi\u015Fcesine",
|
|
733
|
+
"sktr",
|
|
734
|
+
"siki\u015Fse",
|
|
735
|
+
"siki\u015Fecek",
|
|
736
|
+
"siki\u015Fen",
|
|
737
|
+
"siki\u015Fme",
|
|
738
|
+
"siki\u015Fmek",
|
|
739
|
+
"sikeceksin",
|
|
740
|
+
"sikecekler",
|
|
741
|
+
"sikece\u011Fim",
|
|
742
|
+
"sikmi\u015Fler",
|
|
743
|
+
"sikilecek"
|
|
702
744
|
],
|
|
703
745
|
severity: "high",
|
|
704
746
|
category: "sexual",
|
|
@@ -706,14 +748,31 @@ var dictionary_default = {
|
|
|
706
748
|
},
|
|
707
749
|
{
|
|
708
750
|
root: "amk",
|
|
709
|
-
variants: [
|
|
751
|
+
variants: [
|
|
752
|
+
"amk",
|
|
753
|
+
"amina",
|
|
754
|
+
"aminakoyim",
|
|
755
|
+
"aminakoydugum",
|
|
756
|
+
"amq",
|
|
757
|
+
"aminakoyayim",
|
|
758
|
+
"aminakoydum",
|
|
759
|
+
"aminakoydugumun",
|
|
760
|
+
"aq"
|
|
761
|
+
],
|
|
710
762
|
severity: "high",
|
|
711
763
|
category: "sexual",
|
|
712
764
|
suffixable: false
|
|
713
765
|
},
|
|
714
766
|
{
|
|
715
767
|
root: "orospu",
|
|
716
|
-
variants: [
|
|
768
|
+
variants: [
|
|
769
|
+
"orospucocugu",
|
|
770
|
+
"orosbucocugu",
|
|
771
|
+
"orspu",
|
|
772
|
+
"oruspu",
|
|
773
|
+
"orosbu",
|
|
774
|
+
"orospucocuklari"
|
|
775
|
+
],
|
|
717
776
|
severity: "high",
|
|
718
777
|
category: "insult",
|
|
719
778
|
suffixable: true
|
|
@@ -727,7 +786,16 @@ var dictionary_default = {
|
|
|
727
786
|
},
|
|
728
787
|
{
|
|
729
788
|
root: "yarrak",
|
|
730
|
-
variants: [
|
|
789
|
+
variants: [
|
|
790
|
+
"yarak",
|
|
791
|
+
"yarrak",
|
|
792
|
+
"yarakli",
|
|
793
|
+
"dalyarak",
|
|
794
|
+
"dalyarrak",
|
|
795
|
+
"yarrani",
|
|
796
|
+
"yarragimi",
|
|
797
|
+
"yarragini"
|
|
798
|
+
],
|
|
731
799
|
severity: "high",
|
|
732
800
|
category: "sexual",
|
|
733
801
|
suffixable: true
|
|
@@ -745,7 +813,8 @@ var dictionary_default = {
|
|
|
745
813
|
"gotler",
|
|
746
814
|
"gotlu",
|
|
747
815
|
"gotunden",
|
|
748
|
-
"gotune"
|
|
816
|
+
"gotune",
|
|
817
|
+
"gotos"
|
|
749
818
|
],
|
|
750
819
|
severity: "high",
|
|
751
820
|
category: "sexual",
|
|
@@ -890,6 +959,104 @@ var dictionary_default = {
|
|
|
890
959
|
severity: "high",
|
|
891
960
|
category: "insult",
|
|
892
961
|
suffixable: true
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
root: "s\xFCrt\xFCk",
|
|
965
|
+
variants: ["surtuk"],
|
|
966
|
+
severity: "high",
|
|
967
|
+
category: "insult",
|
|
968
|
+
suffixable: true
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
root: "kaltak",
|
|
972
|
+
variants: [],
|
|
973
|
+
severity: "high",
|
|
974
|
+
category: "insult",
|
|
975
|
+
suffixable: true
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
root: "fahi\u015Fe",
|
|
979
|
+
variants: ["fahise"],
|
|
980
|
+
severity: "high",
|
|
981
|
+
category: "insult",
|
|
982
|
+
suffixable: true
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
root: "keva\u015Fe",
|
|
986
|
+
variants: ["kevase"],
|
|
987
|
+
severity: "medium",
|
|
988
|
+
category: "insult",
|
|
989
|
+
suffixable: true
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
root: "o\u011Flanc\u0131",
|
|
993
|
+
variants: ["oglanci"],
|
|
994
|
+
severity: "high",
|
|
995
|
+
category: "slur",
|
|
996
|
+
suffixable: true
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
root: "dingil",
|
|
1000
|
+
variants: [],
|
|
1001
|
+
severity: "low",
|
|
1002
|
+
category: "insult",
|
|
1003
|
+
suffixable: true
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
root: "avanak",
|
|
1007
|
+
variants: [],
|
|
1008
|
+
severity: "low",
|
|
1009
|
+
category: "insult",
|
|
1010
|
+
suffixable: true
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
root: "manyak",
|
|
1014
|
+
variants: [],
|
|
1015
|
+
severity: "low",
|
|
1016
|
+
category: "insult",
|
|
1017
|
+
suffixable: true
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
root: "h\xF6d\xFCk",
|
|
1021
|
+
variants: ["hoduk"],
|
|
1022
|
+
severity: "low",
|
|
1023
|
+
category: "insult",
|
|
1024
|
+
suffixable: true
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
root: "kepaze",
|
|
1028
|
+
variants: [],
|
|
1029
|
+
severity: "medium",
|
|
1030
|
+
category: "insult",
|
|
1031
|
+
suffixable: true
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
root: "rezil",
|
|
1035
|
+
variants: [],
|
|
1036
|
+
severity: "medium",
|
|
1037
|
+
category: "insult",
|
|
1038
|
+
suffixable: true
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
root: "kalle\u015F",
|
|
1042
|
+
variants: ["kalles"],
|
|
1043
|
+
severity: "medium",
|
|
1044
|
+
category: "insult",
|
|
1045
|
+
suffixable: true
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
root: "namussuz",
|
|
1049
|
+
variants: [],
|
|
1050
|
+
severity: "medium",
|
|
1051
|
+
category: "insult",
|
|
1052
|
+
suffixable: true
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
root: "ahlaks\u0131z",
|
|
1056
|
+
variants: ["ahlaksiz"],
|
|
1057
|
+
severity: "medium",
|
|
1058
|
+
category: "insult",
|
|
1059
|
+
suffixable: true
|
|
893
1060
|
}
|
|
894
1061
|
],
|
|
895
1062
|
whitelist: [
|
|
@@ -911,6 +1078,10 @@ var dictionary_default = {
|
|
|
911
1078
|
"amonyak",
|
|
912
1079
|
"amper",
|
|
913
1080
|
"ampul",
|
|
1081
|
+
"amazon",
|
|
1082
|
+
"ambargo",
|
|
1083
|
+
"amblem",
|
|
1084
|
+
"amfibi",
|
|
914
1085
|
"boks\xF6r",
|
|
915
1086
|
"bokser",
|
|
916
1087
|
"bokluk",
|
|
@@ -922,6 +1093,7 @@ var dictionary_default = {
|
|
|
922
1093
|
"mallorca",
|
|
923
1094
|
"malta",
|
|
924
1095
|
"malt",
|
|
1096
|
+
"malum",
|
|
925
1097
|
"gotan",
|
|
926
1098
|
"gotik",
|
|
927
1099
|
"gotham",
|
|
@@ -939,12 +1111,22 @@ var dictionary_default = {
|
|
|
939
1111
|
"dolunay",
|
|
940
1112
|
"dolum",
|
|
941
1113
|
"doluluk",
|
|
1114
|
+
"dolap",
|
|
1115
|
+
"dolar",
|
|
1116
|
+
"dolma",
|
|
1117
|
+
"dolmus",
|
|
942
1118
|
"ama",
|
|
943
1119
|
"ami",
|
|
944
1120
|
"amen",
|
|
945
1121
|
"amir",
|
|
946
1122
|
"amil",
|
|
947
|
-
"dolmen"
|
|
1123
|
+
"dolmen",
|
|
1124
|
+
"namus",
|
|
1125
|
+
"namuslu",
|
|
1126
|
+
"ahlak",
|
|
1127
|
+
"ahlaki",
|
|
1128
|
+
"s\u0131k\u0131c\u0131",
|
|
1129
|
+
"s\u0131kerler"
|
|
948
1130
|
]
|
|
949
1131
|
};
|
|
950
1132
|
|
|
@@ -1028,6 +1210,24 @@ function validateDictionary(data) {
|
|
|
1028
1210
|
}
|
|
1029
1211
|
return data;
|
|
1030
1212
|
}
|
|
1213
|
+
function mergeDictionaries(base, ext) {
|
|
1214
|
+
const existingRoots = new Set(base.entries.map((e) => e.root.toLowerCase()));
|
|
1215
|
+
const mergedEntries = [...base.entries];
|
|
1216
|
+
for (const entry of ext.entries) {
|
|
1217
|
+
if (!existingRoots.has(entry.root.toLowerCase())) {
|
|
1218
|
+
mergedEntries.push(entry);
|
|
1219
|
+
existingRoots.add(entry.root.toLowerCase());
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
const mergedSuffixes = [.../* @__PURE__ */ new Set([...base.suffixes, ...ext.suffixes])];
|
|
1223
|
+
const mergedWhitelist = [.../* @__PURE__ */ new Set([...base.whitelist, ...ext.whitelist])];
|
|
1224
|
+
return {
|
|
1225
|
+
version: base.version,
|
|
1226
|
+
suffixes: mergedSuffixes,
|
|
1227
|
+
entries: mergedEntries,
|
|
1228
|
+
whitelist: mergedWhitelist
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1031
1231
|
|
|
1032
1232
|
// src/lang/tr/config.ts
|
|
1033
1233
|
var validatedData = validateDictionary(dictionary_default);
|
|
@@ -1106,21 +1306,21 @@ var dictionary_default2 = {
|
|
|
1106
1306
|
entries: [
|
|
1107
1307
|
{
|
|
1108
1308
|
root: "fuck",
|
|
1109
|
-
variants: ["fucking", "fucker", "fucked", "fuckers", "fucks", "fck", "fuk", "fuking", "fcking", "stfu", "motherfucker", "motherfucking", "fuckface", "fuckwit", "clusterfuck", "mindfuck"],
|
|
1309
|
+
variants: ["fucking", "fucker", "fucked", "fuckers", "fucks", "fck", "fuk", "fuking", "fcking", "stfu", "motherfucker", "motherfucking", "fuckface", "fuckwit", "clusterfuck", "mindfuck", "fuckboy", "fucktard", "fuckhead", "wtf", "mofo"],
|
|
1110
1310
|
severity: "high",
|
|
1111
1311
|
category: "sexual",
|
|
1112
1312
|
suffixable: true
|
|
1113
1313
|
},
|
|
1114
1314
|
{
|
|
1115
1315
|
root: "shit",
|
|
1116
|
-
variants: ["shitty", "bullshit", "shitting", "sht", "shits", "shite", "shithead", "shitstorm", "dipshit", "horseshit", "batshit", "apeshit", "shithole", "shitface", "shitshow"],
|
|
1316
|
+
variants: ["shitty", "bullshit", "shitting", "sht", "shits", "shite", "shithead", "shitstorm", "dipshit", "horseshit", "batshit", "apeshit", "shithole", "shitface", "shitshow", "shitbag", "shitload", "shithouse", "shitlist"],
|
|
1117
1317
|
severity: "high",
|
|
1118
1318
|
category: "general",
|
|
1119
1319
|
suffixable: true
|
|
1120
1320
|
},
|
|
1121
1321
|
{
|
|
1122
1322
|
root: "ass",
|
|
1123
|
-
variants: ["asses", "arse", "arses", "asshat", "asswipe", "smartass", "dumbass", "fatass", "badass", "jackass", "lardass", "kickass"],
|
|
1323
|
+
variants: ["asses", "arse", "arses", "asshat", "asswipe", "smartass", "dumbass", "fatass", "badass", "jackass", "lardass", "kickass", "asscrack", "assclown"],
|
|
1124
1324
|
severity: "medium",
|
|
1125
1325
|
category: "insult",
|
|
1126
1326
|
suffixable: false
|
|
@@ -1134,7 +1334,7 @@ var dictionary_default2 = {
|
|
|
1134
1334
|
},
|
|
1135
1335
|
{
|
|
1136
1336
|
root: "bitch",
|
|
1137
|
-
variants: ["bitches", "bitchy", "biatch", "bitching", "bitchass", "sonofabitch"],
|
|
1337
|
+
variants: ["bitches", "bitchy", "biatch", "bitching", "bitchass", "sonofabitch", "bitchslap"],
|
|
1138
1338
|
severity: "high",
|
|
1139
1339
|
category: "insult",
|
|
1140
1340
|
suffixable: true
|
|
@@ -1155,7 +1355,7 @@ var dictionary_default2 = {
|
|
|
1155
1355
|
},
|
|
1156
1356
|
{
|
|
1157
1357
|
root: "cock",
|
|
1158
|
-
variants: ["cocks", "cocksucker", "cocksucking", "cockhead"],
|
|
1358
|
+
variants: ["cocks", "cocksucker", "cocksucking", "cockhead", "cockblock"],
|
|
1159
1359
|
severity: "high",
|
|
1160
1360
|
category: "sexual",
|
|
1161
1361
|
suffixable: false
|
|
@@ -1264,17 +1464,113 @@ var dictionary_default2 = {
|
|
|
1264
1464
|
severity: "medium",
|
|
1265
1465
|
category: "insult",
|
|
1266
1466
|
suffixable: false
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
root: "spic",
|
|
1470
|
+
variants: ["spick", "spics", "spicks"],
|
|
1471
|
+
severity: "high",
|
|
1472
|
+
category: "slur",
|
|
1473
|
+
suffixable: false
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
root: "kike",
|
|
1477
|
+
variants: ["kikes"],
|
|
1478
|
+
severity: "high",
|
|
1479
|
+
category: "slur",
|
|
1480
|
+
suffixable: false
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
root: "chink",
|
|
1484
|
+
variants: ["chinks", "chinky"],
|
|
1485
|
+
severity: "high",
|
|
1486
|
+
category: "slur",
|
|
1487
|
+
suffixable: false
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
root: "gook",
|
|
1491
|
+
variants: ["gooks"],
|
|
1492
|
+
severity: "high",
|
|
1493
|
+
category: "slur",
|
|
1494
|
+
suffixable: false
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
root: "tranny",
|
|
1498
|
+
variants: ["trannies", "trannie"],
|
|
1499
|
+
severity: "high",
|
|
1500
|
+
category: "slur",
|
|
1501
|
+
suffixable: false
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
root: "dyke",
|
|
1505
|
+
variants: ["dykes"],
|
|
1506
|
+
severity: "high",
|
|
1507
|
+
category: "slur",
|
|
1508
|
+
suffixable: false
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
root: "coon",
|
|
1512
|
+
variants: ["coons"],
|
|
1513
|
+
severity: "high",
|
|
1514
|
+
category: "slur",
|
|
1515
|
+
suffixable: false
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
root: "wetback",
|
|
1519
|
+
variants: ["wetbacks"],
|
|
1520
|
+
severity: "high",
|
|
1521
|
+
category: "slur",
|
|
1522
|
+
suffixable: false
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
root: "bellend",
|
|
1526
|
+
variants: ["bellends"],
|
|
1527
|
+
severity: "medium",
|
|
1528
|
+
category: "insult",
|
|
1529
|
+
suffixable: false
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
root: "skank",
|
|
1533
|
+
variants: ["skanks", "skanky"],
|
|
1534
|
+
severity: "medium",
|
|
1535
|
+
category: "insult",
|
|
1536
|
+
suffixable: true
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
root: "scumbag",
|
|
1540
|
+
variants: ["scumbags"],
|
|
1541
|
+
severity: "medium",
|
|
1542
|
+
category: "insult",
|
|
1543
|
+
suffixable: false
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
root: "turd",
|
|
1547
|
+
variants: ["turds"],
|
|
1548
|
+
severity: "low",
|
|
1549
|
+
category: "general",
|
|
1550
|
+
suffixable: false
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
root: "bugger",
|
|
1554
|
+
variants: ["buggered", "buggering", "buggers", "buggery"],
|
|
1555
|
+
severity: "medium",
|
|
1556
|
+
category: "general",
|
|
1557
|
+
suffixable: true
|
|
1267
1558
|
}
|
|
1268
1559
|
],
|
|
1269
1560
|
whitelist: [
|
|
1270
1561
|
"assembly",
|
|
1271
1562
|
"assist",
|
|
1272
1563
|
"assassin",
|
|
1564
|
+
"assassinate",
|
|
1565
|
+
"assistant",
|
|
1566
|
+
"assessment",
|
|
1273
1567
|
"bass",
|
|
1274
1568
|
"class",
|
|
1275
1569
|
"classic",
|
|
1276
1570
|
"classify",
|
|
1571
|
+
"classroom",
|
|
1277
1572
|
"grass",
|
|
1573
|
+
"grasshopper",
|
|
1278
1574
|
"mass",
|
|
1279
1575
|
"massive",
|
|
1280
1576
|
"pass",
|
|
@@ -1292,11 +1588,18 @@ var dictionary_default2 = {
|
|
|
1292
1588
|
"dickens",
|
|
1293
1589
|
"cocktail",
|
|
1294
1590
|
"cockatoo",
|
|
1591
|
+
"cockatiel",
|
|
1592
|
+
"cockpit",
|
|
1593
|
+
"cockroach",
|
|
1594
|
+
"cockney",
|
|
1295
1595
|
"peacock",
|
|
1296
1596
|
"hancock",
|
|
1597
|
+
"shuttlecock",
|
|
1598
|
+
"woodcock",
|
|
1297
1599
|
"scrap",
|
|
1298
1600
|
"scrappy",
|
|
1299
1601
|
"shitake",
|
|
1602
|
+
"shiitake",
|
|
1300
1603
|
"document",
|
|
1301
1604
|
"buckle",
|
|
1302
1605
|
"piston",
|
|
@@ -1308,7 +1611,13 @@ var dictionary_default2 = {
|
|
|
1308
1611
|
"massage",
|
|
1309
1612
|
"compass",
|
|
1310
1613
|
"trespass",
|
|
1311
|
-
"harass"
|
|
1614
|
+
"harass",
|
|
1615
|
+
"cocoon",
|
|
1616
|
+
"raccoon",
|
|
1617
|
+
"tycoon",
|
|
1618
|
+
"dike",
|
|
1619
|
+
"vandyke",
|
|
1620
|
+
"scunthorpe"
|
|
1312
1621
|
]
|
|
1313
1622
|
};
|
|
1314
1623
|
|
|
@@ -1373,7 +1682,7 @@ var dictionary_default3 = {
|
|
|
1373
1682
|
},
|
|
1374
1683
|
{
|
|
1375
1684
|
root: "puta",
|
|
1376
|
-
variants: ["putas", "putada", "puto", "putos", "hijoputa", "hijaputa", "putero", "puton", "putear"],
|
|
1685
|
+
variants: ["putas", "putada", "puto", "putos", "hijoputa", "hijaputa", "putero", "puton", "putear", "putazo", "puteada"],
|
|
1377
1686
|
severity: "high",
|
|
1378
1687
|
category: "insult",
|
|
1379
1688
|
suffixable: true
|
|
@@ -1394,7 +1703,7 @@ var dictionary_default3 = {
|
|
|
1394
1703
|
},
|
|
1395
1704
|
{
|
|
1396
1705
|
root: "co\xF1o",
|
|
1397
|
-
variants: ["cono", "conos", "co\xF1os"],
|
|
1706
|
+
variants: ["cono", "conos", "co\xF1os", "co\xF1azo"],
|
|
1398
1707
|
severity: "high",
|
|
1399
1708
|
category: "sexual",
|
|
1400
1709
|
suffixable: false
|
|
@@ -1408,7 +1717,7 @@ var dictionary_default3 = {
|
|
|
1408
1717
|
},
|
|
1409
1718
|
{
|
|
1410
1719
|
root: "chingar",
|
|
1411
|
-
variants: ["chingado", "chingada", "chingados", "chinga", "chingas", "chingo", "chingon", "chingona", "chingadera"],
|
|
1720
|
+
variants: ["chingado", "chingada", "chingados", "chinga", "chingas", "chingo", "chingon", "chingona", "chingadera", "chingue", "chingues"],
|
|
1412
1721
|
severity: "high",
|
|
1413
1722
|
category: "general",
|
|
1414
1723
|
suffixable: true
|
|
@@ -1485,7 +1794,7 @@ var dictionary_default3 = {
|
|
|
1485
1794
|
},
|
|
1486
1795
|
{
|
|
1487
1796
|
root: "mamada",
|
|
1488
|
-
variants: ["mamadas", "mamazo", "mamon", "mamona", "mamones"],
|
|
1797
|
+
variants: ["mamadas", "mamazo", "mamon", "mamona", "mamones", "mamonazo"],
|
|
1489
1798
|
severity: "medium",
|
|
1490
1799
|
category: "sexual",
|
|
1491
1800
|
suffixable: false
|
|
@@ -1496,6 +1805,76 @@ var dictionary_default3 = {
|
|
|
1496
1805
|
severity: "medium",
|
|
1497
1806
|
category: "general",
|
|
1498
1807
|
suffixable: false
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
root: "culero",
|
|
1811
|
+
variants: ["culeros", "culera", "culeras"],
|
|
1812
|
+
severity: "medium",
|
|
1813
|
+
category: "insult",
|
|
1814
|
+
suffixable: false
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
root: "cojones",
|
|
1818
|
+
variants: ["cojon", "cojonudo"],
|
|
1819
|
+
severity: "medium",
|
|
1820
|
+
category: "sexual",
|
|
1821
|
+
suffixable: false
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
root: "polla",
|
|
1825
|
+
variants: ["pollas", "pollon"],
|
|
1826
|
+
severity: "high",
|
|
1827
|
+
category: "sexual",
|
|
1828
|
+
suffixable: false
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
root: "follar",
|
|
1832
|
+
variants: ["follando", "follado", "follada"],
|
|
1833
|
+
severity: "high",
|
|
1834
|
+
category: "sexual",
|
|
1835
|
+
suffixable: true
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
root: "capullo",
|
|
1839
|
+
variants: ["capullos"],
|
|
1840
|
+
severity: "medium",
|
|
1841
|
+
category: "insult",
|
|
1842
|
+
suffixable: false
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
root: "guarro",
|
|
1846
|
+
variants: ["guarros", "guarra", "guarras", "guarrada"],
|
|
1847
|
+
severity: "medium",
|
|
1848
|
+
category: "insult",
|
|
1849
|
+
suffixable: true
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
root: "boludo",
|
|
1853
|
+
variants: ["boludos", "boluda", "boludez"],
|
|
1854
|
+
severity: "medium",
|
|
1855
|
+
category: "insult",
|
|
1856
|
+
suffixable: false
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
root: "pelotudo",
|
|
1860
|
+
variants: ["pelotudos", "pelotuda", "pelotudez"],
|
|
1861
|
+
severity: "medium",
|
|
1862
|
+
category: "insult",
|
|
1863
|
+
suffixable: false
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
root: "hostia",
|
|
1867
|
+
variants: ["hostias"],
|
|
1868
|
+
severity: "medium",
|
|
1869
|
+
category: "general",
|
|
1870
|
+
suffixable: false
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
root: "soplapollas",
|
|
1874
|
+
variants: [],
|
|
1875
|
+
severity: "high",
|
|
1876
|
+
category: "insult",
|
|
1877
|
+
suffixable: false
|
|
1499
1878
|
}
|
|
1500
1879
|
],
|
|
1501
1880
|
whitelist: [
|
|
@@ -1513,7 +1892,13 @@ var dictionary_default3 = {
|
|
|
1513
1892
|
"vehicular",
|
|
1514
1893
|
"particular",
|
|
1515
1894
|
"articulo",
|
|
1516
|
-
"maricopa"
|
|
1895
|
+
"maricopa",
|
|
1896
|
+
"pollo",
|
|
1897
|
+
"pollito",
|
|
1898
|
+
"polleria",
|
|
1899
|
+
"polluelo",
|
|
1900
|
+
"folleto",
|
|
1901
|
+
"follaje"
|
|
1517
1902
|
]
|
|
1518
1903
|
};
|
|
1519
1904
|
|
|
@@ -1584,21 +1969,21 @@ var dictionary_default4 = {
|
|
|
1584
1969
|
entries: [
|
|
1585
1970
|
{
|
|
1586
1971
|
root: "schei\xDFe",
|
|
1587
|
-
variants: ["scheisse", "scheiss", "scheisser", "scheisserei", "beschissen"],
|
|
1972
|
+
variants: ["scheisse", "scheiss", "scheisser", "scheisserei", "beschissen", "scheissegal"],
|
|
1588
1973
|
severity: "high",
|
|
1589
1974
|
category: "general",
|
|
1590
1975
|
suffixable: true
|
|
1591
1976
|
},
|
|
1592
1977
|
{
|
|
1593
1978
|
root: "fick",
|
|
1594
|
-
variants: ["ficken", "ficker", "gefickt", "fickend", "fickerei", "abgefickt"],
|
|
1979
|
+
variants: ["ficken", "ficker", "gefickt", "fickend", "fickerei", "abgefickt", "verfickt", "fickfehler"],
|
|
1595
1980
|
severity: "high",
|
|
1596
1981
|
category: "sexual",
|
|
1597
1982
|
suffixable: true
|
|
1598
1983
|
},
|
|
1599
1984
|
{
|
|
1600
1985
|
root: "arsch",
|
|
1601
|
-
variants: ["arschloch", "arscher", "arschgeige", "arschgesicht", "arschkriecher"],
|
|
1986
|
+
variants: ["arschloch", "arscher", "arschgeige", "arschgesicht", "arschkriecher", "arschbacke", "arschl\xF6cher", "arschlocher"],
|
|
1602
1987
|
severity: "high",
|
|
1603
1988
|
category: "insult",
|
|
1604
1989
|
suffixable: true
|
|
@@ -1626,7 +2011,7 @@ var dictionary_default4 = {
|
|
|
1626
2011
|
},
|
|
1627
2012
|
{
|
|
1628
2013
|
root: "wichser",
|
|
1629
|
-
variants: ["wichsern", "wichse", "wichsen", "gewichst"],
|
|
2014
|
+
variants: ["wichsern", "wichse", "wichsen", "gewichst", "wixer"],
|
|
1630
2015
|
severity: "high",
|
|
1631
2016
|
category: "sexual",
|
|
1632
2017
|
suffixable: false
|
|
@@ -1640,7 +2025,7 @@ var dictionary_default4 = {
|
|
|
1640
2025
|
},
|
|
1641
2026
|
{
|
|
1642
2027
|
root: "schlampe",
|
|
1643
|
-
variants: ["schlampen", "schlampig"],
|
|
2028
|
+
variants: ["schlampen", "schlampig", "schlamperei"],
|
|
1644
2029
|
severity: "high",
|
|
1645
2030
|
category: "insult",
|
|
1646
2031
|
suffixable: true
|
|
@@ -1696,7 +2081,7 @@ var dictionary_default4 = {
|
|
|
1696
2081
|
},
|
|
1697
2082
|
{
|
|
1698
2083
|
root: "dreck",
|
|
1699
|
-
variants: ["dreckig", "dreckiger", "dreckiges"],
|
|
2084
|
+
variants: ["dreckig", "dreckiger", "dreckiges", "drecksack", "dreckst\xFCck", "dreckstuck"],
|
|
1700
2085
|
severity: "medium",
|
|
1701
2086
|
category: "general",
|
|
1702
2087
|
suffixable: true
|
|
@@ -1707,12 +2092,85 @@ var dictionary_default4 = {
|
|
|
1707
2092
|
severity: "low",
|
|
1708
2093
|
category: "insult",
|
|
1709
2094
|
suffixable: false
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
root: "schwuchtel",
|
|
2098
|
+
variants: ["schwuchteln"],
|
|
2099
|
+
severity: "high",
|
|
2100
|
+
category: "slur",
|
|
2101
|
+
suffixable: false
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
root: "spast",
|
|
2105
|
+
variants: ["spasten", "spasti"],
|
|
2106
|
+
severity: "high",
|
|
2107
|
+
category: "slur",
|
|
2108
|
+
suffixable: false
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
root: "mistst\xFCck",
|
|
2112
|
+
variants: ["miststueck"],
|
|
2113
|
+
severity: "medium",
|
|
2114
|
+
category: "insult",
|
|
2115
|
+
suffixable: false
|
|
2116
|
+
},
|
|
2117
|
+
{
|
|
2118
|
+
root: "bastard",
|
|
2119
|
+
variants: ["bastarde"],
|
|
2120
|
+
severity: "medium",
|
|
2121
|
+
category: "insult",
|
|
2122
|
+
suffixable: false
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
root: "penner",
|
|
2126
|
+
variants: ["penners"],
|
|
2127
|
+
severity: "low",
|
|
2128
|
+
category: "insult",
|
|
2129
|
+
suffixable: false
|
|
2130
|
+
},
|
|
2131
|
+
{
|
|
2132
|
+
root: "bl\xF6dmann",
|
|
2133
|
+
variants: ["blodmann", "bl\xF6dm\xE4nner"],
|
|
2134
|
+
severity: "low",
|
|
2135
|
+
category: "insult",
|
|
2136
|
+
suffixable: false
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
root: "vollpfosten",
|
|
2140
|
+
variants: [],
|
|
2141
|
+
severity: "medium",
|
|
2142
|
+
category: "insult",
|
|
2143
|
+
suffixable: false
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
root: "hackfresse",
|
|
2147
|
+
variants: [],
|
|
2148
|
+
severity: "high",
|
|
2149
|
+
category: "insult",
|
|
2150
|
+
suffixable: false
|
|
2151
|
+
},
|
|
2152
|
+
{
|
|
2153
|
+
root: "pissnelke",
|
|
2154
|
+
variants: [],
|
|
2155
|
+
severity: "medium",
|
|
2156
|
+
category: "insult",
|
|
2157
|
+
suffixable: false
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
root: "spacken",
|
|
2161
|
+
variants: [],
|
|
2162
|
+
severity: "low",
|
|
2163
|
+
category: "insult",
|
|
2164
|
+
suffixable: false
|
|
1710
2165
|
}
|
|
1711
2166
|
],
|
|
1712
2167
|
whitelist: [
|
|
1713
2168
|
"ficktion",
|
|
1714
2169
|
"arschen",
|
|
1715
|
-
"schwanzen"
|
|
2170
|
+
"schwanzen",
|
|
2171
|
+
"schwanger",
|
|
2172
|
+
"schwangerschaft",
|
|
2173
|
+
"geschichte"
|
|
1716
2174
|
]
|
|
1717
2175
|
};
|
|
1718
2176
|
|
|
@@ -1930,12 +2388,17 @@ var Terlik = class _Terlik {
|
|
|
1930
2388
|
leetMap: langConfig.leetMap,
|
|
1931
2389
|
numberExpansions: langConfig.numberExpansions
|
|
1932
2390
|
});
|
|
2391
|
+
let dictData = langConfig.dictionary;
|
|
2392
|
+
if (options?.extendDictionary) {
|
|
2393
|
+
validateDictionary(options.extendDictionary);
|
|
2394
|
+
dictData = mergeDictionaries(dictData, options.extendDictionary);
|
|
2395
|
+
}
|
|
1933
2396
|
this.dictionary = new Dictionary(
|
|
1934
|
-
|
|
2397
|
+
dictData,
|
|
1935
2398
|
options?.customList,
|
|
1936
2399
|
options?.whitelist
|
|
1937
2400
|
);
|
|
1938
|
-
const hasCustomDict = !!(options?.customList?.length || options?.whitelist?.length);
|
|
2401
|
+
const hasCustomDict = !!(options?.customList?.length || options?.whitelist?.length || options?.extendDictionary);
|
|
1939
2402
|
this.detector = new Detector(
|
|
1940
2403
|
this.dictionary,
|
|
1941
2404
|
normalizeFn,
|