ola-specific commited on
Commit
b6fb4b2
·
verified ·
1 Parent(s): 091be7c

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,6 +1,5 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
  *.bin filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
6
  *.ckpt filter=lfs diff=lfs merge=lfs -text
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
 
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
  *.bz2 filter=lfs diff=lfs merge=lfs -text
5
  *.ckpt filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,30 +1,277 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: text
5
- dtype: string
6
- - name: entities
7
- list:
8
- - name: content
9
- dtype: string
10
- - name: label
11
- dtype: string
12
- - name: start_index
13
- dtype: int64
14
- splits:
15
- - name: train
16
- num_bytes: 68336505
17
- num_examples: 97453
18
- - name: test
19
- num_bytes: 12642443
20
- num_examples: 17999
21
- download_size: 35175208
22
- dataset_size: 80978948
23
- configs:
24
- - config_name: default
25
- data_files:
26
- - split: train
27
- path: data/train-*
28
- - split: test
29
- path: data/test-*
30
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ task_categories:
4
+ - token-classification
5
+ language:
6
+ - he
7
+ tags:
8
+ - privacy
9
+ - token-classification
10
+ - security
11
+ - text-masking
12
+ - hebrew
13
+ - pii-detection
14
+ - ner
15
+ pretty_name: GolemGuard
16
+ size_categories:
17
+ - 100K<n<1M
 
 
 
 
 
 
 
 
 
 
 
 
18
  ---
19
+
20
+ # GolemGuard: Hebrew Privacy Information Detection Corpus
21
+
22
+ this is a snapshot of https://huggingface.co/datasets/CordwainerSmith/GolemGuard
23
+ GolemGuard is a comprehensive Hebrew language dataset specifically designed for training and evaluating models for Personal Identifiable Information (PII) detection and masking. The dataset contains ~600MB of synthetic text data representing various document types and communication formats commonly found in Israeli professional and administrative contexts.
24
+
25
+ ## Source Data
26
+ ### Initial Data Collection and Normalization
27
+
28
+ The dataset combines synthetic data generated from multiple authoritative sources:
29
+
30
+ 1. Names:
31
+ - Israeli government open data portal (data.gov.il) for first names
32
+ - Hebrew Wikipedia category for family names
33
+ - Faker library
34
+ - Additional curated sources
35
+
36
+ 2. Addresses:
37
+ - Israeli government datasets for cities
38
+ - Israeli government street names datasets
39
+
40
+ 3. Synthetic Identifiers:
41
+ - ID numbers: Generated following Israeli ID number format and checksum rules
42
+ - Bank accounts: Generated following Israeli bank account number formats
43
+ - Postal codes: Based on valid Israeli postal code ranges
44
+ - Credit cards: Generated following valid card number algorithms
45
+ - Email addresses: Constructed using collected names and top Israeli email providers
46
+
47
+ ### Entity Types:
48
+
49
+ | PII Entity Type | Description | Count |
50
+ |----------------|-------------|-------|
51
+ | FIRST_NAME | First names | 131,192 |
52
+ | LAST_NAME | Last names | 115,020 |
53
+ | ID_NUM | Israeli ID numbers | 77,902 |
54
+ | PHONE_NUM | Phone numbers (both mobile and landlines) | 142,795 |
55
+ | DATE | Dates | 77,042 |
56
+ | STREET | Street addresses | 105,381 |
57
+ | CITY | City names | 105,874 |
58
+ | EMAIL | Email addresses | 90,080 |
59
+ | POSTAL_CODE | Israeli postal codes (Mikud) | 93,748 |
60
+ | BANK_ACCOUNT_NUM | Bank account numbers | 31,046 |
61
+ | CC_NUM | Credit card numbers | 1,751 |
62
+ | CC_PROVIDER | Credit card providers | 1,679 |
63
+
64
+ ### Template Diversity
65
+
66
+ The dataset includes 2,607 unique document templates. Here are the top document types by instance count:
67
+
68
+ | Template Type | Instance Count |
69
+ |--------------|----------------|
70
+ | meeting_summary | 21,983 |
71
+ | appointment_confirmation | 4,420 |
72
+ | job_application_confirmation | 3,611 |
73
+ | job_application | 3,306 |
74
+ | medical_appointment_confirmation | 2,359 |
75
+ | loan_application_received | 1,988 |
76
+ | job_application_received | 1,832 |
77
+ | bank_account_update | 1,609 |
78
+ | appointment_reminder | 1,567 |
79
+ | medical_appointment_reminder | 1,335 |
80
+
81
+ ### Dataset Size
82
+ - Total Size: ~600MB
83
+ - Number of Examples: 115,453
84
+ - Format: JSONL
85
+
86
+ ### Data Splits
87
+
88
+ | Split | Number of Instances |
89
+ |-------|-------------------|
90
+ | Training | 97,453 |
91
+ | Test | 18,000 |
92
+ | **Total** | **115,453** |
93
+
94
+
95
+ ## Languages
96
+
97
+ - Hebrew (he)
98
+ - Locale: Israel (IL)
99
+
100
+ ## Supported Tasks
101
+
102
+ - Token Classification
103
+ - Named Entity Recognition (NER)
104
+ - PII Detection
105
+ - Text Masking
106
+ - Privacy-Preserving Text Processing
107
+
108
+ ## Dataset Structure
109
+
110
+ ### Data Instances
111
+
112
+ Each instance in the dataset contains:
113
+
114
+ ```json
115
+ {
116
+ "id": "String", // Unique identifier
117
+ "source_text": "String", // Original text with PII
118
+ "masked_text": "String", // Text with PII entities masked
119
+ "locale": "String", // Always "IL"
120
+ "language": "String", // Always "he"
121
+ "split": "String", // "train" or "test"
122
+ "privacy_mask": [ // List of PII entities with positions
123
+ {
124
+ "label": "String", // Entity type
125
+ "start": "Integer", // Start position
126
+ "end": "Integer", // End position
127
+ "value": "String", // Original value
128
+ "label_index": "Integer" // Index for multiple entities of same type
129
+ }
130
+ ],
131
+ "span_labels": "List", // Entity spans in [start, end, label] format
132
+ "tokens": "List", // Tokenized text
133
+ "token_classes": "List", // Token-level BIO tags
134
+ "input_ids": "List", // Model input token IDs
135
+ "attention_mask": "List", // Attention mask for padding
136
+ "offset_mapping": "List", // Character offsets for tokens
137
+ "template_type": "String" // Document type/template
138
+ }
139
+ ```
140
+ ### Sample
141
+ ```json
142
+ {"id": "entry_000256", "source_text": "משתתף: דולב שם טוב\nתאריך לידה: 28.08.97\nכתובת: סחרוב דוד 158, קריית ים, 2676389\nאימייל: sagitbendor760@live.com\nטלפון: +972-58-2892208\n\nסיכום הפגישה: בפגישה זו נדונה חשיבות שיפור התקשורת הפנימית בין הצוותים. הוחלט לבצע סדנאות להכשרה נוספת בשבוע הבא.", "masked_text": "משתתף: [FIRST_NAME_1] [LAST_NAME_1]\nתאריך לידה: [DATE_1]\nכתובת: [STREET_1], [CITY_1], [POSTAL_CODE_1]\nאימייל: [EMAIL_1]\nטלפון: [PHONE_NUM_1]\n\nסיכום הפגישה: בפגישה זו נדונה חשיבות שיפור התקשורת הפנימית בין הצוותים. הוחלט לבצע סדנאות להכשרה נוספת בשבוע הבא.", "locale": "IL", "language": "he", "split": "train", "privacy_mask": [{"label": "FIRST_NAME", "start": 7, "end": 11, "value": "דולב", "label_index": 1}, {"label": "LAST_NAME", "start": 12, "end": 18, "value": "שם טוב", "label_index": 1}, {"label": "DATE", "start": 31, "end": 39, "value": "28.08.97", "label_index": 1}, {"label": "STREET", "start": 47, "end": 60, "value": "סחרוב דוד 158", "label_index": 1}, {"label": "CITY", "start": 62, "end": 70, "value": "קריית ים", "label_index": 1}, {"label": "POSTAL_CODE", "start": 72, "end": 79, "value": "2676389", "label_index": 1}, {"label": "EMAIL", "start": 88, "end": 111, "value": "sagitbendor760@live.com", "label_index": 1}, {"label": "PHONE_NUM", "start": 119, "end": 134, "value": "+972-58-2892208", "label_index": 1}], "span_labels": [[7, 11, "FIRST_NAME"], [12, 18, "LAST_NAME"], [31, 39, "DATE"], [47, 60, "STREET"], [62, 70, "CITY"], [72, 79, "POSTAL_CODE"], [88, 111, "EMAIL"], [119, 134, "PHONE_NUM"]], "tokens": ["<s>", "▁מ", "שתתף", ":", "▁דו", "לב", "▁שם", "▁טוב", "▁", "תאריך", "▁", "לידה", ":", "▁28.", "08.", "97", "▁כתובת", ":", "▁", "סחר", "וב", "▁דוד", "▁158", ",", "▁קרי", "ית", "▁", "ים", ",", "▁26", "76", "389", "▁אימייל", ":", "▁sa", "git", "ben", "dor", "760", "@", "live", ".", "com", "▁טלפון", ":", "▁+", "97", "2-", "58", "-28", "92", "208", "▁", "סיכום", "▁הפ", "גישה", ":", "▁בפ", "גישה", "▁זו", "▁", "נד", "ונה", "▁", "חשיבות", "▁", "שיפור", "▁התקשורת", "▁הפנימי", "ת", "▁בין", "▁הצוות", "ים", ".", "▁ה", "וח", "לט", "▁לבצע", "▁", "סדנאות", "▁ל", "הכשרה", "▁נוספת", "▁בשבוע", "▁הבא", ".", "</s>"], "token_classes": ["O", "O", "O", "O", "B-FIRST_NAME", "I-FIRST_NAME", "B-LAST_NAME", "I-LAST_NAME", "O", "O", "O", "O", "O", "B-DATE", "I-DATE", "I-DATE", "O", "O", "B-STREET", "I-STREET", "I-STREET", "I-STREET", "I-STREET", "O", "B-CITY", "I-CITY", "I-CITY", "I-CITY", "O", "B-POSTAL_CODE", "I-POSTAL_CODE", "I-POSTAL_CODE", "O", "O", "B-EMAIL", "I-EMAIL", "I-EMAIL", "I-EMAIL", "I-EMAIL", "I-EMAIL", "I-EMAIL", "I-EMAIL", "I-EMAIL", "O", "O", "B-PHONE_NUM", "I-PHONE_NUM", "I-PHONE_NUM", "I-PHONE_NUM", "I-PHONE_NUM", "I-PHONE_NUM", "I-PHONE_NUM", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O", "O"], "input_ids": [0, 874, 177834, 12, 18133, 22849, 16804, 19767, 6, 174081, 6, 119583, 12, 12511, 17331, 14773, 86185, 12, 6, 214797, 18340, 67512, 78373, 4, 46050, 2754, 6, 448, 4, 1381, 11835, 119861, 194921, 12, 57, 15769, 776, 1846, 110216, 981, 24056, 5, 277, 167153, 12, 997, 14773, 18504, 10057, 48590, 12231, 154782, 6, 186708, 18338, 58366, 12, 65412, 58366, 8248, 6, 16747, 15703, 6, 148055, 6, 154997, 185983, 214547, 609, 7501, 192819, 448, 5, 364, 15662, 21295, 107543, 6, 199930, 657, 226909, 122485, 132299, 54641, 5, 2], "attention_mask": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], "offset_mapping": [[0, 0], [0, 1], [1, 5], [5, 6], [7, 9], [9, 11], [12, 14], [15, 18], [19, 20], [19, 24], [25, 26], [25, 29], [29, 30], [31, 34], [34, 37], [37, 39], [40, 45], [45, 46], [47, 48], [47, 50], [50, 52], [53, 56], [57, 60], [60, 61], [62, 65], [65, 67], [68, 69], [68, 70], [70, 71], [72, 74], [74, 76], [76, 79], [80, 86], [86, 87], [88, 90], [90, 93], [93, 96], [96, 99], [99, 102], [102, 103], [103, 107], [107, 108], [108, 111], [112, 117], [117, 118], [119, 120], [120, 122], [122, 124], [124, 126], [126, 129], [129, 131], [131, 134], [136, 137], [136, 141], [142, 144], [144, 148], [148, 149], [150, 152], [152, 156], [157, 159], [160, 161], [160, 162], [162, 165], [166, 167], [166, 172], [173, 174], [173, 178], [179, 186], [187, 193], [193, 194], [195, 198], [199, 204], [204, 206], [206, 207], [208, 209], [209, 211], [211, 213], [214, 218], [219, 220], [219, 225], [226, 227], [227, 232], [233, 238], [239, 244], [245, 248], [248, 249], [0, 0]], "template_type": "meeting_summary"}
143
+ ```
144
+
145
+ ## Considerations for Using the Data
146
+
147
+ ### Social Impact of Dataset
148
+
149
+ The dataset aims to improve privacy protection in Hebrew text processing by enabling better PII detection and masking. This has important applications in:
150
+
151
+ | Application Area | Description |
152
+ |-----------------|-------------|
153
+ | Regulatory Compliance | Support for GDPR and PPLA requirements |
154
+ | Document Processing | Privacy-preserving text analysis and storage |
155
+ | Information Security | Automated PII detection and protection |
156
+ | Data Loss Prevention | Real-time PII identification and masking |
157
+
158
+ ### Discussion of Biases
159
+
160
+ 1. Geographic Bias
161
+ - Dataset focuses on Israeli context and formats
162
+
163
+ 2. Name Distribution
164
+ - While effort was made to include diverse names, distribution may not perfectly match population demographics
165
+
166
+
167
+ ## Additional Information
168
+
169
+ ### Dataset Curators
170
+
171
+ Dataset was generated by [Liran Baba](https://huggingface.co/CordwainerSmith).
172
+
173
+
174
+ ### Model Training
175
+
176
+ Dataset was generated for training the [GolemPII-xlm-roberta-v1][model-link] model by Liran Baba (CordwainerSmith), model, demonstrating its effectiveness for PII detection and masking tasks in Hebrew text.
177
+
178
+ [model-link]: https://huggingface.co/CordwainerSmith/GolemPII-xlm-roberta-v1
179
+
180
+ ### Recommended Uses
181
+
182
+ | Use Case | Description |
183
+ |----------|-------------|
184
+ | Privacy Protection | Identifying and masking PII in Hebrew documents |
185
+ | Compliance Checking | Automated PII detection for regulatory compliance |
186
+ | Data Sanitization | Cleaning sensitive information from text data |
187
+ | Information Security | Supporting data loss prevention systems |
188
+
189
+ ### Quick Start
190
+ ```python
191
+ from datasets import load_dataset
192
+
193
+ # Load dataset
194
+ dataset = load_dataset("GolemGuard")
195
+
196
+ # Example usage
197
+ sample = dataset['train'][0]
198
+ print(f"Original text: {sample['source_text']}")
199
+ print(f"Masked text: {sample['masked_text']}")
200
+ ```
201
+ ### Versioning
202
+
203
+ This is the initial release of the dataset. Future versions may include:
204
+ - Additional template types
205
+ - Expanded entity coverage
206
+ - Enhanced demographic representation
207
+ - Additional language variants
208
+
209
+ ## License
210
+
211
+ The GolemGuard dataset is released under MIT License with the following additional terms:
212
+
213
+ ```
214
+ MIT License
215
+
216
+ Copyright (c) 2024 Liran Baba
217
+
218
+ Permission is hereby granted, free of charge, to any person obtaining a copy
219
+ of this dataset and associated documentation files (the "Dataset"), to deal
220
+ in the Dataset without restriction, including without limitation the rights
221
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
222
+ copies of the Dataset, and to permit persons to whom the Dataset is
223
+ furnished to do so, subject to the following conditions:
224
+
225
+ 1. The above copyright notice and this permission notice shall be included in all
226
+ copies or substantial portions of the Dataset.
227
+
228
+ 2. Any academic or professional work that uses this Dataset must include an
229
+ appropriate citation as specified below.
230
+
231
+ THE DATASET IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
232
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
233
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
234
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
235
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
236
+ OUT OF OR IN CONNECTION WITH THE DATASET OR THE USE OR OTHER DEALINGS IN THE
237
+ DATASET.
238
+ ```
239
+
240
+ ### How to Cite
241
+
242
+ If you use this dataset in your research, project, or application, please include the following citation:
243
+
244
+ For informal usage (e.g., blog posts, documentation):
245
+ ```
246
+ GolemGuard Dataset by Liran Baba (https://huggingface.co/datasets/CordwainerSmith/GolemGuard)
247
+ ```
248
+
249
+ For academic or professional publications:
250
+ ```
251
+ Baba, L. (2024). GolemGuard: A Professional Hebrew PII Detection Dataset.
252
+ Retrieved from https://huggingface.co/datasets/CordwainerSmith/GolemGuard
253
+
254
+ Related model: GolemPII-xlm-roberta-v1 (https://huggingface.co/CordwainerSmith/GolemPII-xlm-roberta-v1)
255
+ ```
256
+
257
+ ### Usage Examples
258
+
259
+ When referencing in your code:
260
+ ```python
261
+ """
262
+ This code uses the GolemGuard dataset by Liran Baba
263
+ (https://huggingface.co/datasets/CordwainerSmith/GolemGuard)
264
+ """
265
+
266
+ from datasets import load_dataset
267
+ dataset = load_dataset("GolemGuard")
268
+ ```
269
+
270
+ When referencing in your model card:
271
+ ```yaml
272
+ dataset_info:
273
+ - name: GolemGuard
274
+ author: Liran Baba
275
+ url: https://huggingface.co/datasets/CordwainerSmith/GolemGuard
276
+ year: 2024
277
+ ```
data/test-00000-of-00001.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b6c09974d6b45cfcd9933d9c689f97dfda2c3a93772732f03008ad52d87a781a
3
- size 5452435
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:146d6291aaf3428a481534fa1e619c48701993ca2c5dfce1e14c11c8286f71e6
3
+ size 5732912
data/train-00000-of-00001.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1729e1c6e148bec5b08030f5b9abc58296e8147680a7c1ad4ee9f99d6edfe612
3
- size 29722773
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26ad2a8d28e76d97e01890a7fbfa128d56151d7c10f9a93a24c70ffa88798b20
3
+ size 31005187