universal_dependencies / CHANGELOG.md
iiegn's picture
docs: add changelog entry for v2.2.0
a435bb8

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, and this project adheres to Semantic Versioning.

[2.2.0] - 2026-03-15

Added

  • Parquet stale-artifact guard controls
    • Added --check-extra and --prune-extra support in tools/04_generate_parquet.py to detect or remove extra parquet files/directories before generation.
    • Pinned ud-hf-parquet-tools to v1.2.3, which adds generator-side extra-artifact check/prune behavior.

Changed

  • Release workflow documentation
    • Updated ADDING_NEW_UD_VERSION.md and tools/README.md to recommend --prune-extra --check-extra for release runs and branch refresh loops.

[2.1.1] - 2026-02-19

Changed

  • Dependency Update
    • Pinned ud-hf-parquet-tools to v1.2.1

Fixed

  • Parquet Reproducibility

    • Adopted upstream deterministic Parquet generation behavior from ud-hf-parquet-tools v1.2.1 to avoid spurious bit-level diffs on unchanged source data when regenerating with --overwrite
  • Summary Extraction

    • Made Summary extraction more robust and, in case of failure, warnings explicit

[2.1.0] - 2026-02-18

Added

  • CLARIN Snapshot Pipeline

    • Added snapshot-first UD fetch workflow via tools/01_fetch_ud_snapshot.sh
    • Added shared release-handle mapping in tools/etc/ud_release_handles.tsv
  • Validation UX

    • tools/05_validate_parquet.py now reports how many treebanks are ignored due to tools/blocked_treebanks.yaml
    • Added --blocked-treebanks option to validator wrapper for explicit override

Changed

  • Version Flag Standardization

    • Unified version selection across the full tools pipeline on --ud-ver
    • 00/01 scripts keep --rev as backward-compatible aliases
  • Flag-Driven Pipeline

    • tools/02_generate_metadata.py, tools/03_generate_README.py, tools/04_generate_parquet.py, and tools/05_validate_parquet.py now support explicit --ud-ver workflows with optional .env
  • Metadata and Tooling Robustness

    • tools/02_generate_metadata.py now derives genus by UD version rule:
      • pre-2.15: parsed from family (e.g., Afro-Asiatic, Semitic)
      • 2.15+: read from dedicated genus field
    • Improved path handling and wrapper consistency across tools/
    • Updated tools/README.md and ADDING_NEW_UD_VERSION.md for the CLARIN snapshot + flag-driven workflow

[2.0.2] - 2026-02-02

Added

  • Dependency Update
    • Updated ud-hf-parquet-tools to pinned tag version v1.1.0 in pyproject.toml
    • Added jinja2>=3.1.6 for uv run support

Changed

  • Drop uv script usage

    • Removed shebang --script usage (use uv run with dependencies in pyproject.toml)
  • Treebank Updates

    • Removed ar_nyuad configuration (treebank moved to blocked status)
    • Removed ja_bccwj configuration (treebank moved to blocked status)
  • Metadata Generation

    • 02_generate_metadata.py now uses output formatting

Fixed

  • Updated README Metadata
    • Corrected dataset card configs by excluding blocked treebanks
    • tools/README-2.17 now reflects current dataset configuration

[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 for details
  • Documentation Improvements

    • Added RELEASE.md - Framework version release guide
    • Updated MIGRATION.md - Documents external ud-hf-parquet-tools library
    • Rewrote tools/README.md - Concise quick reference for developers
    • Updated 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.py02_generate_metadata.py (better reflects purpose)
    • 03_fill_universal_dependencies_tamplate.py03_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 <fused> 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 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.