File size: 3,677 Bytes
e39cfed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---

license: cc-by-4.0
language:
- de
- en
- es
- fr
- it
tags:
- pii
- token-classification
- privacy
- multilingual
task_categories:
- token-classification
---


# PiiScan training corpus — recipe and provenance

This repository publishes the **recipe**, not the rows.

The PiiScan corpus is derived from sources whose redistribution terms differ, and several forbid
republication outright. Rather than ship a subset that is easy to misuse, this repo contains
everything needed to rebuild the corpus byte-for-byte from the pinned upstream revisions.

## What is here

| File | Purpose |
|---|---|
| `sources.json` | Every source with its pinned revision, licence, access status, and training decision |
| `training-data-mappings.json` | Explicit decision for every upstream label; no default branch |
| `canonical-training-row.schema.json` | The row schema all data is normalised to |
| `entity-tiers.json` | Which of the 39 types are trained, rule-only, experimental, or blocked |
| `build-manifest.json` | Counts by split, source, type, and language; fingerprints |
| `sample-training-data/` | Hand-authored rows and hard negatives, one file per type (ours, freely reusable) |

## Corpus shape

| Split | Rows |
|---|---:|
| train | 1,299,487 |
| validation | 323,767 |
| test | 8,328 |

Benchmark tiers in the test split: external_human_annotated (127), held_out_same_generator (8,201).



## Redistribution status by source



| Source | Licence | Access | Rows published |

|---|---|---|---|

| `openpii-1.5m` | CC-BY-4.0 | open | recipe only |

| `tab` | MIT | open | recipe only |

| `physionet-deid-resources` | ODC-By-1.0 and GPL-2.0-or-later components | open | recipe only |

| `wikiann` | unknown | open | **no** — licence forbids |

| `multinerd` | CC-BY-NC-SA-4.0 | open | **no** — licence forbids |

| `ai4privacy-health-phi-400k` | ai4privacy-commercial | gated | **no** — licence forbids |

| `ai4privacy-financial-pfi-400k` | ai4privacy-commercial | gated | **no** — licence forbids |

| `ai4privacy-location-pli-400k` | ai4privacy-commercial | gated | **no** — licence forbids |

| `ai4privacy-work-pwi-400k` | ai4privacy-commercial | gated | **no** — licence forbids |

| `ai4privacy-digital-pdi-350k` | ai4privacy-commercial | gated | **no** — licence forbids |

| `physionet-gold-medical-text` | PhysioNet credentialed health data terms | credentialed | **no** — licence forbids |

| `n2c2-i2b2-deidentification` | controlled research terms | currently_unavailable | **no** — licence forbids |
| `meddocan` | confirm with corpus owner | registration_required | **no** — licence forbids |

| `kaggle-pii-educational` | Kaggle competition rules | competition_terms_required | **no** — licence forbids |

| `ontonotes-5` | LDC User Agreement | paid_or_membership | **no** — licence forbids |



## Rebuild it



```bash

git clone https://github.com/palarnab/piiscan && cd piiscan

python downloaded-training-data/download.py     # pinned revisions only

python scripts/build_training_data.py

python scripts/validate_training_data.py

```



The build fails rather than silently dropping data if an unknown upstream label appears, and

validation enforces span integrity, unique IDs, and cross-split leakage checks.



## Attribution



```

Training data derived from Ai4Privacy OpenPII 1.5M (CC-BY-4.0),

© Ai Suisse SA — https://huggingface.co/datasets/ai4privacy/pii-masking-openpii-1.5m

Evaluation uses the Text Anonymization Benchmark (MIT).

```



## Author



Arnab Pal — [LinkedIn](https://www.linkedin.com/in/pal-arnab) · [GitHub](https://github.com/palarnab)