| # 001 — Initial Dataset Creation |
|
|
| **Date**: 2026-03-08 |
| **Scope**: Full dataset construction from scratch |
|
|
| --- |
|
|
| ## 1. Objective |
|
|
| Create a comprehensive multilingual lexicon and cognate pair dataset for training phonetic/linguistic models, covering 1,000+ languages with IPA transcriptions, sound class encodings, and cognate relationships. |
|
|
| ## 2. Scripts Used |
|
|
| | Script | Purpose | |
| |--------|---------| |
| | `cognate_pipeline/src/cognate_pipeline/ingest/cldf_ingester.py` | Ingest CLDF-formatted source repos (languages.csv, forms.csv, cognates.csv, borrowings.csv) | |
| | `cognate_pipeline/src/cognate_pipeline/ingest/csv_ingester.py` | Ingest CSV/TSV/.cog format files | |
| | `cognate_pipeline/src/cognate_pipeline/ingest/wiktionary_ingester.py` | Ingest Wiktionary JSONL pronunciation data | |
| | `cognate_pipeline/src/cognate_pipeline/normalise/ipa_normaliser.py` | Normalize IPA transcriptions (NFC, strip brackets, remove stress) | |
| | `cognate_pipeline/src/cognate_pipeline/normalise/sound_class.py` | Encode IPA → SCA (Sound Correspondence Alphabet, List 2012) | |
| | `cognate_pipeline/src/cognate_pipeline/normalise/epitran_backend.py` | Grapheme-to-phoneme conversion via Epitran | |
| | `cognate_pipeline/src/cognate_pipeline/cognate/candidate_gen.py` | Generate pairwise candidates within concept sets | |
| | `cognate_pipeline/src/cognate_pipeline/cognate/baseline_levenshtein.py` | SCA-weighted Levenshtein distance scoring | |
| | `cognate_pipeline/src/cognate_pipeline/cognate/clustering.py` | Union-Find connected components + UPGMA clustering | |
| | `cognate_pipeline/src/cognate_pipeline/export/cldf_exporter.py` | Export to CLDF Wordlist format | |
|
|
| ## 3. Data Sources |
|
|
| | Source | Repository | License | Description | |
| |--------|-----------|---------|-------------| |
| | NorthEurAlex | `https://github.com/lexibank/northeuralex` | CC BY 4.0 | Northern Eurasian lexical database, 1,016 concepts × 107 languages | |
| | IDS | `https://github.com/lexibank/ids` | CC BY 4.0 | Intercontinental Dictionary Series, 1,310 concepts × 329 languages | |
| | ABVD | `https://github.com/lexibank/abvd` | CC BY 4.0 | Austronesian Basic Vocabulary Database, 210 concepts × 1,380+ languages | |
| | WOLD | `https://github.com/lexibank/wold` | CC BY 4.0 | World Loanword Database, 41 donor languages, 21K+ borrowing events | |
| | Sino-Tibetan | `https://github.com/lexibank/sinotibetan` | CC BY 4.0 | Sino-Tibetan cognate database, 6,159 entries with COGIDs | |
| | WikiPron | `https://github.com/CUNY-CL/wikipron` | Apache 2.0 | IPA pronunciations mined from Wiktionary | |
|
|
| ## 4. Source Reputability |
|
|
| - **CLDF repositories** (lexibank): Published by the Max Planck Institute for Evolutionary Anthropology. Cross-Linguistic Data Formats (CLDF) is the de facto standard for computational historical linguistics (Forkel et al. 2018, *Scientific Data*). |
| - **NorthEurAlex**: Curated by Dellert et al. (2020), University of Tübingen. Peer-reviewed in *Language Resources and Evaluation*. |
| - **ABVD**: Greenhill, Blust & Gray (2008). Maintained by ANU. 291K expert cognate judgements from field linguists. |
| - **WOLD**: Haspelmath & Tadmor (2009), Oxford University Press. 21K+ borrowing events with donor language and certainty metadata. |
| - **IDS**: Mary Ritchie Key & Bernard Comrie (2015). Max Planck Institute. |
| - **Sino-Tibetan**: Sagart et al. (2019). Published in *PNAS*. |
|
|
| ## 5. Methodology |
|
|
| ### Lexicon Construction |
| 1. Clone all CLDF source repos to `sources/` |
| 2. Ingest via `cldf_ingester.py`: read `languages.csv` for ISO mapping, `forms.csv` for word forms, resolve IPA from Form/Value columns |
| 3. Normalize IPA: NFC Unicode normalization, strip `[/]` brackets, remove suprasegmentals |
| 4. Encode to SCA: `ipa_to_sound_class()` using List (2012) sound correspondence alphabet |
| 5. Deduplicate: per-language, per-concept, prefer IPA-bearing entries |
|
|
| ### Cognate Pair Generation (v1) |
| 1. Group entries by Concept_ID |
| 2. Generate all pairwise combinations within each concept set |
| 3. Score via SCA-weighted Levenshtein: substitution cost matrix from List (2012), gap penalty = 0.5 |
| 4. Label relationship type from source metadata (expert_cognate from ABVD cognatesets, borrowing from WOLD) |
|
|
| ### Validation Set Construction |
| - 9 language families (Germanic, Celtic, Balto-Slavic, Indo-Iranian, Italic, Hellenic, Semitic, Turkic, Uralic) |
| - 40 shared concepts across 6 semantic domains (body, kinship, nature, animals, verbs, other) |
| - Stratified by phylogenetic distance: L1 (same sub-branch), L2 (same branch), L3 (same family), L4 (cross-family) |
|
|
| ## 6. Tests Performed |
|
|
| - **406 automated tests** (232 unit + 174 expanded validation) via `pytest` |
| - `test_full_pipeline.py`: End-to-end on Ugaritic-Hebrew .cog format (ingest → score → cluster) |
| - `test_validation_sets.py`: Schema validation (14 columns), phylogenetic stratification checks |
| - `test_training_data.py`: Training data consistency (no empty IPA, valid ISO codes) |
| - `test_expanded_validation.py`: Per-family branch validation (Austronesian, Balto-Slavic, Celtic, etc.) |
| - Per-source CLDF validation tests: `sources/abvd/test.py`, `sources/ids/test.py`, `sources/wold/test.py`, `sources/iecor/test.py` |
|
|
| ## 7. Cross-Referencing |
|
|
| - Each entry retains `Source_Record_ID` traceable to original CLDF record |
| - IPA transcriptions spot-checked against WikiPron for 20 random languages |
| - SCA encoding validated against known IPA→SCA mappings from List (2012) Table 2 |
|
|
| ## 8. Output Summary |
|
|
| | File | Rows | Size | |
| |------|------|------| |
| | `data/training/lexicons/` (per-language TSVs) | ~580K entries | ~195 MB total | |
| | `data/training/cognate_pairs/cognate_pairs_inherited.tsv` | ~18.2M | ~1.18 GB | |
| | `data/training/cognate_pairs/cognate_pairs_borrowing.tsv` | ~116K | ~8.0 MB | |
| | `data/training/cognate_pairs/cognate_pairs_similarity.tsv` | ~170K | ~16.2 MB | |
| | `data/training/metadata/languages.tsv` | 1,177 | 39 KB | |
| | `data/training/validation/*.tsv` | 9 families + expanded | ~200 MB | |
|
|
| ## 9. Academic References |
|
|
| - Forkel, R., et al. (2018). "Cross-Linguistic Data Formats." *Scientific Data*, 5:180205. |
| - List, J.-M. (2012). "SCA: Phonetic alignment based on sound classes." *New Directions in Logic, Language, and Computation*, Springer. |
| - Greenhill, S.J., Blust, R. & Gray, R.D. (2008). "The Austronesian Basic Vocabulary Database." *Evolutionary Bioinformatics*, 4:271-283. |
| - Haspelmath, M. & Tadmor, U. (2009). *Loanwords in the World's Languages*. De Gruyter Mouton. |
| - Sagart, L., et al. (2019). "Dated language phylogenies shed light on the ancestry of Sino-Tibetan." *PNAS*, 116(21):10317-10322. |
|
|