forked from lizilaywer/PrivacyGuard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.json
More file actions
144 lines (144 loc) · 3.96 KB
/
Copy pathconfig.json
File metadata and controls
144 lines (144 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
"version": "1.0",
"app": {
"name": "PrivacyGuard 脱敏卫士",
"window": {
"default_width": 1300,
"default_height": 900,
"min_width": 900,
"min_height": 600,
"dialog_settings_width": 550,
"dialog_settings_height": 700,
"dialog_image_list_width": 600,
"dialog_image_list_height": 500,
"dialog_feedback_width": 480,
"dialog_feedback_height": 600
},
"feedback_url": "https://fcnwakmkeuz7.feishu.cn/share/base/form/shrcnEM1JEbdIKzdB400egj9lHe"
},
"redaction": {
"default_rules": {
"身份证号": {
"pattern": "(?<!\\d)([1-9]\\d{5}(19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]|\\d{15})(?!\\d)",
"enabled": true,
"description": "匹配15位或18位身份证号码"
},
"手机号码": {
"pattern": "(?<!\\d)(1[3-9]\\d{9})(?!\\d)",
"enabled": true,
"description": "匹配中国大陆手机号码"
},
"日期时间": {
"pattern": "\\d{4}[年\\-\\.]\\d{1,2}[月\\-\\.]\\d{1,2}[日]?",
"enabled": true,
"description": "匹配日期格式"
},
"电子邮箱": {
"pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
"enabled": true,
"description": "匹配电子邮箱地址"
},
"银行卡号": {
"pattern": "(?<!\\d)([1-9]\\d{12,18})(?!\\d)",
"enabled": true,
"description": "匹配13-19位银行卡号"
},
"印章": {
"pattern": "__SEAL_DETECTION__",
"enabled": false,
"description": "使用 OpenCV 自动检测并脱敏红色印章区域(基于颜色和形状分析)"
},
"地址(含门牌号)": {
"pattern": "[一-龥]{2,15}(?:省|市|自治区|特别行政区)[一-龥\\d\\s,]{4,40}\\d+号",
"enabled": true,
"description": "匹配含省级行政区且末端为门牌号的地址"
},
"固定电话": {
"pattern": "(?<!\\d)0[\\w]{2,3}[-\\s]?[\\w]{7,8}(?!\\d)",
"enabled": true,
"description": "匹配 0xx-xxxxxxxx 座机/固定电话(容忍 OCR 误识字母替代数字)"
},
"法定代表人": {
"pattern": "法定代表人\\s*[:::]?\\s*[一-龥]{2,4}(?:·[一-龥]{2,4})?",
"enabled": true,
"description": "匹配'法定代表人'标签后的人名(支持半角/全角冒号)"
}
},
"replacement_text": "*",
"custom_keywords": "",
"scan": {
"default_level": 2.0,
"available_levels": [
1.0,
1.5,
2.0
],
"level_labels": {
"1.0": "普通 (1.0x)",
"1.5": "标准 (1.5x 推荐)",
"2.0": "高精 (2.0x)"
}
},
"offset": {
"x_range": [
-20,
50
],
"w_range": [
-20,
20
],
"default_x": 0,
"default_w": 0
},
"precise_locator": {
"enabled": true
},
"enable_name_recognition": true,
"enable_hit_override": true,
"overrides": {
"permanent": []
},
"whitelist_trim_only": true,
"blacklist": [
"0432"
],
"whitelist": [
"盖章",
"吉铁",
"丰满区",
"全能王"
]
},
"ocr": {
"min_rect_width": 5,
"progress_update_interval": 0.05,
"zoom_min": 0.5,
"zoom_max": 4.0,
"box_adjust_ratio": 0.5,
"box_adjust_range": [
-0.3,
0.5
],
"_comment_box_adjust": "检测框大小调节(-30%到+50%),负值扩大,正值收缩,0保持原样"
},
"security": {
"validate_paths": true,
"allowed_extensions": [
".pdf",
".doc",
".docx"
]
},
"ui": {
"theme": "auto",
"animation_enabled": true,
"show_tips": true
},
"advanced": {
"debug_mode": false,
"temp_cleanup_on_exit": true,
"cv2_num_threads": 0,
"omp_num_threads": 1
}
}