@sideid/id-profanity-filter 1.9.5 → 1.10.2

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.
Files changed (48) hide show
  1. package/.eslintrc.js +44 -16
  2. package/.github/workflows/release.yml +62 -0
  3. package/CONTRIBUTING.md +150 -150
  4. package/LICENSE +21 -21
  5. package/README.md +548 -285
  6. package/dist/config/options.d.ts +24 -0
  7. package/dist/constants/categories/blasphemy.d.ts +4 -0
  8. package/dist/constants/categories/disgusting.d.ts +4 -0
  9. package/dist/constants/categories/drugs.d.ts +4 -0
  10. package/dist/constants/categories/profanity.d.ts +4 -0
  11. package/dist/constants/categories/slur.d.ts +4 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.esm.js +923 -94
  14. package/dist/index.esm.js.map +1 -1
  15. package/dist/index.js +924 -93
  16. package/dist/index.js.map +1 -1
  17. package/dist/types/index.d.ts +2 -0
  18. package/dist/utils/ahoCorasick.d.ts +36 -0
  19. package/dist/utils/similarityUtils.d.ts +35 -0
  20. package/eslint.config.mjs +40 -0
  21. package/examples/advanced.ts +120 -0
  22. package/examples/basic.ts +71 -52
  23. package/examples/custom-list.ts +140 -0
  24. package/jest.config.mjs +10 -10
  25. package/package.json +3 -2
  26. package/prettierrc +6 -6
  27. package/rollup.config.mjs +35 -35
  28. package/src/config/options.ts +2 -0
  29. package/src/constants/categories/blasphemy.ts +25 -0
  30. package/src/constants/categories/disgusting.ts +82 -0
  31. package/src/constants/categories/drugs.ts +72 -0
  32. package/src/constants/categories/profanity.ts +139 -0
  33. package/src/constants/categories/slur.ts +102 -0
  34. package/src/constants/regions/general.ts +111 -2
  35. package/src/constants/regions/jawa.ts +257 -3
  36. package/src/constants/wordList.ts +15 -8
  37. package/src/core/analyzer.ts +28 -13
  38. package/src/core/filter.ts +178 -37
  39. package/src/core/matcher.ts +146 -69
  40. package/src/index.ts +21 -2
  41. package/src/types/index.ts +4 -2
  42. package/src/utils/ahoCorasick.ts +179 -0
  43. package/src/utils/regexUtils.ts +0 -1
  44. package/src/utils/similarityUtils.ts +239 -7
  45. package/tsconfig.json +115 -115
  46. package/.github/workflows/ci.yml +0 -0
  47. package/src/constants/categories/index.ts +0 -31
  48. package/src/constants/regions/index.ts +0 -62
@@ -0,0 +1,140 @@
1
+ import { IDProfanityFilter, idFilter, FilterOptions } from '../src/index';
2
+
3
+ /**
4
+ * Contoh Penggunaan ID-Profanity-Filter dengan Daftar Kustom
5
+ * =======================================================
6
+ * File ini menunjukkan cara menggunakan library dengan daftar kata kustom.
7
+ */
8
+
9
+ console.log('=== Contoh Penggunaan dengan Daftar Kata Kustom ===\n');
10
+
11
+ // ===== Contoh 1: Menggunakan daftar kata kustom =====
12
+ // Daftar kata kotor kustom
13
+ const customBadWords = ['jelek', 'buruk', 'sampah', 'payah', 'lemah', 'amatir'];
14
+
15
+ // Buat instance dengan daftar kata kustom
16
+ const filter = new IDProfanityFilter({
17
+ wordList: customBadWords,
18
+ replaceWith: '#',
19
+ });
20
+
21
+ const teks1 = 'Film itu sangat jelek dan payah, sepertinya dibuat oleh amatir.';
22
+ console.log('Teks asli:', teks1);
23
+ console.log('Hasil filter kustom:', filter.filter(teks1).filtered);
24
+
25
+ // ===== Contoh 2: Menggabungkan daftar kata kustom dengan daftar bawaan =====
26
+ console.log('\n=== Menggabungkan Daftar Kata ===\n');
27
+
28
+ // Reset filter ke pengaturan default
29
+ filter.setOptions({});
30
+
31
+ // Tambahkan kata-kata kustom tapi tetap deteksi kata-kata bawaan
32
+ const teks2 = 'Film itu sangat jelek dan payah, dibuat oleh anjing amatir.';
33
+ console.log('Teks asli:', teks2);
34
+
35
+ // Analisis hanya dengan kata bawaan
36
+ console.log('Analisis standar:');
37
+ const standarAnalisis = filter.analyze(teks2);
38
+ console.log('- Kata terdeteksi:', standarAnalisis.matches);
39
+
40
+ // Tambahkan kata kustom
41
+ filter.setWordList([...customBadWords]);
42
+ console.log('\nAnalisis dengan kata kustom ditambahkan:');
43
+ const customAnalisis = filter.analyze(teks2);
44
+ console.log('- Kata terdeteksi:', customAnalisis.matches);
45
+
46
+ // ===== Contoh 3: Whitelist untuk pengecualian kontekstual =====
47
+ console.log('\n=== Penggunaan Whitelist ===\n');
48
+
49
+ // Kita ingin kata "anjing" diperbolehkan jika dalam konteks binatang
50
+ filter.setOptions({});
51
+ filter.addToWhitelist('anjing');
52
+
53
+ const teks3a = 'Anjing adalah hewan peliharaan yang setia.';
54
+ const teks3b = 'Dasar anjing kamu, tidak punya perasaan!';
55
+
56
+ console.log('Teks dengan konteks binatang:', teks3a);
57
+ console.log('Terdeteksi sebagai kata kotor?', filter.isProfane(teks3a));
58
+
59
+ // Tambahkan kembali "anjing" ke daftar kata kotor
60
+ filter.removeFromWhitelist('anjing');
61
+ console.log('\nSetelah dihapus dari whitelist:');
62
+ console.log('Terdeteksi sebagai kata kotor?', filter.isProfane(teks3a));
63
+
64
+ // ===== Contoh 4: Membuat preset kustom =====
65
+ console.log('\n=== Membuat Preset Kustom ===\n');
66
+
67
+ // Kita bisa membuat preset filter kustom
68
+ const myCustomPreset: FilterOptions = {
69
+ replaceWith: '●', // Karakter pengganti
70
+ fullWordCensor: false,
71
+ keepFirstAndLast: true,
72
+ detectLeetSpeak: true,
73
+ indonesianVariation: true,
74
+ detectSplit: false,
75
+ useRandomGrawlix: false,
76
+ categories: ['insult', 'profanity'],
77
+ severityThreshold: 0.3,
78
+ whitelist: ['anjing'], // Untuk konteks binatang
79
+ };
80
+
81
+ const teks4 = 'Anjing itu lucu, tidak seperti si goblok dan bego itu.';
82
+ console.log('Teks asli:', teks4);
83
+
84
+ // Gunakan preset kustom
85
+ filter.setOptions(myCustomPreset);
86
+ console.log('Hasil preset kustom:', filter.filter(teks4).filtered);
87
+
88
+ // ===== Contoh 5: Filter berdasarkan kategori atau daerah saja =====
89
+ console.log('\n=== Filter Berdasarkan Kategori atau Daerah ===\n');
90
+
91
+ // Filter hanya kata dari kategori "sexual"
92
+ filter.setOptions({
93
+ categories: ['sexual'],
94
+ wordList: [], // Reset daftar kata kustom
95
+ });
96
+
97
+ const teks5 =
98
+ 'Ngewe dan bokep itu kata kotor, bego dan anjing tidak terfilter.';
99
+ console.log('Teks asli:', teks5);
100
+ console.log('Filter hanya kategori sexual:', filter.filter(teks5).filtered);
101
+
102
+ // Filter hanya kata dari daerah "jawa"
103
+ filter.setOptions({
104
+ categories: [],
105
+ regions: ['jawa'],
106
+ });
107
+
108
+ const teks5b = 'Kata jancuk dan cuk dari Jawa, anjing adalah kata umum.';
109
+ console.log('\nTeks asli:', teks5b);
110
+ console.log('Filter hanya daerah jawa:', filter.filter(teks5b).filtered);
111
+
112
+ // ===== Contoh 6: Custom wordList dengan metadata =====
113
+ console.log('\n=== Custom wordList dengan Metadata ===\n');
114
+
115
+ // Ini contoh jika Anda ingin membuat daftar kata lengkap dengan metadata
116
+ const customWordsWithMetadata = [
117
+ {
118
+ word: 'jelek',
119
+ category: 'insult' as any,
120
+ region: 'general' as any,
121
+ severity: 0.4,
122
+ aliases: ['jelex', 'jlk'],
123
+ },
124
+ {
125
+ word: 'payah',
126
+ category: 'insult' as any,
127
+ region: 'general' as any,
128
+ severity: 0.3,
129
+ aliases: ['pyh', 'payaah'],
130
+ },
131
+ ];
132
+
133
+ // Namun untuk filter sederhana, cukup gunakan kata-kata saja
134
+ filter.setOptions({
135
+ wordList: customWordsWithMetadata.map((w) => w.word),
136
+ });
137
+
138
+ const teks6 = 'Performanya sangat jelek dan payah sekali.';
139
+ console.log('Teks asli:', teks6);
140
+ console.log('Filter dengan wordList kustom:', filter.filter(teks6).filtered);
package/jest.config.mjs CHANGED
@@ -1,10 +1,10 @@
1
- module.exports = {
2
- preset: 'ts-jest',
3
- testEnvironment: 'node',
4
- roots: ['<rootDir>/test'],
5
- transform: {
6
- '^.+\\.tsx?$': 'ts-jest',
7
- },
8
- testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
9
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10
- };
1
+ module.exports = {
2
+ preset: 'ts-jest',
3
+ testEnvironment: 'node',
4
+ roots: ['<rootDir>/test'],
5
+ transform: {
6
+ '^.+\\.tsx?$': 'ts-jest',
7
+ },
8
+ testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
9
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideid/id-profanity-filter",
3
- "version": "1.9.5",
3
+ "version": "1.10.2",
4
4
  "description": "Library filter kata kotor dalam Bahasa Indonesia",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -8,7 +8,7 @@
8
8
  "scripts": {
9
9
  "build": "rollup -c",
10
10
  "test": "jest",
11
- "lint": "eslint src/**/*.ts",
11
+ "lint": "eslint --ext .ts src/",
12
12
  "format": "prettier --write \"src/**/*.ts\""
13
13
  },
14
14
  "keywords": [
@@ -45,6 +45,7 @@
45
45
  "rollup": "^4.39.0",
46
46
  "rollup-plugin-dts": "^6.2.1",
47
47
  "ts-jest": "^29.3.1",
48
+ "tslib": "^2.8.1",
48
49
  "typescript": "^5.8.3"
49
50
  }
50
51
  }
package/prettierrc CHANGED
@@ -1,7 +1,7 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "es5",
4
- "printWidth": 100,
5
- "tabWidth": 2,
6
- "semi": true
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "es5",
4
+ "printWidth": 100,
5
+ "tabWidth": 2,
6
+ "semi": true
7
7
  }
package/rollup.config.mjs CHANGED
@@ -1,35 +1,35 @@
1
- import resolve from '@rollup/plugin-node-resolve';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import typescript from '@rollup/plugin-typescript';
4
- import json from '@rollup/plugin-json';
5
- import dts from 'rollup-plugin-dts';
6
- import pkg from './package.json' assert { type: 'json' };
7
-
8
- export default [
9
- {
10
- input: 'src/index.ts',
11
- output: [
12
- {
13
- file: pkg.main,
14
- format: 'cjs',
15
- sourcemap: true,
16
- },
17
- {
18
- file: pkg.module,
19
- format: 'esm',
20
- sourcemap: true,
21
- },
22
- ],
23
- plugins: [
24
- resolve(),
25
- commonjs(),
26
- typescript({ tsconfig: './tsconfig.json' }),
27
- json(),
28
- ],
29
- },
30
- {
31
- input: 'dist/types/index.d.ts',
32
- output: [{ file: 'dist/index.d.ts', format: 'es' }],
33
- plugins: [dts()],
34
- },
35
- ];
1
+ import resolve from '@rollup/plugin-node-resolve';
2
+ import commonjs from '@rollup/plugin-commonjs';
3
+ import typescript from '@rollup/plugin-typescript';
4
+ import json from '@rollup/plugin-json';
5
+ import dts from 'rollup-plugin-dts';
6
+ import pkg from './package.json' assert { type: 'json' };
7
+
8
+ export default [
9
+ {
10
+ input: 'src/index.ts',
11
+ output: [
12
+ {
13
+ file: pkg.main,
14
+ format: 'cjs',
15
+ sourcemap: true,
16
+ },
17
+ {
18
+ file: pkg.module,
19
+ format: 'esm',
20
+ sourcemap: true,
21
+ },
22
+ ],
23
+ plugins: [
24
+ resolve(),
25
+ commonjs(),
26
+ typescript({ tsconfig: './tsconfig.json' }),
27
+ json(),
28
+ ],
29
+ },
30
+ {
31
+ input: 'dist/types/index.d.ts',
32
+ output: [{ file: 'dist/index.d.ts', format: 'es' }],
33
+ plugins: [dts()],
34
+ },
35
+ ];
@@ -7,6 +7,8 @@ export const DEFAULT_OPTIONS: FilterOptions = {
7
7
  checkSubstring: false,
8
8
  whitelist: [],
9
9
  severityThreshold: 0,
10
+ useLevenshtein: false,
11
+ maxLevenshteinDistance: 2,
10
12
  };
11
13
 
12
14
  export const FILTER_PRESETS = {
@@ -0,0 +1,25 @@
1
+ import { ProfanityWord } from "../../types";
2
+ import { general } from "../regions/general";
3
+ import { jawa } from "../regions/jawa";
4
+ import { sunda } from "../regions/sunda";
5
+ import { betawi } from "../regions/betawi";
6
+
7
+ export const blasphemy: ProfanityWord[] = [
8
+ ...general.filter((word) => word.category === "blasphemy"),
9
+ ...jawa.filter((word) => word.category === "blasphemy"),
10
+ ...sunda.filter((word) => word.category === "blasphemy"),
11
+ ...betawi.filter((word) => word.category === "blasphemy"),
12
+
13
+ {
14
+ word: "kafir",
15
+ category: "blasphemy",
16
+ region: "general",
17
+ severity: 0.6,
18
+ aliases: ["kapir", "kafur"],
19
+ description: "Istilah untuk orang yang tidak percaya pada Islam",
20
+ context: "Dapat bersifat merendahkan ketika digunakan terhadap non-Muslim",
21
+ },
22
+ ];
23
+
24
+ export const blasphemyWords = blasphemy.map((item) => item.word);
25
+ export default blasphemy;
@@ -0,0 +1,82 @@
1
+ import { ProfanityWord } from "../../types";
2
+ import { general } from "../regions/general";
3
+ import { jawa } from "../regions/jawa";
4
+ import { sunda } from "../regions/sunda";
5
+ import { betawi } from "../regions/betawi";
6
+
7
+ export const disgusting: ProfanityWord[] = [
8
+ ...general.filter((word) => word.category === "disgusting"),
9
+ ...jawa.filter((word) => word.category === "disgusting"),
10
+ ...sunda.filter((word) => word.category === "disgusting"),
11
+ ...betawi.filter((word) => word.category === "disgusting"),
12
+
13
+ {
14
+ word: "muntah",
15
+ category: "disgusting",
16
+ region: "general",
17
+ severity: 0.4,
18
+ aliases: ["muntaber", "memuntahkan"],
19
+ description: "Muntahan atau tindakan muntah",
20
+ context:
21
+ "Digunakan untuk mengekspresikan rasa jijik atau menggambarkan tindakan tersebut",
22
+ },
23
+ {
24
+ word: "ingus",
25
+ category: "disgusting",
26
+ region: "general",
27
+ severity: 0.4,
28
+ aliases: ["ingusan", "beringus"],
29
+ description: "Lendir hidung",
30
+ context: "Digunakan untuk menggambarkan lendir hidung atau sebagai hinaan",
31
+ },
32
+ {
33
+ word: "tai",
34
+ category: "disgusting",
35
+ region: "general",
36
+ severity: 0.8,
37
+ aliases: ["tahi", "kotoran"],
38
+ description: "Kotoran manusia",
39
+ context: "Istilah vulgar untuk kotoran, sering digunakan sebagai hinaan",
40
+ },
41
+ {
42
+ word: "jembut",
43
+ category: "disgusting",
44
+ region: "general",
45
+ severity: 1.0,
46
+ aliases: ["jembud", "rambut kemaluan"],
47
+ description: "Rambut kemaluan",
48
+ context:
49
+ "Istilah vulgar untuk rambut kemaluan, dianggap sangat tidak pantas",
50
+ },
51
+ {
52
+ word: "pecret",
53
+ category: "disgusting",
54
+ region: "sunda",
55
+ severity: 0.8,
56
+ aliases: ["mencret", "diare"],
57
+ description: "Diare dalam bahasa Sunda",
58
+ context: "Dianggap vulgar ketika disebutkan di depan umum",
59
+ },
60
+ {
61
+ word: "bacot",
62
+ category: "disgusting",
63
+ region: "betawi",
64
+ severity: 0.8,
65
+ aliases: ["cicing", "berisik"],
66
+ description: "Mulut atau omongan berisik dalam konteks vulgar",
67
+ context: "Istilah kasar yang digunakan untuk menyuruh seseorang diam",
68
+ },
69
+ {
70
+ word: "lendir",
71
+ category: "disgusting",
72
+ region: "general",
73
+ severity: 0.3,
74
+ aliases: ["berlendir", "cairan lengket"],
75
+ description: "Lendir atau cairan lengket",
76
+ context:
77
+ "Dapat digunakan dalam konteks vulgar untuk menggambarkan cairan tubuh",
78
+ },
79
+ ];
80
+
81
+ export const disgustingWords = disgusting.map((item) => item.word);
82
+ export default disgusting;
@@ -0,0 +1,72 @@
1
+ import { ProfanityWord } from "../../types";
2
+ import { general } from "../regions/general";
3
+ import { jawa } from "../regions/jawa";
4
+ import { sunda } from "../regions/sunda";
5
+ import { betawi } from "../regions/betawi";
6
+
7
+ export const drugs: ProfanityWord[] = [
8
+ ...general.filter((word) => word.category === "drugs"),
9
+ ...jawa.filter((word) => word.category === "drugs"),
10
+ ...sunda.filter((word) => word.category === "drugs"),
11
+ ...betawi.filter((word) => word.category === "drugs"),
12
+
13
+ {
14
+ word: "ganja",
15
+ category: "drugs",
16
+ region: "general",
17
+ severity: 0.6,
18
+ aliases: ["cimeng", "kanabis", "marijuana"],
19
+ description: "Tanaman yang mengandung zat psikoaktif",
20
+ context: "Digunakan untuk merujuk pada narkotika jenis cannabis",
21
+ },
22
+ {
23
+ word: "sabu",
24
+ category: "drugs",
25
+ region: "general",
26
+ severity: 0.8,
27
+ aliases: ["crystal", "meth", "ss"],
28
+ description: "Narkotika jenis metamfetamin",
29
+ context: "Istilah untuk metamfetamin yang merupakan narkotika berbahaya",
30
+ },
31
+ {
32
+ word: "inex",
33
+ category: "drugs",
34
+ region: "general",
35
+ severity: 0.7,
36
+ aliases: ["ekstasi", "pil"],
37
+ description: "Obat terlarang yang mengandung MDMA",
38
+ context: "Nama slang untuk obat terlarang ecstasy",
39
+ },
40
+ {
41
+ word: "sakaw",
42
+ category: "drugs",
43
+ region: "general",
44
+ severity: 0.5,
45
+ aliases: ["ketagihan", "menarik"],
46
+ description: "Gejala putus obat pada pecandu",
47
+ context:
48
+ "Menggambarkan kondisi pecandu yang sedang mengalami gejala putus obat",
49
+ },
50
+ {
51
+ word: "ngepil",
52
+ category: "drugs",
53
+ region: "jawa",
54
+ severity: 0.3,
55
+ aliases: ["minum pil", "telan pil"],
56
+ description: "Mengkonsumsi obat-obatan terlarang dalam bentuk pil",
57
+ context:
58
+ "Istilah dalam bahasa gaul untuk mengkonsumsi obat terlarang jenis tablet",
59
+ },
60
+ {
61
+ word: "nyimeng",
62
+ category: "drugs",
63
+ region: "sunda",
64
+ severity: 0.6,
65
+ aliases: ["nyimang", "isap ganja"],
66
+ description: "Mengisap ganja atau marijuana",
67
+ context: "Istilah sunda untuk aktivitas mengkonsumsi ganja",
68
+ },
69
+ ];
70
+
71
+ export const drugsWords = drugs.map((item) => item.word);
72
+ export default drugs;
@@ -0,0 +1,139 @@
1
+ import { ProfanityWord } from "../../types";
2
+ import { general } from "../regions/general";
3
+ import { jawa } from "../regions/jawa";
4
+ import { sunda } from "../regions/sunda";
5
+ import { betawi } from "../regions/betawi";
6
+
7
+ export const profanity: ProfanityWord[] = [
8
+ ...general.filter((word) => word.category === "profanity"),
9
+ ...jawa.filter((word) => word.category === "profanity"),
10
+ ...sunda.filter((word) => word.category === "profanity"),
11
+ ...betawi.filter((word) => word.category === "profanity"),
12
+
13
+ {
14
+ word: "anjing",
15
+ category: "profanity",
16
+ region: "general",
17
+ severity: 0.9,
18
+ aliases: ["anjir", "anying", "njing", "njir"],
19
+ description: "Kata umpatan yang mengacu pada hewan anjing",
20
+ context: "Digunakan sebagai ekspresi kemarahan atau frustasi",
21
+ },
22
+ {
23
+ word: "babi",
24
+ category: "profanity",
25
+ region: "general",
26
+ severity: 0.8,
27
+ aliases: ["babik", "khinzir"],
28
+ description: "Kata umpatan yang mengacu pada hewan babi",
29
+ context:
30
+ "Digunakan untuk mengekspresikan kemarahan atau menghina seseorang",
31
+ },
32
+ {
33
+ word: "bangsat",
34
+ category: "profanity",
35
+ region: "general",
36
+ severity: 0.8,
37
+ aliases: ["bgst", "bangst"],
38
+ description: "Kata umpatan kasar yang berarti kutu atau parasit",
39
+ context: "Digunakan untuk menunjukkan kemarahan atau menghina seseorang",
40
+ },
41
+ {
42
+ word: "kampret",
43
+ category: "profanity",
44
+ region: "general",
45
+ severity: 0.7,
46
+ aliases: ["kampret lu", "kampretot"],
47
+ description: "Kata umpatan yang mengacu pada jenis kelelawar kecil",
48
+ context: "Digunakan untuk mengungkapkan kekesalan atau menghina seseorang",
49
+ },
50
+ {
51
+ word: "sialan",
52
+ category: "profanity",
53
+ region: "general",
54
+ severity: 0.6,
55
+ aliases: ["sial", "siaal"],
56
+ description: "Kata umpatan yang menunjukkan nasib buruk",
57
+ context: "Digunakan untuk mengekspresikan kekesalan atau kemarahan",
58
+ },
59
+ {
60
+ word: "monyet",
61
+ category: "profanity",
62
+ region: "general",
63
+ severity: 0.7,
64
+ aliases: ["monyong", "munyuk"],
65
+ description: "Kata umpatan yang mengacu pada hewan primata",
66
+ context: "Digunakan untuk menghina atau mengekspresikan kemarahan",
67
+ },
68
+ {
69
+ word: "bajingan",
70
+ category: "profanity",
71
+ region: "general",
72
+ severity: 0.8,
73
+ aliases: ["bajinga", "bjngn"],
74
+ description: "Kata umpatan yang berarti penjahat atau orang jahat",
75
+ context:
76
+ "Digunakan untuk mengumpat seseorang yang dianggap buruk perilakunya",
77
+ },
78
+ {
79
+ word: "jancok",
80
+ category: "profanity",
81
+ region: "jawa",
82
+ severity: 0.9,
83
+ aliases: ["jancuk", "jancik", "dancok"],
84
+ description: "Kata umpatan kasar dalam bahasa Jawa",
85
+ context:
86
+ "Umpatan sangat kasar dalam budaya Jawa, menunjukkan kemarahan yang tinggi",
87
+ },
88
+ {
89
+ word: "cuk",
90
+ category: "profanity",
91
+ region: "jawa",
92
+ severity: 0.8,
93
+ aliases: ["cok", "cug"],
94
+ description: "Bentuk singkat dari jancok",
95
+ context:
96
+ "Versi pendek dari umpatan jancok, digunakan dalam percakapan sehari-hari",
97
+ },
98
+ {
99
+ word: "asu",
100
+ category: "profanity",
101
+ region: "jawa",
102
+ severity: 0.8,
103
+ aliases: ["asyu", "su"],
104
+ description: "Kata Jawa untuk anjing, digunakan sebagai umpatan",
105
+ context: "Ekspresi umpatan yang umum di masyarakat Jawa",
106
+ },
107
+ {
108
+ word: "sia",
109
+ category: "profanity",
110
+ region: "sunda",
111
+ severity: 0.6,
112
+ aliases: ["siah", "siaa"],
113
+ description: "Kata ganti orang kedua dalam bahasa Sunda yang kasar",
114
+ context:
115
+ "Menunjukkan ketidakhormatan pada lawan bicara dalam konteks Sunda",
116
+ },
117
+ {
118
+ word: "lu",
119
+ category: "profanity",
120
+ region: "betawi",
121
+ severity: 0.4,
122
+ aliases: ["elu", "lo"],
123
+ description: "Kata ganti orang kedua dalam dialek Betawi",
124
+ context:
125
+ "Dapat dianggap kasar dalam konteks formal atau saat berbicara dengan orang yang lebih tua",
126
+ },
127
+ {
128
+ word: "goblok",
129
+ category: "profanity",
130
+ region: "general",
131
+ severity: 0.7,
132
+ aliases: ["goblog", "goblokk", "bego", "bodoh"],
133
+ description: "Kata umpatan yang menunjukkan kebodohan",
134
+ context: "Digunakan untuk menghina kecerdasan seseorang",
135
+ },
136
+ ];
137
+
138
+ export const profanityWords = profanity.map((item) => item.word);
139
+ export default profanity;