--- license: cc-by-4.0 language: - fr tags: - inception - uima - annotation task_categories: - token-classification configs: - config_name: document_metadata data_files: - split: train path: data/document_metadata/document_metadata_train.parquet - split: dev path: data/document_metadata/document_metadata_dev.parquet - config_name: spans data_files: - split: train path: data/spans/spans_train.parquet - split: dev path: data/spans/spans_dev.parquet --- # Dataset Card for PARHAF-pseudo-annotated

Logo

## Dataset Description - **Points of Contact:** WAJSBURT Perceval, KHALIL Youness ### Dataset Summary PARHAF-pseudo-annotated is a subpart of the PARHAF corpus, an open French corpus of human-authored clinical reports of fictional patients. It was created to support the development and evaluation of clinical NLP systems for the pseudonymization of identifying entities in clinical reports.. This dataset contains **training data only**. The test set will remain under embargo to enable future evaluations under controlled conditions, limiting the risk of LLM contamination through prior data exposure. **Please contact us for access to the test data.** This training dataset is divided into a train split (80%) and a dev split (20%) to facilitate experimental design and reproducibility across teams. Teams are free to use the full training set or define a different split configuration. Each patient record was: - written by a senior medical resident - reviewed by another senior medical resident, from the same specialty - annotated by a specialist of the use case - curated by another specialist of the use case #### Data statistics ### DATASET SUMMARY | Indicator | Value | | --- | --- | | Complete Dataset | | | Number of JSON files | 509 | | Total annotations | 6976 | | Average document length | 4021 characters | | 80% Threshold (annotations) | 5580 | ### Complete dataset distribution by type | Type | Annotations | % of total | | --- | --- | --- | | EntiteAnonymisation | 6976 | 100.00% | ### Complete dataset distribution by populated field | Type.Field | Occurrences | % of total annot. | | --- | --- | --- | | EntiteAnonymisation.Category | 6976 | 100.00% | | EntiteAnonymisation.RoleLOC | 87 | 1.25% | | EntiteAnonymisation.RoleNUM | 8 | 0.11% | | EntiteAnonymisation.RolePER | 2466 | 35.35% | ### Train / Dev Split Results | Indicator | TRAIN | DEV | | --- | --- | --- | | Number of files | 408 | 101 | | Number of annotations | 5580 | 1396 | | Percentage of dataset | 79.99% | 20.01% | | Avg. document length (chars) | 3957 | 4280 | ### Train / Dev distribution by type | Type | TRAIN | DEV | % train of type | | --- | --- | --- | --- | | EntiteAnonymisation | 5580 | 1396 | 79.99% | ### Train / Dev distribution by populated field | Type.Field | TRAIN | DEV | % train of field | | --- | --- | --- | --- | | EntiteAnonymisation.Category | 5580 | 1396 | 79.99% | | EntiteAnonymisation.RoleLOC | 66 | 21 | 75.86% | | EntiteAnonymisation.RoleNUM | 5 | 3 | 62.50% | | EntiteAnonymisation.RolePER | 1971 | 495 | 79.93% | ### Train / Dev distribution by value | Type.Field.Value | TRAIN | DEV | % train | | --- | --- | --- | --- | | EntiteAnonymisation.Category.IDENTIFYING_DATE | 2312 | 568 | 80.28% | | EntiteAnonymisation.Category.LAST_NAME | 1111 | 287 | 79.47% | | EntiteAnonymisation.RolePER.Patient | 978 | 257 | 79.19% | | EntiteAnonymisation.RolePER.Carer | 973 | 232 | 80.75% | | EntiteAnonymisation.Category.FIRST_NAME | 860 | 208 | 80.52% | | EntiteAnonymisation.Category.FAMILY_STATUS | 767 | 203 | 79.07% | | EntiteAnonymisation.Category.PATIENT_SOCIAL_IDENTITY | 424 | 99 | 81.07% | | EntiteAnonymisation.Category.CITY | 43 | 11 | 79.63% | | EntiteAnonymisation.RoleLOC.Patient | 33 | 13 | 71.74% | | EntiteAnonymisation.Category.COUNTRY | 19 | 9 | 67.86% | | EntiteAnonymisation.RolePER.Other | 20 | 6 | 76.92% | | EntiteAnonymisation.RoleLOC.Hospital | 18 | 4 | 81.82% | | EntiteAnonymisation.Category.UNIDENTIFYING_DATE | 19 | 0 | 100.00% | | EntiteAnonymisation.RoleLOC.Other | 15 | 4 | 78.95% | | EntiteAnonymisation.Category.PATIENT_BIRTHDATE | 12 | 5 | 70.59% | | EntiteAnonymisation.Category.PHONE_NUMBER | 5 | 3 | 62.50% | | EntiteAnonymisation.Category.PATIENT_NATIONALITY | 4 | 2 | 66.67% | | EntiteAnonymisation.RoleNUM.Carer | 4 | 1 | 80.00% | | EntiteAnonymisation.Category.ADDRESS | 3 | 0 | 100.00% | | EntiteAnonymisation.RoleNUM.Hospital | 1 | 1 | 50.00% | | EntiteAnonymisation.Category.URL | 1 | 1 | 50.00% | | EntiteAnonymisation.RoleNUM.Other | 0 | 1 | 0.00% | #### Data Origin The clinical reports are extracted from the PARHAF corpus. Please refer to PARHAF documentation for more information about this corpus. ### Languages - fr_FR ## Dataset Structure We distribute both a Hugging Face dataset and a standalone version of the corpus. The standalone dataset consists of a JSON file per patient report, in [UIMA CAS JSON format](https://inception-project.github.io/releases/39.7/docs/user-guide.html#sect_formats_uimajson). This format constitutes the canonical version of the corpus. The Hugging Face dataset (Parquet/Arrow) is a derived representation generated automatically from the JSON files. Both formats therefore contain identical information and differ only in storage layout. One dataset instance corresponds to **one report**. ### Hugging Face dataset This snippet shows how to extract and iterate over medical report information per patient using the datasets library. ```python import pandas as pd from datasets import load_dataset dfs = {cfg: load_dataset("HealthDataHub/PARHAF-pseudo-annotated", cfg, split="train").to_pandas() for cfg in ["document_metadata", "spans"]} for patient_raw in dfs["document_metadata"].itertuples(): report_id = patient_raw.report text = patient_raw.full_text report_spans = dfs["spans"][dfs["spans"]["report"] == report_id] ... ``` ### Data Fields | Path | Type | Description | Possible values | | ---- | ---- | ----------- | --------------- | | **document_metadata** | | | | | `report` | string | Identifiant unique du rapport | | | `full_text` | string | Texte intégral du rapport | | | **spans** | | | | | `report` | string | Identifiant du rapport | | | `span_id` | integer | Identifiant de l'annotation | | | `span_type` | string | Type de l'entité annotée | `EntiteAnonymisation` | | `begin` | integer | Offset de début | | | `end` | integer | Offset de fin | | | `span_text` | string | Texte de l'entité | | | `attribute_Categorie` | string | Categorie | `ADDRESS`, `CITY`, `COUNTRY`, `FAMILY_STATUS`, `FIRST_NAME`, `IDENTIFYING_DATE`, `LAST_NAME`, `PATIENT_BIRTHDATE`, `PATIENT_NATIONALITY`, `PATIENT_SOCIAL_IDENTITY` | | `attribute_RolePER` | string | RolePER | `Carer`, `Other`, `Patient` | | `attribute_RoleLOC` | string | RoleLOC | `Hospital`, `Other`, `Patient` | | `attribute_RoleNUM` | string | RoleNUM | `Carer`, `Hospital` | ### Data Splits Only the training set is released here. The remaining portion of the corpus will be temporarily embargoed to enable future evaluations under controlled conditions, thereby limiting the risk of large language model contamination through prior exposure to the data. You can evaluate your system on the test set through the CodaBench platform. ### Annotation Guidelines You can find the detailed annotation protocol here: [annotation_guidelines.pdf](guidelines/annotation_guidelines.pdf) ### Licensing Information This dataset is released under licenses: - CC BY 4.0 - Etalab 2.0 ### Citation Information [More Information Needed]