@umituz/react-native-ai-generation-content 1.17.189 → 1.17.191
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/package.json
CHANGED
|
@@ -1,94 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Default Moderation Rules
|
|
3
3
|
* Built-in rules for content filtering - can be extended via config
|
|
4
|
+
*
|
|
5
|
+
* NOTE: Explicit/NSFW content is handled server-side by AI providers (e.g., Fal AI's has_nsfw_concepts)
|
|
6
|
+
* This file only contains rules for content that AI providers don't automatically detect
|
|
4
7
|
*/
|
|
5
8
|
|
|
6
9
|
import type { ModerationRule } from "../../domain/entities/moderation.types";
|
|
7
10
|
|
|
8
|
-
const explicitContentRules: ModerationRule[] = [
|
|
9
|
-
{
|
|
10
|
-
id: "explicit-001",
|
|
11
|
-
name: "Sexual Content",
|
|
12
|
-
description: "Detects explicit sexual content and nudity",
|
|
13
|
-
contentTypes: ["text", "image"],
|
|
14
|
-
severity: "critical",
|
|
15
|
-
violationType: "explicit_content",
|
|
16
|
-
patterns: [
|
|
17
|
-
"\\bsex\\b",
|
|
18
|
-
"\\bsexual\\b",
|
|
19
|
-
"\\bsexually\\b",
|
|
20
|
-
"\\bnude\\b",
|
|
21
|
-
"\\bnudity\\b",
|
|
22
|
-
"\\bnaked\\b",
|
|
23
|
-
"\\bnsfw\\b",
|
|
24
|
-
"\\berotic\\b",
|
|
25
|
-
"\\bporn\\b",
|
|
26
|
-
"\\bporno\\b",
|
|
27
|
-
"\\bpornography\\b",
|
|
28
|
-
"\\bxxx\\b",
|
|
29
|
-
"\\badult content\\b",
|
|
30
|
-
"\\bexplicit\\b",
|
|
31
|
-
"\\bintercourse\\b",
|
|
32
|
-
"\\bintimate\\b.*\\brelation\\b",
|
|
33
|
-
"\\bhaving sex\\b",
|
|
34
|
-
"\\bmake love\\b",
|
|
35
|
-
"\\bmaking love\\b",
|
|
36
|
-
"\\borgasm\\b",
|
|
37
|
-
"\\bmasturbat\\w*\\b",
|
|
38
|
-
"\\bsexy\\b",
|
|
39
|
-
"\\bsensual\\b",
|
|
40
|
-
],
|
|
41
|
-
enabled: true,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "explicit-002",
|
|
45
|
-
name: "Body Parts Focus",
|
|
46
|
-
description: "Detects inappropriate body part references",
|
|
47
|
-
contentTypes: ["text", "image"],
|
|
48
|
-
severity: "high",
|
|
49
|
-
violationType: "explicit_content",
|
|
50
|
-
patterns: [
|
|
51
|
-
"\\bbreasts?\\b",
|
|
52
|
-
"\\bboobs?\\b",
|
|
53
|
-
"\\btits?\\b",
|
|
54
|
-
"\\bbutt\\b",
|
|
55
|
-
"\\bass\\b",
|
|
56
|
-
"\\bbuttocks\\b",
|
|
57
|
-
"\\bchest\\b.*\\b(exposed|revealing|bare)\\b",
|
|
58
|
-
"\\bcleavage\\b",
|
|
59
|
-
"\\bgenitals?\\b",
|
|
60
|
-
"\\bpenis\\b",
|
|
61
|
-
"\\bvagina\\b",
|
|
62
|
-
"\\bgroin\\b",
|
|
63
|
-
],
|
|
64
|
-
enabled: true,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: "explicit-003",
|
|
68
|
-
name: "Vulgar Language",
|
|
69
|
-
description: "Detects vulgar and profane sexual terms",
|
|
70
|
-
contentTypes: ["text", "image"],
|
|
71
|
-
severity: "critical",
|
|
72
|
-
violationType: "explicit_content",
|
|
73
|
-
patterns: [
|
|
74
|
-
"\\bf+u+c+k+\\b",
|
|
75
|
-
"\\bfuck\\w*\\b",
|
|
76
|
-
"\\bsh[i1]t\\b",
|
|
77
|
-
"\\bd[i1]ck\\b",
|
|
78
|
-
"\\bcock\\b",
|
|
79
|
-
"\\bpussy\\b",
|
|
80
|
-
"\\bcunt\\b",
|
|
81
|
-
"\\bwh[o0]re\\b",
|
|
82
|
-
"\\bslut\\b",
|
|
83
|
-
"\\bbitch\\b",
|
|
84
|
-
"\\bhentai\\b",
|
|
85
|
-
"\\bhooker\\b",
|
|
86
|
-
"\\bprostitut\\w*\\b",
|
|
87
|
-
],
|
|
88
|
-
enabled: true,
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
|
|
92
11
|
const violenceRules: ModerationRule[] = [
|
|
93
12
|
{
|
|
94
13
|
id: "violence-001",
|
|
@@ -181,7 +100,6 @@ const personalInfoRules: ModerationRule[] = [
|
|
|
181
100
|
];
|
|
182
101
|
|
|
183
102
|
export const defaultModerationRules: ModerationRule[] = [
|
|
184
|
-
...explicitContentRules,
|
|
185
103
|
...violenceRules,
|
|
186
104
|
...hateSpeechRules,
|
|
187
105
|
...illegalActivityRules,
|