Update README.md
Browse files
README.md
CHANGED
|
@@ -27,13 +27,14 @@ dataset_info:
|
|
| 27 |
dtype: string
|
| 28 |
splits:
|
| 29 |
- name: train
|
| 30 |
-
num_bytes:
|
| 31 |
num_examples: 8849
|
| 32 |
-
download_size:
|
| 33 |
-
dataset_size:
|
| 34 |
language:
|
| 35 |
- kab
|
| 36 |
- ber
|
|
|
|
| 37 |
size_categories:
|
| 38 |
- 1K<n<10K
|
| 39 |
task_categories:
|
|
@@ -58,141 +59,26 @@ A reproducible, georeferenced parallel corpus of Algerian place names extracted
|
|
| 58 |
|
| 59 |
## Description
|
| 60 |
|
| 61 |
-
This dataset contains every OpenStreetMap object in Algeria that is simultaneously tagged with both **French** (`name:fr`) and **Kabyle** (`name:kab`) names. It covers cities, towns, villages, hamlets, roads,
|
| 62 |
|
| 63 |
The corpus is designed for:
|
| 64 |
- **GPS localization** (bilingual map labeling)
|
| 65 |
- **Machine Translation** (French ↔ Kabyle)
|
| 66 |
- **Named Entity Recognition** (NER) for Kabyle
|
| 67 |
- **Speech Synthesis / ASR** text resources
|
| 68 |
-
- **Linguistic research** on
|
| 69 |
|
| 70 |
## Source & Reproducibility
|
| 71 |
|
| 72 |
- **Raw data**: [Geofabrik Algeria extract](https://download.geofabrik.de/africa/algeria.html)
|
| 73 |
- **Original authors**: © OpenStreetMap contributors
|
| 74 |
-
- **Extraction method**:
|
| 75 |
- **License**: [ODbL 1.0](https://opendatacommons.org/licenses/odbl/1-0/)
|
| 76 |
-
- **Last extraction**: 2026-
|
| 77 |
- **Repository**: [boffire/kabyle-toponyms](https://huggingface.co/datasets/boffire/kabyle-toponyms)
|
| 78 |
|
| 79 |
To reproduce the dataset locally:
|
| 80 |
|
| 81 |
```bash
|
| 82 |
-
pip install datasets
|
| 83 |
-
|
| 84 |
-
python build_corpus.py --hub-id boffire/kabyle-toponyms --token $HF_TOKEN
|
| 85 |
-
```
|
| 86 |
-
|
| 87 |
-
## Schema
|
| 88 |
-
|
| 89 |
-
| Column | Type | Description |
|
| 90 |
-
|--------|------|-------------|
|
| 91 |
-
| `french` | `string` | French name (`name:fr` tag) |
|
| 92 |
-
| `kabyle` | `string` | Kabyle name (`name:kab` tag) |
|
| 93 |
-
| `osm_id` | `int64` | OpenStreetMap object ID |
|
| 94 |
-
| `osm_type` | `string` | Object type: `node`, `way`, `relation` |
|
| 95 |
-
| `category` | `string` | Semantic class: `city`, `town`, `village`, `hamlet`, `highway:*`, `admin:*` |
|
| 96 |
-
| `latitude` | `float32` | Latitude (populated for `node` objects only) |
|
| 97 |
-
| `longitude` | `float32` | Longitude (populated for `node` objects only) |
|
| 98 |
-
| `name_tags` | `string` | JSON blob of all `name:*` tags for audit & traceability |
|
| 99 |
-
| `source_date` | `string` | Extraction date (`YYYY-MM-DD`) |
|
| 100 |
-
|
| 101 |
-
## Usage
|
| 102 |
-
|
| 103 |
-
### Load with 🤗 Datasets
|
| 104 |
-
|
| 105 |
-
```python
|
| 106 |
-
from datasets import load_dataset
|
| 107 |
-
|
| 108 |
-
ds = load_dataset("boffire/kabyle-toponyms", split="train")
|
| 109 |
-
|
| 110 |
-
# Sample record
|
| 111 |
-
print(ds[0])
|
| 112 |
-
# {
|
| 113 |
-
# 'french': 'Constantine',
|
| 114 |
-
# 'kabyle': 'Qsemṭina',
|
| 115 |
-
# 'osm_id': 27564946,
|
| 116 |
-
# 'osm_type': 'node',
|
| 117 |
-
# 'category': 'city',
|
| 118 |
-
# 'latitude': 36.36416244506836,
|
| 119 |
-
# 'longitude': 6.608428001403809,
|
| 120 |
-
# 'name_tags': '{"name:fr": "Constantine", "name:kab": "Qsemṭina", ...}',
|
| 121 |
-
# 'source_date': '2026-05-25'
|
| 122 |
-
# }
|
| 123 |
-
```
|
| 124 |
-
|
| 125 |
-
### Quick stats
|
| 126 |
-
|
| 127 |
-
```python
|
| 128 |
-
from collections import Counter
|
| 129 |
-
|
| 130 |
-
# Category distribution
|
| 131 |
-
print(Counter(ds["category"]))
|
| 132 |
-
|
| 133 |
-
# OSM type distribution
|
| 134 |
-
print(Counter(ds["osm_type"]))
|
| 135 |
-
|
| 136 |
-
# Filter cities only
|
| 137 |
-
cities = ds.filter(lambda x: x["category"] == "city")
|
| 138 |
-
print(f"Cities: {len(cities)}")
|
| 139 |
-
```
|
| 140 |
-
|
| 141 |
-
## Statistics
|
| 142 |
-
|
| 143 |
-
| Metric | Value |
|
| 144 |
-
|--------|-------|
|
| 145 |
-
| Total unique pairs | 7,398 |
|
| 146 |
-
| Nodes (with GPS) | 4,504 |
|
| 147 |
-
| Ways | 795 |
|
| 148 |
-
| Relations | 2,099 |
|
| 149 |
-
| Categories | city, town, village, hamlet, highway:*, admin:* |
|
| 150 |
-
|
| 151 |
-
## Coverage & Known Biases
|
| 152 |
-
|
| 153 |
-
- **Geographic bias**: Coverage is limited by OpenStreetMap tagging completeness. Kabylie (Tizi-Ouzou, Béjaïa, Bouira) is naturally over-represented because `name:kab` tagging is denser there. The Sahara and non-Kabyle regions are under-represented.
|
| 154 |
-
- **Road bias**: Roads (`highway=*`) with dual French/Kabyle tagging are less common than populated places.
|
| 155 |
-
- **Administrative duplicates**: Administrative boundaries (`boundary=administrative`) may duplicate names already present as `place=*` nodes. Deduplication is performed on the tuple `(french, kabyle, category)`.
|
| 156 |
-
- **No exhaustivity**: This is **not** a complete gazetteer of Algeria. It is a complete extraction of all OSM objects that happen to carry both language tags at the time of extraction.
|
| 157 |
-
|
| 158 |
-
## Data Quality & Preprocessing
|
| 159 |
-
|
| 160 |
-
1. **Filtering**: Only objects with **both** non-empty `name:fr` and `name:kab` tags are retained.
|
| 161 |
-
2. **Classification**: Objects are categorized by `place`, `highway`, or `boundary` keys.
|
| 162 |
-
3. **Deduplication**: Identical `(french, kabyle, category)` tuples are collapsed to a single record.
|
| 163 |
-
4. **Decoding**: OPL-encoded UTF-8 sequences (`%HH%`) are decoded to proper Unicode (ẓẒ, ṛṚ, ṭṬ, ɛƐ, ɣƔ, ṣṢ, ḍḌ, ǧǦ, ḥḤ, čČ).
|
| 164 |
-
5. **No manual curation**: All entries reflect the state of OSM at extraction time. Errors or inconsistencies in OSM tags are preserved.
|
| 165 |
-
|
| 166 |
-
## Languages
|
| 167 |
-
|
| 168 |
-
- **French** (`fr`): Official language of Algeria, widely used in administration and maps.
|
| 169 |
-
- **Kabyle** (`kab`): Amazigh language spoken primarily in Kabylie and parts of northern Algeria. Written in Latin script with extended characters (ẓẒ, ṛṚ, ṭṬ, ɛƐ, ɣƔ, ṣṢ, ḍḌ, ǧǦ, ḥḤ, čČ).
|
| 170 |
-
|
| 171 |
-
## License
|
| 172 |
-
|
| 173 |
-
The **dataset** (toponym pairs and metadata) is derived from OpenStreetMap and licensed under the **Open Database License (ODbL) 1.0**.
|
| 174 |
-
|
| 175 |
-
> © OpenStreetMap contributors. You are free to copy, distribute, transmit and adapt our data, as long as you credit OpenStreetMap and its contributors. If you alter or build upon our data, you may distribute the result only under the same licence.
|
| 176 |
-
|
| 177 |
-
The **extraction code** is provided under the MIT License (see the source repository).
|
| 178 |
-
|
| 179 |
-
## Citation
|
| 180 |
-
|
| 181 |
-
If you use this dataset in academic work, please cite both the dataset and OpenStreetMap:
|
| 182 |
-
|
| 183 |
-
```bibtex
|
| 184 |
-
@dataset{kabyle-toponyms_osm_2026,
|
| 185 |
-
author = {OpenStreetMap contributors},
|
| 186 |
-
title = {Algeria French--Kabyle Toponym Corpus},
|
| 187 |
-
year = {2026},
|
| 188 |
-
publisher = {HuggingFace},
|
| 189 |
-
howpublished = {\url{https://huggingface.co/datasets/boffire/kabyle-toponyms}},
|
| 190 |
-
note = {Extracted from OpenStreetMap under ODbL 1.0}
|
| 191 |
-
}
|
| 192 |
-
```
|
| 193 |
-
|
| 194 |
-
## Acknowledgments
|
| 195 |
-
|
| 196 |
-
- [OpenStreetMap](https://www.openstreetmap.org/) contributors in Algeria and the Kabyle community for tagging bilingual names.
|
| 197 |
-
- [Geofabrik](https://www.geofabrik.de/) for daily OSM extracts.
|
| 198 |
-
- [Osmium Tool](https://osmcode.org/osmium-tool/) for fast PBF filtering and conversion.
|
|
|
|
| 27 |
dtype: string
|
| 28 |
splits:
|
| 29 |
- name: train
|
| 30 |
+
num_bytes: 3705720
|
| 31 |
num_examples: 8849
|
| 32 |
+
download_size: 1040000
|
| 33 |
+
dataset_size: 3705720
|
| 34 |
language:
|
| 35 |
- kab
|
| 36 |
- ber
|
| 37 |
+
- fr
|
| 38 |
size_categories:
|
| 39 |
- 1K<n<10K
|
| 40 |
task_categories:
|
|
|
|
| 59 |
|
| 60 |
## Description
|
| 61 |
|
| 62 |
+
This dataset contains every OpenStreetMap object in Algeria that is simultaneously tagged with both **French** (`name:fr`) and **Kabyle** (`name:kab`) names. It covers cities, towns, villages, hamlets, roads, administrative boundaries, and localized points of interest (POI).
|
| 63 |
|
| 64 |
The corpus is designed for:
|
| 65 |
- **GPS localization** (bilingual map labeling)
|
| 66 |
- **Machine Translation** (French ↔ Kabyle)
|
| 67 |
- **Named Entity Recognition** (NER) for Kabyle
|
| 68 |
- **Speech Synthesis / ASR** text resources
|
| 69 |
+
- **Linguistic research** on Kabyle toponymy
|
| 70 |
|
| 71 |
## Source & Reproducibility
|
| 72 |
|
| 73 |
- **Raw data**: [Geofabrik Algeria extract](https://download.geofabrik.de/africa/algeria.html)
|
| 74 |
- **Original authors**: © OpenStreetMap contributors
|
| 75 |
+
- **Extraction method**: Native binary stream parsing using the python-osmium API handler framework.
|
| 76 |
- **License**: [ODbL 1.0](https://opendatacommons.org/licenses/odbl/1-0/)
|
| 77 |
+
- **Last extraction**: 2026-06-04
|
| 78 |
- **Repository**: [boffire/kabyle-toponyms](https://huggingface.co/datasets/boffire/kabyle-toponyms)
|
| 79 |
|
| 80 |
To reproduce the dataset locally:
|
| 81 |
|
| 82 |
```bash
|
| 83 |
+
pip install datasets osmium requests tqdm
|
| 84 |
+
python build_corpus.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|