Datasets:
Tasks:
Token Classification
Formats:
parquet
Sub-tasks:
named-entity-recognition
Languages:
Arabic
Size:
10K - 100K
License:
File size: 5,664 Bytes
b0e81ac eb1fd90 b0e81ac eb1fd90 1e63bb3 149924a 194828c 149924a b0e81ac 24e692f b0e81ac 24e692f 40a164d 24e692f 40a164d 24e692f 40a164d b4de9d1 24e692f 125163a 24e692f 8e6f933 24e692f 40a164d 24e692f 40a164d 24e692f 40a164d 24e692f 125163a 40a164d 24e692f 125163a 24e692f 125163a 24e692f 40a164d 24e692f 40a164d 24e692f 40a164d 24e692f 149924a |
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 |
---
pretty_name: ShamNER
license: cc-by-4.0
language:
- ar
annotations_creators:
- expert-annotated
task_categories:
- token-classification
task_ids:
- named-entity-recognition
multilinguality: monolingual
data_files:
train: train.parquet
validation: validation.parquet
test: test.parquet
iaa_A: iaa_A.parquet
iaa_B: iaa_B.parquet
splits:
- name: train
num_examples: 19532
- name: validation
num_examples: 1931
- name: test
num_examples: 1959
- name: iaa_A
num_examples: 5806
- name: iaa_B
num_examples: 5806
---
# ShamNER – Spoken Arabic Named‑Entity Recognition Corpus (Levantine v1.1)
ShamNER is a curated corpus of Levantine‑Arabic sentences annotated for Named Entities, plus dual annotation to check for consisetency (`agreement`) across human annotators.
* **Rounds** : `pilot`, `round1`–`round5` (manual, as a rule quality improved across rounds) and `round6` (synthetic, post‑edited). The `sythentic` data is done by sampling label-rich annotated spans from an MSA project and writing it with an LLM while force-injecting the annotated spans. Native speakers of Arabic then edited the these chunks to see to it that they sound as fluent and dilactical as possible. They were instructed not to touch the annotated spans. A script validated that no spans were modified.
* **Strict span‑novel evaluation** : validation and test contain **no entity surface‑form that appears in train** (after normalisation). This probes true generalisation.
* **Tokeniser‑agnostic** : only raw sentences and character spans are stored; regenerate BIO tags with any tokenizer you wish.
## Quick start
```python
# Uncomment next line if you hit a LocalFileSystem / fsspec error on Colab
# !pip install -U "datasets>=2.16.0" "fsspec>=2023.10.0"
from datasets import load_dataset
sham = load_dataset("HebArabNlpProject/ShamNER")
train_ds = sham["train"]
```
`datasets` streams the top‑level `*.parquet` files automatically; use the matching `*.jsonl` for grep‑friendly inspection.
## Split Philosophy
* **No duplicate documents** – A *document* is identified by the pair
`(doc_name, round)`; each such bundle is assigned to exactly one split. This rule holds true for bundles, though individual sentences within bundles might have overlapping spans after post-allocation pruning for specific thresholds.
* **Rounds** – Six annotation iterations:
`pilot`, `round1` – `round5` (manual, quality improving each round) and
`round6` (synthetic, then post-edited).
Early rounds feed **train**; span-novel slices of `round5` + `round6`
populate **test**.
* **Single test set** – The corpus ships one held-out test split:
*`test` = span-novel bundles from round 5 **plus** span-novel bundles from
round 6.*
No separate `test_synth` file.
* **Span-novelty rule (Relaxed)**
Before allocation, normalise every entity string:
- Convert to lowercase (Latin aphbaet exists in social media)
- Strip Arabic diacritics
- Remove leading “ال”
- Collapse internal whitespace
A bundle is forced to **train** if **any** of its normalised spans already occurs in train.
A **post-allocation pruning** step then moves sentences from validation or test back to train
**only if more than 50%** of their normalized spans already exist in the training set.
This threshold (**0.50**) was chosen to provide more learning examples to the model
in the evaluation sets, leading to improved performance.
* **Tokeniser-agnostic** – Each record stores only raw `text` and
character-offset `spans`; no BIO arrays. Users regenerate token-level labels
with whichever tokenizer their model requires.
## Split sizes
| split | sentences | files |
| ---------- | ---------- | ------------------------------- |
| train | **19 532** | `train.jsonl` / `train.parquet` |
| validation | 1 931 | `validation.*` |
| test | 1 931 | `test.*` |
| iaa\_A | 5 806 | optional, dual annotator A |
| iaa\_B | 5 806 | optional, annotator B |
Every sentence that appears in iaa_A.jsonl is also in the train split (with the same labels), while iaa_B.jsonl provides the alternative annotation for agreement/noise studies.
## Label inventory (computed from `unique_sentences.jsonl`)
| label | description | count |
|-------|---------------------------|------:|
| GPE | Geopolitical Entity | 4 601 |
| PER | Person | 3 628 |
| ORG | Organisation | 1 426 |
| MISC | Catch-all category | 1 301 |
| FAC | Facility | 947 |
| TIMEX | Temporal expression | 926 |
| DUC | Product / Brand | 711 |
| EVE | Event | 487 |
| LOC | (non-GPE/natural) Location | 467 |
| ANG | Language | 322 |
| WOA | Work of Art | 292 |
| TTL | Title / Honorific | 227 |
## File schema (`*.jsonl`)
```jsonc
{
"doc_id": 137,
"doc_name": "mohamedghalie",
"sent_id": 11,
"orig_ID": 20653,
"round": "round3",
"annotator": "Rawan",
"text": "جيب جوال أو أي اشي ضو هيك",
"spans": [
{"start": 4, "end": 8, "label": "DUC"}
]
}
```
### Inter‑annotator files
`iaa_A.jsonl` and `iaa_B.jsonl` contain parallel annotations for the same 5 806 sentences. Use them to measure agreement or experiment with noise‑robust training. These sentences **do not** overlap with the primary train/val/test splits. As stated above, only `iaa_A.jsonl` were injected into the train, dev and test set.
© 2025 · CC BY‑4.0 |