Use the official universal-dependencies/universal_dependencies Hub namespace in active examples, add former-location and v2.0 rewrite notes, and document the pending UPOS/HEAD schema change.
Refs: https://huggingface.co/datasets/universal-dependencies/universal_dependencies/discussions/2
Refs: https://huggingface.co/datasets/universal-dependencies/universal_dependencies/discussions/3
- Update tools/README.md workflow to use new script names:
- 02_traverse_ud_repos.py → 02_generate_metadata.py
- 03_fill_universal_dependencies_tamplate.py → 03_generate_README.py
- Remove references to universal_dependencies-VERSION files (no longer generated)
- Update CONLLU_PARSING_ISSUES.md references to point to ud-hf-parquet-tools repo
- Update templates/README.tmpl with correct documentation link
- Regenerate README-2.17 from updated template
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Refactor: Rename and simplify README generation script
- Renamed 03_fill_universal_dependencies_tamplate.py to 03_generate_README.py
- Script now only generates README-{UD_VER}, not universal_dependencies-{UD_VER}
- Removed templates/universal_dependencies.tmpl (no longer needed)
- Updated docstring to reflect new focused purpose
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add conditional check to skip blocked treebanks in configs section
- Only treebanks with metadata.blocked == False will appear in dataset card
- Ensures blocked treebanks (e.g., pt_cintil) don't show in HuggingFace UI
This prevents users from seeing configs for treebanks that have no
parquet files due to license restrictions.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change from dataset_info to configs format in README template
- Use data_files with parquet paths instead of features schema
- Add uv index configuration to pyproject.toml for PyPI and TestPyPI
- Set en_ewt as default config
- Simplify README structure (removed redundant feature definitions)
- Add TODO note about helper functions post v2.0
This aligns with HuggingFace's current dataset card standards
and the new parquet-based distribution model.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Revert README.md to 541812f0 and update with tools/ content
Changes:
- Enable Dataset Viewer (viewer: true) for HuggingFace dataset page
- Add "Data Quality & Fidelity" section highlighting:
- 100% fidelity for linguistic data
- ~99.98% fidelity for metadata
- Recent parsing bug fixes (double equals, empty nodes, duplicate keys)
- Link to technical documentation (CONLLU_PARSING_ISSUES.md)
- Update Table of Contents to include new section
Files updated:
- README.md: Main dataset card
- tools/templates/README.tmpl: Template for future regeneration
- tools/README-2.17: Version-specific README
- tools/universal_dependencies-2.17: Version-specific loader
This makes the dataset more discoverable and transparent about data quality
guarantees, helping users understand the high fidelity of the parquet files.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix empty nodes with ID < 1 (e.g., 0.1) not being reconstructed
Empty nodes (enhanced dependencies) with decimal IDs less than 1, such as
0.1 or 0.2, were not being included in the reconstructed CoNLL-U output.
These nodes appear before token 1 and represent zero elements like pro-drop
subjects.
The reconstruction code was only handling empty nodes that come after their
parent token (e.g., 22.1 after token 22), but missed nodes with parent ID 0,
which must be inserted before token 1.
Fixes:
- Template reconstruction: Insert 0.x empty nodes before token loop
- Validation reconstruction: Same fix for consistency
- Documentation: Added section 7 explaining the issue and fix
Affected treebank:
- ca_ancora: 445 sentences with 0.x empty nodes now validate perfectly
Validation results:
- ca_ancora: 16,678/16,678 sentences (100% success)
- fr_gsd, en_ewt, it_isdt: Still passing (47,131 sentences)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix CoNLL-U parsing bugs and improve metadata fidelity
Issue: Empty nodes (8, '.', 1) were being added to BOTH mwts and empty_nodes:
- As MWT: "8-1" (wrong - invalid ID)
- As empty_node: "8.1" (correct)
Root cause: MWT detection checked isinstance(token['id'], tuple) without
checking the middle element. Both MWTs and empty nodes are tuples:
- MWT: (1, '-', 2) for "1-2"
- Empty node: (8, '.', 1) for "8.1"
Fix: Add token['id'][1] == '-' check to MWT detection to exclude empty nodes
This caused 75 validation errors in sentences with empty nodes.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Critical fix: Store data in proper CoNLL-U format and add empty_nodes
Addresses user feedback on data representation:
1. **Self-aware data types** (no string parsing needed):
- feats/misc now stored in CoNLL-U format: "Key=Value|Key2=Value2"
- NOT as Python dict strings: "{'Key': 'Value'}"
- Data is self-describing and directly usable
2. **100% verbatim reconstruction** (no data loss):
- Added empty_nodes field to schema
- Empty nodes (decimal IDs like 22.1) now preserved
- Can reconstruct CoNLL-U files exactly from Parquet
3. **Empty node detection fix**:
- conllu library represents 22.1 as tuple (22, '.', 1), not float
- Updated detection: isinstance(token['id'], tuple) and token['id'][1] == '.'
Verified: en_ewt captures 40 sentences with empty nodes correctly
Next: Regenerate all 235 treebanks with corrected format
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Upgrade to loader v2.0: Parquet format, MWT support, bug fixes
Major version upgrade from implicit v1.0 to explicit v2.0 with breaking changes.
## Breaking Changes
- **Requires datasets>=4.0.0** for Parquet format support
- Python dataset scripts deprecated in HuggingFace datasets 4.0.0
- No more trust_remote_code required (security improvement)
- **Token sequences now correctly exclude MWT surface forms**
- v1.0 incorrectly included Multi-Word Token (MWT) surface forms
- Affects ~50+ treebanks with contractions (French, Italian, Portuguese, etc.)
- Token counts now match UD stats.xml 'words' count, not 'tokens' count
- Example: French 'des' (1-2) now correctly yields only ['de', 'les']
## Added
- **Parquet format distribution** (tools/04_generate_parquet.py)
- 5-10x faster loading compared to on-the-fly CoNLL-U parsing
- Compatible with HuggingFace datasets >=4.0.0
- Reduced memory footprint and better compression
- **Multi-Word Token (MWT) support**
- New 'mwt' field in schema: [{id, form, misc}]
- Enables research on…