fix: Fixes FrameNet lexical unit loading#5
Merged
aaronstevenwhite merged 1 commit intomainfrom Oct 28, 2025
Merged
Conversation
…xing validators to handle all actual data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix FrameNet Lexical Unit Loading
Fixes #4
Description
This PR fixes a critical data completeness issue where FrameNet lexical units were not being loaded during dataset conversion. All frames had empty
lexical_unitsfields despite the raw FrameNet data containing 13,575 lexical units. This fix parses lexical units fromluIndex.xmland properly associates them with their frames during conversion.Type of Change
Key Changes
Lexical Unit Loading
luIndex.xmlframe_idValidation Updates
Version Bump
Problem
Frames had empty
lexical_unitsfields after conversion:The converter only parsed frame XML files and never loaded lexical unit data from
luIndex.xml.Solution
1. Added LU Parsing Methods
_parse_lu_from_index()- Parse individual LU from XML element:convert_lu_index_file()- Convert entireluIndex.xml:LexicalUnitmodels2. Updated Frame Conversion
Modified
convert_frames_directory()to:luIndex.xml(in parent directory)frame_id3. Relaxed Validators
Before:
After:
Impact
Before This Fix
lexical_unitsfieldsAfter This Fix
Example
Files Changed
Core Implementation
src/glazing/framenet/converter.py- Added LU parsing and frame associationsrc/glazing/framenet/types.py- Relaxed validation patternssrc/glazing/cli/convert.py- Updated CLI progress messagesTests
tests/test_framenet/test_converter.py- Added 5 new LU parsing teststests/test_framenet/test_types.py- Updated validation teststests/test_framenet/test_models.py- Updated model testsVersion and Documentation
pyproject.toml- Version bump to 0.2.1src/glazing/__version__.py- Version bump to 0.2.1CHANGELOG.md- Added 0.2.1 entrydocs/- Updated all version references (9 files).pre-commit-config.yaml- Fixed Python 3.13 compatibility for hooksTesting
All tests pass with comprehensive coverage:
Compatibility
Checklist