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/dist/index.mjs CHANGED
@@ -148,18 +148,45 @@ function compilePatterns(entries, suffixes, charClasses, normalizeFn) {
148
148
  for (const [, entry] of entries) {
149
149
  const allForms = [entry.root, ...entry.variants];
150
150
  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);
151
- const formPatterns = sortedForms.map(
152
- (w) => wordToPattern(w, charClasses, normalizeFn)
153
- );
154
- const combined = formPatterns.join("|");
155
151
  const useSuffix = entry.suffixable && suffixGroup.length > 0;
156
152
  let pattern;
157
153
  if (useSuffix) {
154
+ const formPatterns = sortedForms.map(
155
+ (w) => wordToPattern(w, charClasses, normalizeFn)
156
+ );
157
+ const combined = formPatterns.join("|");
158
158
  pattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${suffixGroup}{0,${MAX_SUFFIX_CHAIN}}${WORD_BOUNDARY_AHEAD}`;
159
+ } else if (suffixGroup.length > 0) {
160
+ const MIN_VARIANT_SUFFIX_LEN = 4;
161
+ const strictForms = [];
162
+ const suffixableForms = [];
163
+ for (const w of sortedForms) {
164
+ if (w.length >= MIN_VARIANT_SUFFIX_LEN) {
165
+ suffixableForms.push(wordToPattern(w, charClasses, normalizeFn));
166
+ } else {
167
+ strictForms.push(wordToPattern(w, charClasses, normalizeFn));
168
+ }
169
+ }
170
+ const parts = [];
171
+ if (suffixableForms.length > 0) {
172
+ parts.push(`(?:${suffixableForms.join("|")})${suffixGroup}{0,${MAX_SUFFIX_CHAIN}}`);
173
+ }
174
+ if (strictForms.length > 0) {
175
+ parts.push(`(?:${strictForms.join("|")})`);
176
+ }
177
+ pattern = `${WORD_BOUNDARY_BEHIND}(?:${parts.join("|")})${WORD_BOUNDARY_AHEAD}`;
159
178
  } else {
179
+ const formPatterns = sortedForms.map(
180
+ (w) => wordToPattern(w, charClasses, normalizeFn)
181
+ );
182
+ const combined = formPatterns.join("|");
160
183
  pattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${WORD_BOUNDARY_AHEAD}`;
161
184
  }
162
- if (pattern.length > MAX_PATTERN_LENGTH && useSuffix) {
185
+ if (pattern.length > MAX_PATTERN_LENGTH) {
186
+ const formPatterns = sortedForms.map(
187
+ (w) => wordToPattern(w, charClasses, normalizeFn)
188
+ );
189
+ const combined = formPatterns.join("|");
163
190
  pattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${WORD_BOUNDARY_AHEAD}`;
164
191
  }
165
192
  try {
@@ -173,7 +200,8 @@ function compilePatterns(entries, suffixes, charClasses, normalizeFn) {
173
200
  } catch (err) {
174
201
  if (useSuffix) {
175
202
  try {
176
- const fallbackPattern = `${WORD_BOUNDARY_BEHIND}(?:${combined})${WORD_BOUNDARY_AHEAD}`;
203
+ const fallbackForms = sortedForms.map((w) => wordToPattern(w, charClasses, normalizeFn)).join("|");
204
+ const fallbackPattern = `${WORD_BOUNDARY_BEHIND}(?:${fallbackForms})${WORD_BOUNDARY_AHEAD}`;
177
205
  const regex = new RegExp(fallbackPattern, "gi");
178
206
  patterns.push({
179
207
  root: entry.root,
@@ -385,13 +413,16 @@ var Detector = class _Detector {
385
413
  while ((match = pattern.regex.exec(searchText)) !== null) {
386
414
  const matchedText = match[0];
387
415
  const matchIndex = match.index;
416
+ if (whitelist.has(matchedText)) continue;
388
417
  const normalizedMatch = this.normalizeFn(matchedText);
389
418
  if (whitelist.has(normalizedMatch)) continue;
390
419
  const surrounding = this.getSurroundingWord(searchText, matchIndex, matchedText.length);
420
+ if (whitelist.has(surrounding)) continue;
391
421
  const normalizedSurrounding = this.normalizeFn(surrounding);
392
422
  if (whitelist.has(normalizedSurrounding)) continue;
393
423
  if (isNormalized) {
394
424
  const mapped = this.mapNormalizedToOriginal(originalText, matchIndex, matchedText);
425
+ if (mapped && whitelist.has(mapped.word.toLowerCase())) continue;
395
426
  if (mapped && !existingIndices.has(mapped.index)) {
396
427
  results.push({
397
428
  word: mapped.word,
@@ -665,7 +696,18 @@ var dictionary_default = {
665
696
  "sikti\u011Fimin",
666
697
  "sikermisiniz",
667
698
  "sikermisin",
668
- "siktirmi\u015Fcesine"
699
+ "siktirmi\u015Fcesine",
700
+ "sktr",
701
+ "siki\u015Fse",
702
+ "siki\u015Fecek",
703
+ "siki\u015Fen",
704
+ "siki\u015Fme",
705
+ "siki\u015Fmek",
706
+ "sikeceksin",
707
+ "sikecekler",
708
+ "sikece\u011Fim",
709
+ "sikmi\u015Fler",
710
+ "sikilecek"
669
711
  ],
670
712
  severity: "high",
671
713
  category: "sexual",
@@ -673,14 +715,31 @@ var dictionary_default = {
673
715
  },
674
716
  {
675
717
  root: "amk",
676
- variants: ["amk", "amina", "aminakoyim", "aminakoydugum", "amq"],
718
+ variants: [
719
+ "amk",
720
+ "amina",
721
+ "aminakoyim",
722
+ "aminakoydugum",
723
+ "amq",
724
+ "aminakoyayim",
725
+ "aminakoydum",
726
+ "aminakoydugumun",
727
+ "aq"
728
+ ],
677
729
  severity: "high",
678
730
  category: "sexual",
679
731
  suffixable: false
680
732
  },
681
733
  {
682
734
  root: "orospu",
683
- variants: ["orospucocugu", "orosbucocugu", "orspu", "oruspu", "orosbu"],
735
+ variants: [
736
+ "orospucocugu",
737
+ "orosbucocugu",
738
+ "orspu",
739
+ "oruspu",
740
+ "orosbu",
741
+ "orospucocuklari"
742
+ ],
684
743
  severity: "high",
685
744
  category: "insult",
686
745
  suffixable: true
@@ -694,7 +753,16 @@ var dictionary_default = {
694
753
  },
695
754
  {
696
755
  root: "yarrak",
697
- variants: ["yarak", "yarrak", "yarakli", "dalyarak", "dalyarrak"],
756
+ variants: [
757
+ "yarak",
758
+ "yarrak",
759
+ "yarakli",
760
+ "dalyarak",
761
+ "dalyarrak",
762
+ "yarrani",
763
+ "yarragimi",
764
+ "yarragini"
765
+ ],
698
766
  severity: "high",
699
767
  category: "sexual",
700
768
  suffixable: true
@@ -712,7 +780,8 @@ var dictionary_default = {
712
780
  "gotler",
713
781
  "gotlu",
714
782
  "gotunden",
715
- "gotune"
783
+ "gotune",
784
+ "gotos"
716
785
  ],
717
786
  severity: "high",
718
787
  category: "sexual",
@@ -857,6 +926,104 @@ var dictionary_default = {
857
926
  severity: "high",
858
927
  category: "insult",
859
928
  suffixable: true
929
+ },
930
+ {
931
+ root: "s\xFCrt\xFCk",
932
+ variants: ["surtuk"],
933
+ severity: "high",
934
+ category: "insult",
935
+ suffixable: true
936
+ },
937
+ {
938
+ root: "kaltak",
939
+ variants: [],
940
+ severity: "high",
941
+ category: "insult",
942
+ suffixable: true
943
+ },
944
+ {
945
+ root: "fahi\u015Fe",
946
+ variants: ["fahise"],
947
+ severity: "high",
948
+ category: "insult",
949
+ suffixable: true
950
+ },
951
+ {
952
+ root: "keva\u015Fe",
953
+ variants: ["kevase"],
954
+ severity: "medium",
955
+ category: "insult",
956
+ suffixable: true
957
+ },
958
+ {
959
+ root: "o\u011Flanc\u0131",
960
+ variants: ["oglanci"],
961
+ severity: "high",
962
+ category: "slur",
963
+ suffixable: true
964
+ },
965
+ {
966
+ root: "dingil",
967
+ variants: [],
968
+ severity: "low",
969
+ category: "insult",
970
+ suffixable: true
971
+ },
972
+ {
973
+ root: "avanak",
974
+ variants: [],
975
+ severity: "low",
976
+ category: "insult",
977
+ suffixable: true
978
+ },
979
+ {
980
+ root: "manyak",
981
+ variants: [],
982
+ severity: "low",
983
+ category: "insult",
984
+ suffixable: true
985
+ },
986
+ {
987
+ root: "h\xF6d\xFCk",
988
+ variants: ["hoduk"],
989
+ severity: "low",
990
+ category: "insult",
991
+ suffixable: true
992
+ },
993
+ {
994
+ root: "kepaze",
995
+ variants: [],
996
+ severity: "medium",
997
+ category: "insult",
998
+ suffixable: true
999
+ },
1000
+ {
1001
+ root: "rezil",
1002
+ variants: [],
1003
+ severity: "medium",
1004
+ category: "insult",
1005
+ suffixable: true
1006
+ },
1007
+ {
1008
+ root: "kalle\u015F",
1009
+ variants: ["kalles"],
1010
+ severity: "medium",
1011
+ category: "insult",
1012
+ suffixable: true
1013
+ },
1014
+ {
1015
+ root: "namussuz",
1016
+ variants: [],
1017
+ severity: "medium",
1018
+ category: "insult",
1019
+ suffixable: true
1020
+ },
1021
+ {
1022
+ root: "ahlaks\u0131z",
1023
+ variants: ["ahlaksiz"],
1024
+ severity: "medium",
1025
+ category: "insult",
1026
+ suffixable: true
860
1027
  }
861
1028
  ],
862
1029
  whitelist: [
@@ -878,6 +1045,10 @@ var dictionary_default = {
878
1045
  "amonyak",
879
1046
  "amper",
880
1047
  "ampul",
1048
+ "amazon",
1049
+ "ambargo",
1050
+ "amblem",
1051
+ "amfibi",
881
1052
  "boks\xF6r",
882
1053
  "bokser",
883
1054
  "bokluk",
@@ -889,6 +1060,7 @@ var dictionary_default = {
889
1060
  "mallorca",
890
1061
  "malta",
891
1062
  "malt",
1063
+ "malum",
892
1064
  "gotan",
893
1065
  "gotik",
894
1066
  "gotham",
@@ -906,12 +1078,22 @@ var dictionary_default = {
906
1078
  "dolunay",
907
1079
  "dolum",
908
1080
  "doluluk",
1081
+ "dolap",
1082
+ "dolar",
1083
+ "dolma",
1084
+ "dolmus",
909
1085
  "ama",
910
1086
  "ami",
911
1087
  "amen",
912
1088
  "amir",
913
1089
  "amil",
914
- "dolmen"
1090
+ "dolmen",
1091
+ "namus",
1092
+ "namuslu",
1093
+ "ahlak",
1094
+ "ahlaki",
1095
+ "s\u0131k\u0131c\u0131",
1096
+ "s\u0131kerler"
915
1097
  ]
916
1098
  };
917
1099
 
@@ -995,6 +1177,24 @@ function validateDictionary(data) {
995
1177
  }
996
1178
  return data;
997
1179
  }
1180
+ function mergeDictionaries(base, ext) {
1181
+ const existingRoots = new Set(base.entries.map((e) => e.root.toLowerCase()));
1182
+ const mergedEntries = [...base.entries];
1183
+ for (const entry of ext.entries) {
1184
+ if (!existingRoots.has(entry.root.toLowerCase())) {
1185
+ mergedEntries.push(entry);
1186
+ existingRoots.add(entry.root.toLowerCase());
1187
+ }
1188
+ }
1189
+ const mergedSuffixes = [.../* @__PURE__ */ new Set([...base.suffixes, ...ext.suffixes])];
1190
+ const mergedWhitelist = [.../* @__PURE__ */ new Set([...base.whitelist, ...ext.whitelist])];
1191
+ return {
1192
+ version: base.version,
1193
+ suffixes: mergedSuffixes,
1194
+ entries: mergedEntries,
1195
+ whitelist: mergedWhitelist
1196
+ };
1197
+ }
998
1198
 
999
1199
  // src/lang/tr/config.ts
1000
1200
  var validatedData = validateDictionary(dictionary_default);
@@ -1073,21 +1273,21 @@ var dictionary_default2 = {
1073
1273
  entries: [
1074
1274
  {
1075
1275
  root: "fuck",
1076
- variants: ["fucking", "fucker", "fucked", "fuckers", "fucks", "fck", "fuk", "fuking", "fcking", "stfu", "motherfucker", "motherfucking", "fuckface", "fuckwit", "clusterfuck", "mindfuck"],
1276
+ variants: ["fucking", "fucker", "fucked", "fuckers", "fucks", "fck", "fuk", "fuking", "fcking", "stfu", "motherfucker", "motherfucking", "fuckface", "fuckwit", "clusterfuck", "mindfuck", "fuckboy", "fucktard", "fuckhead", "wtf", "mofo"],
1077
1277
  severity: "high",
1078
1278
  category: "sexual",
1079
1279
  suffixable: true
1080
1280
  },
1081
1281
  {
1082
1282
  root: "shit",
1083
- variants: ["shitty", "bullshit", "shitting", "sht", "shits", "shite", "shithead", "shitstorm", "dipshit", "horseshit", "batshit", "apeshit", "shithole", "shitface", "shitshow"],
1283
+ variants: ["shitty", "bullshit", "shitting", "sht", "shits", "shite", "shithead", "shitstorm", "dipshit", "horseshit", "batshit", "apeshit", "shithole", "shitface", "shitshow", "shitbag", "shitload", "shithouse", "shitlist"],
1084
1284
  severity: "high",
1085
1285
  category: "general",
1086
1286
  suffixable: true
1087
1287
  },
1088
1288
  {
1089
1289
  root: "ass",
1090
- variants: ["asses", "arse", "arses", "asshat", "asswipe", "smartass", "dumbass", "fatass", "badass", "jackass", "lardass", "kickass"],
1290
+ variants: ["asses", "arse", "arses", "asshat", "asswipe", "smartass", "dumbass", "fatass", "badass", "jackass", "lardass", "kickass", "asscrack", "assclown"],
1091
1291
  severity: "medium",
1092
1292
  category: "insult",
1093
1293
  suffixable: false
@@ -1101,7 +1301,7 @@ var dictionary_default2 = {
1101
1301
  },
1102
1302
  {
1103
1303
  root: "bitch",
1104
- variants: ["bitches", "bitchy", "biatch", "bitching", "bitchass", "sonofabitch"],
1304
+ variants: ["bitches", "bitchy", "biatch", "bitching", "bitchass", "sonofabitch", "bitchslap"],
1105
1305
  severity: "high",
1106
1306
  category: "insult",
1107
1307
  suffixable: true
@@ -1122,7 +1322,7 @@ var dictionary_default2 = {
1122
1322
  },
1123
1323
  {
1124
1324
  root: "cock",
1125
- variants: ["cocks", "cocksucker", "cocksucking", "cockhead"],
1325
+ variants: ["cocks", "cocksucker", "cocksucking", "cockhead", "cockblock"],
1126
1326
  severity: "high",
1127
1327
  category: "sexual",
1128
1328
  suffixable: false
@@ -1231,17 +1431,113 @@ var dictionary_default2 = {
1231
1431
  severity: "medium",
1232
1432
  category: "insult",
1233
1433
  suffixable: false
1434
+ },
1435
+ {
1436
+ root: "spic",
1437
+ variants: ["spick", "spics", "spicks"],
1438
+ severity: "high",
1439
+ category: "slur",
1440
+ suffixable: false
1441
+ },
1442
+ {
1443
+ root: "kike",
1444
+ variants: ["kikes"],
1445
+ severity: "high",
1446
+ category: "slur",
1447
+ suffixable: false
1448
+ },
1449
+ {
1450
+ root: "chink",
1451
+ variants: ["chinks", "chinky"],
1452
+ severity: "high",
1453
+ category: "slur",
1454
+ suffixable: false
1455
+ },
1456
+ {
1457
+ root: "gook",
1458
+ variants: ["gooks"],
1459
+ severity: "high",
1460
+ category: "slur",
1461
+ suffixable: false
1462
+ },
1463
+ {
1464
+ root: "tranny",
1465
+ variants: ["trannies", "trannie"],
1466
+ severity: "high",
1467
+ category: "slur",
1468
+ suffixable: false
1469
+ },
1470
+ {
1471
+ root: "dyke",
1472
+ variants: ["dykes"],
1473
+ severity: "high",
1474
+ category: "slur",
1475
+ suffixable: false
1476
+ },
1477
+ {
1478
+ root: "coon",
1479
+ variants: ["coons"],
1480
+ severity: "high",
1481
+ category: "slur",
1482
+ suffixable: false
1483
+ },
1484
+ {
1485
+ root: "wetback",
1486
+ variants: ["wetbacks"],
1487
+ severity: "high",
1488
+ category: "slur",
1489
+ suffixable: false
1490
+ },
1491
+ {
1492
+ root: "bellend",
1493
+ variants: ["bellends"],
1494
+ severity: "medium",
1495
+ category: "insult",
1496
+ suffixable: false
1497
+ },
1498
+ {
1499
+ root: "skank",
1500
+ variants: ["skanks", "skanky"],
1501
+ severity: "medium",
1502
+ category: "insult",
1503
+ suffixable: true
1504
+ },
1505
+ {
1506
+ root: "scumbag",
1507
+ variants: ["scumbags"],
1508
+ severity: "medium",
1509
+ category: "insult",
1510
+ suffixable: false
1511
+ },
1512
+ {
1513
+ root: "turd",
1514
+ variants: ["turds"],
1515
+ severity: "low",
1516
+ category: "general",
1517
+ suffixable: false
1518
+ },
1519
+ {
1520
+ root: "bugger",
1521
+ variants: ["buggered", "buggering", "buggers", "buggery"],
1522
+ severity: "medium",
1523
+ category: "general",
1524
+ suffixable: true
1234
1525
  }
1235
1526
  ],
1236
1527
  whitelist: [
1237
1528
  "assembly",
1238
1529
  "assist",
1239
1530
  "assassin",
1531
+ "assassinate",
1532
+ "assistant",
1533
+ "assessment",
1240
1534
  "bass",
1241
1535
  "class",
1242
1536
  "classic",
1243
1537
  "classify",
1538
+ "classroom",
1244
1539
  "grass",
1540
+ "grasshopper",
1245
1541
  "mass",
1246
1542
  "massive",
1247
1543
  "pass",
@@ -1259,11 +1555,18 @@ var dictionary_default2 = {
1259
1555
  "dickens",
1260
1556
  "cocktail",
1261
1557
  "cockatoo",
1558
+ "cockatiel",
1559
+ "cockpit",
1560
+ "cockroach",
1561
+ "cockney",
1262
1562
  "peacock",
1263
1563
  "hancock",
1564
+ "shuttlecock",
1565
+ "woodcock",
1264
1566
  "scrap",
1265
1567
  "scrappy",
1266
1568
  "shitake",
1569
+ "shiitake",
1267
1570
  "document",
1268
1571
  "buckle",
1269
1572
  "piston",
@@ -1275,7 +1578,13 @@ var dictionary_default2 = {
1275
1578
  "massage",
1276
1579
  "compass",
1277
1580
  "trespass",
1278
- "harass"
1581
+ "harass",
1582
+ "cocoon",
1583
+ "raccoon",
1584
+ "tycoon",
1585
+ "dike",
1586
+ "vandyke",
1587
+ "scunthorpe"
1279
1588
  ]
1280
1589
  };
1281
1590
 
@@ -1340,7 +1649,7 @@ var dictionary_default3 = {
1340
1649
  },
1341
1650
  {
1342
1651
  root: "puta",
1343
- variants: ["putas", "putada", "puto", "putos", "hijoputa", "hijaputa", "putero", "puton", "putear"],
1652
+ variants: ["putas", "putada", "puto", "putos", "hijoputa", "hijaputa", "putero", "puton", "putear", "putazo", "puteada"],
1344
1653
  severity: "high",
1345
1654
  category: "insult",
1346
1655
  suffixable: true
@@ -1361,7 +1670,7 @@ var dictionary_default3 = {
1361
1670
  },
1362
1671
  {
1363
1672
  root: "co\xF1o",
1364
- variants: ["cono", "conos", "co\xF1os"],
1673
+ variants: ["cono", "conos", "co\xF1os", "co\xF1azo"],
1365
1674
  severity: "high",
1366
1675
  category: "sexual",
1367
1676
  suffixable: false
@@ -1375,7 +1684,7 @@ var dictionary_default3 = {
1375
1684
  },
1376
1685
  {
1377
1686
  root: "chingar",
1378
- variants: ["chingado", "chingada", "chingados", "chinga", "chingas", "chingo", "chingon", "chingona", "chingadera"],
1687
+ variants: ["chingado", "chingada", "chingados", "chinga", "chingas", "chingo", "chingon", "chingona", "chingadera", "chingue", "chingues"],
1379
1688
  severity: "high",
1380
1689
  category: "general",
1381
1690
  suffixable: true
@@ -1452,7 +1761,7 @@ var dictionary_default3 = {
1452
1761
  },
1453
1762
  {
1454
1763
  root: "mamada",
1455
- variants: ["mamadas", "mamazo", "mamon", "mamona", "mamones"],
1764
+ variants: ["mamadas", "mamazo", "mamon", "mamona", "mamones", "mamonazo"],
1456
1765
  severity: "medium",
1457
1766
  category: "sexual",
1458
1767
  suffixable: false
@@ -1463,6 +1772,76 @@ var dictionary_default3 = {
1463
1772
  severity: "medium",
1464
1773
  category: "general",
1465
1774
  suffixable: false
1775
+ },
1776
+ {
1777
+ root: "culero",
1778
+ variants: ["culeros", "culera", "culeras"],
1779
+ severity: "medium",
1780
+ category: "insult",
1781
+ suffixable: false
1782
+ },
1783
+ {
1784
+ root: "cojones",
1785
+ variants: ["cojon", "cojonudo"],
1786
+ severity: "medium",
1787
+ category: "sexual",
1788
+ suffixable: false
1789
+ },
1790
+ {
1791
+ root: "polla",
1792
+ variants: ["pollas", "pollon"],
1793
+ severity: "high",
1794
+ category: "sexual",
1795
+ suffixable: false
1796
+ },
1797
+ {
1798
+ root: "follar",
1799
+ variants: ["follando", "follado", "follada"],
1800
+ severity: "high",
1801
+ category: "sexual",
1802
+ suffixable: true
1803
+ },
1804
+ {
1805
+ root: "capullo",
1806
+ variants: ["capullos"],
1807
+ severity: "medium",
1808
+ category: "insult",
1809
+ suffixable: false
1810
+ },
1811
+ {
1812
+ root: "guarro",
1813
+ variants: ["guarros", "guarra", "guarras", "guarrada"],
1814
+ severity: "medium",
1815
+ category: "insult",
1816
+ suffixable: true
1817
+ },
1818
+ {
1819
+ root: "boludo",
1820
+ variants: ["boludos", "boluda", "boludez"],
1821
+ severity: "medium",
1822
+ category: "insult",
1823
+ suffixable: false
1824
+ },
1825
+ {
1826
+ root: "pelotudo",
1827
+ variants: ["pelotudos", "pelotuda", "pelotudez"],
1828
+ severity: "medium",
1829
+ category: "insult",
1830
+ suffixable: false
1831
+ },
1832
+ {
1833
+ root: "hostia",
1834
+ variants: ["hostias"],
1835
+ severity: "medium",
1836
+ category: "general",
1837
+ suffixable: false
1838
+ },
1839
+ {
1840
+ root: "soplapollas",
1841
+ variants: [],
1842
+ severity: "high",
1843
+ category: "insult",
1844
+ suffixable: false
1466
1845
  }
1467
1846
  ],
1468
1847
  whitelist: [
@@ -1480,7 +1859,13 @@ var dictionary_default3 = {
1480
1859
  "vehicular",
1481
1860
  "particular",
1482
1861
  "articulo",
1483
- "maricopa"
1862
+ "maricopa",
1863
+ "pollo",
1864
+ "pollito",
1865
+ "polleria",
1866
+ "polluelo",
1867
+ "folleto",
1868
+ "follaje"
1484
1869
  ]
1485
1870
  };
1486
1871
 
@@ -1551,21 +1936,21 @@ var dictionary_default4 = {
1551
1936
  entries: [
1552
1937
  {
1553
1938
  root: "schei\xDFe",
1554
- variants: ["scheisse", "scheiss", "scheisser", "scheisserei", "beschissen"],
1939
+ variants: ["scheisse", "scheiss", "scheisser", "scheisserei", "beschissen", "scheissegal"],
1555
1940
  severity: "high",
1556
1941
  category: "general",
1557
1942
  suffixable: true
1558
1943
  },
1559
1944
  {
1560
1945
  root: "fick",
1561
- variants: ["ficken", "ficker", "gefickt", "fickend", "fickerei", "abgefickt"],
1946
+ variants: ["ficken", "ficker", "gefickt", "fickend", "fickerei", "abgefickt", "verfickt", "fickfehler"],
1562
1947
  severity: "high",
1563
1948
  category: "sexual",
1564
1949
  suffixable: true
1565
1950
  },
1566
1951
  {
1567
1952
  root: "arsch",
1568
- variants: ["arschloch", "arscher", "arschgeige", "arschgesicht", "arschkriecher"],
1953
+ variants: ["arschloch", "arscher", "arschgeige", "arschgesicht", "arschkriecher", "arschbacke", "arschl\xF6cher", "arschlocher"],
1569
1954
  severity: "high",
1570
1955
  category: "insult",
1571
1956
  suffixable: true
@@ -1593,7 +1978,7 @@ var dictionary_default4 = {
1593
1978
  },
1594
1979
  {
1595
1980
  root: "wichser",
1596
- variants: ["wichsern", "wichse", "wichsen", "gewichst"],
1981
+ variants: ["wichsern", "wichse", "wichsen", "gewichst", "wixer"],
1597
1982
  severity: "high",
1598
1983
  category: "sexual",
1599
1984
  suffixable: false
@@ -1607,7 +1992,7 @@ var dictionary_default4 = {
1607
1992
  },
1608
1993
  {
1609
1994
  root: "schlampe",
1610
- variants: ["schlampen", "schlampig"],
1995
+ variants: ["schlampen", "schlampig", "schlamperei"],
1611
1996
  severity: "high",
1612
1997
  category: "insult",
1613
1998
  suffixable: true
@@ -1663,7 +2048,7 @@ var dictionary_default4 = {
1663
2048
  },
1664
2049
  {
1665
2050
  root: "dreck",
1666
- variants: ["dreckig", "dreckiger", "dreckiges"],
2051
+ variants: ["dreckig", "dreckiger", "dreckiges", "drecksack", "dreckst\xFCck", "dreckstuck"],
1667
2052
  severity: "medium",
1668
2053
  category: "general",
1669
2054
  suffixable: true
@@ -1674,12 +2059,85 @@ var dictionary_default4 = {
1674
2059
  severity: "low",
1675
2060
  category: "insult",
1676
2061
  suffixable: false
2062
+ },
2063
+ {
2064
+ root: "schwuchtel",
2065
+ variants: ["schwuchteln"],
2066
+ severity: "high",
2067
+ category: "slur",
2068
+ suffixable: false
2069
+ },
2070
+ {
2071
+ root: "spast",
2072
+ variants: ["spasten", "spasti"],
2073
+ severity: "high",
2074
+ category: "slur",
2075
+ suffixable: false
2076
+ },
2077
+ {
2078
+ root: "mistst\xFCck",
2079
+ variants: ["miststueck"],
2080
+ severity: "medium",
2081
+ category: "insult",
2082
+ suffixable: false
2083
+ },
2084
+ {
2085
+ root: "bastard",
2086
+ variants: ["bastarde"],
2087
+ severity: "medium",
2088
+ category: "insult",
2089
+ suffixable: false
2090
+ },
2091
+ {
2092
+ root: "penner",
2093
+ variants: ["penners"],
2094
+ severity: "low",
2095
+ category: "insult",
2096
+ suffixable: false
2097
+ },
2098
+ {
2099
+ root: "bl\xF6dmann",
2100
+ variants: ["blodmann", "bl\xF6dm\xE4nner"],
2101
+ severity: "low",
2102
+ category: "insult",
2103
+ suffixable: false
2104
+ },
2105
+ {
2106
+ root: "vollpfosten",
2107
+ variants: [],
2108
+ severity: "medium",
2109
+ category: "insult",
2110
+ suffixable: false
2111
+ },
2112
+ {
2113
+ root: "hackfresse",
2114
+ variants: [],
2115
+ severity: "high",
2116
+ category: "insult",
2117
+ suffixable: false
2118
+ },
2119
+ {
2120
+ root: "pissnelke",
2121
+ variants: [],
2122
+ severity: "medium",
2123
+ category: "insult",
2124
+ suffixable: false
2125
+ },
2126
+ {
2127
+ root: "spacken",
2128
+ variants: [],
2129
+ severity: "low",
2130
+ category: "insult",
2131
+ suffixable: false
1677
2132
  }
1678
2133
  ],
1679
2134
  whitelist: [
1680
2135
  "ficktion",
1681
2136
  "arschen",
1682
- "schwanzen"
2137
+ "schwanzen",
2138
+ "schwanger",
2139
+ "schwangerschaft",
2140
+ "geschichte"
1683
2141
  ]
1684
2142
  };
1685
2143
 
@@ -1897,12 +2355,17 @@ var Terlik = class _Terlik {
1897
2355
  leetMap: langConfig.leetMap,
1898
2356
  numberExpansions: langConfig.numberExpansions
1899
2357
  });
2358
+ let dictData = langConfig.dictionary;
2359
+ if (options?.extendDictionary) {
2360
+ validateDictionary(options.extendDictionary);
2361
+ dictData = mergeDictionaries(dictData, options.extendDictionary);
2362
+ }
1900
2363
  this.dictionary = new Dictionary(
1901
- langConfig.dictionary,
2364
+ dictData,
1902
2365
  options?.customList,
1903
2366
  options?.whitelist
1904
2367
  );
1905
- const hasCustomDict = !!(options?.customList?.length || options?.whitelist?.length);
2368
+ const hasCustomDict = !!(options?.customList?.length || options?.whitelist?.length || options?.extendDictionary);
1906
2369
  this.detector = new Detector(
1907
2370
  this.dictionary,
1908
2371
  normalizeFn,