# Changelog All notable changes to the Universal Dependencies HuggingFace dataset loader will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [2.0.1] - 2026-01-14 ### Added - **Blocked Treebanks Support** - Added `blocked_treebanks.yaml` configuration for license-restricted treebanks - Metadata generation now includes "blocked" property for each treebank - Dataset card (README.md) automatically filters blocked treebanks from configs - See [tools/BLOCKED_TREEBANKS.md](tools/BLOCKED_TREEBANKS.md) for details - **Documentation Improvements** - Added [RELEASE.md](RELEASE.md) - Framework version release guide - Updated [MIGRATION.md](MIGRATION.md) - Documents external ud-hf-parquet-tools library - Rewrote [tools/README.md](tools/README.md) - Concise quick reference for developers - Updated [ADDING_NEW_UD_VERSION.md](ADDING_NEW_UD_VERSION.md) - Comprehensive guide with current architecture - Added comprehensive Python patterns to `.gitignore` ### Changed - **Script Renaming for Clarity** - `02_traverse_ud_repos.py` → `02_generate_metadata.py` (better reflects purpose) - `03_fill_universal_dependencies_tamplate.py` → `03_generate_README.py` (fixed typo, clarified scope) - Updated all documentation and workflows to reference new names - **Tooling Simplification** - Removed generation of `universal_dependencies-{VER}` files (obsolete with Parquet-only architecture) - Removed `templates/universal_dependencies.tmpl` (no longer needed) - Moved tests to external `ud-hf-parquet-tools` library - `03_generate_README.py` now only generates README, not Python loader script - **Metadata Generation** - `02_generate_metadata.py` now reads `blocked_treebanks.yaml` and adds blocked status to metadata - Enhanced logging for blocked treebanks - **Template Updates** - `templates/README.tmpl` now filters blocked treebanks from configs section - Updated CONLLU_PARSING documentation link to point to ud-hf-parquet-tools repository ### Fixed - **License Compliance** - Properly excludes treebanks with restrictive licenses (e.g., CC BY-NC-SA) that prohibit redistribution in derived formats - Currently excludes: pt_cintil (Portuguese-CINTIL) ### Removed - **Obsolete Files** - Removed all `universal_dependencies-2.{7-17}` generated files (11 files) - Removed `templates/universal_dependencies.tmpl` template - Removed local `tests/` directory (functionality moved to ud-hf-parquet-tools) ### Documentation All documentation now reflects the current architecture: - No Python script loader (Parquet-only) - External helper library (ud-hf-parquet-tools) - Blocked treebanks handling - Updated script names and workflows ## [2.0.0] - 2026-01-09 ### Breaking Changes - **Requires datasets>=4.0.0** for Parquet format support - Python dataset scripts are deprecated in datasets 4.0.0 (July 2025) - Parquet format is now the primary distribution method - **Token sequences now correctly exclude MWT forms** - Previous versions incorrectly included Multi-Word Token (MWT) surface forms in token sequences - Token counts now match `num_words` from stats.xml, not `num_tokens` - Affects ~50+ treebanks with contractions (French, Italian, Portuguese, Spanish, Arabic, etc.) - **Example:** French "des" (MWT 18-19) → "de" + "les" (syntactic words 18, 19) - **v1.x (buggy):** tokens = [..., "des", "de", "les", ...] - **v2.0 (correct):** tokens = [..., "de", "les", ...], mwt = [{"id": "18-19", "form": "des", "misc": ""}] ### Added - **Multi-Word Token (MWT) Support** - New `mwt` field in dataset schema containing structured MWT information - Schema: `[{"id": "1-2", "form": "surface_form", "misc": "metadata"}]` - Enables research on contractions, clitics, and word segmentation across languages - MWT statistics now collected from stats.xml (`num_fused` field) - **Parquet Format Distribution** - All 339 treebanks available as Parquet files for efficient loading - 5-10x faster loading compared to on-the-fly CoNLL-U parsing - Reduced memory footprint and better compression - Compatible with HuggingFace datasets >=4.0.0 - **Separate Semantic Versioning** - Loader version (2.0.0) now tracked independently from UD data version (2.17) - Version in pyproject.toml reflects codebase changes - UD data version remains in dataset configuration - Enables clearer communication of breaking changes in tooling - **Parquet Generation Pipeline** - New `tools/04_generate_parquet.py` script for CoNLL-U → Parquet conversion - Supports batch processing and validation - Test mode for quick iteration (`--test` flag) - Progress tracking and error reporting ### Fixed - **Critical Bug: MWT lines incorrectly included in token sequences** - Fixed filtering in `_generate_examples()` to exclude MWT lines (tuple IDs) and empty nodes - Now uses `sent.filter(id=lambda x: type(x) is int)` to extract only syntactic words - Impact: Token counts were inflated by ~0.1-2% in affected treebanks - All token-level annotations (lemmas, UPOS, XPOS, features, heads, deprels) now correctly aligned ### Changed - **Dataset schema extended** (non-breaking addition) - Added `mwt` field to all treebanks (empty list for treebanks without MWTs) - **Dependencies updated** - Added `pyarrow>=14.0.0` for Parquet support - Added `datasets>=4.0.0` for compatibility - Added `conllu>=5.0.0` for reliable CoNLL-U parsing - **Metadata collection enhanced** - `tools/02_traverse_ud_repos.py` now extracts `` counts from stats.xml - Enables validation of MWT extraction accuracy ## [1.0.0] - 2025-12-01 (Retroactive) ### Initial Release - Python dataset loader using `GeneratorBasedBuilder` - On-the-fly download and parsing of CoNLL-U files from GitHub - Support for 339 treebanks across 186 languages - UD data version: 2.15-2.17 - Compatible with HuggingFace datasets <4.0.0 using `trust_remote_code=True` ### Features - Dynamic loading from Universal Dependencies GitHub repositories - Automatic train/dev/test split detection - CoNLL-U format parsing with conllu library - Dataset features: tokens, lemmas, UPOS, XPOS, features, heads, dependency relations - Metadata: language codes, families, licenses, genres ### Known Issues (Fixed in 2.0.0) - MWT lines incorrectly included in token sequences - No explicit MWT information available to users - Requires `trust_remote_code=True` (security concern) - Incompatible with datasets >=4.0.0 --- ## Migration Guide See [MIGRATION.md](MIGRATION.md) for detailed migration instructions from v1.x to v2.0. ## Version Numbering - **Loader version** (e.g., 2.0.0): Reflects changes to the loading infrastructure and tooling - **UD data version** (e.g., 2.17): Reflects the Universal Dependencies release version Both versions are tracked separately to provide clarity on what changed.