fix: normalize VerbNet resource name case in xref extractor - #14
Open
abhi-0203 wants to merge 1 commit into
Open
fix: normalize VerbNet resource name case in xref extractor#14abhi-0203 wants to merge 1 commit into
abhi-0203 wants to merge 1 commit into
Conversation
PropBank frame files use capitalized "VerbNet" (39821 occurrences) but the extractor only matched lowercase "verbnet", causing ValueError on valid input. Use case-insensitive comparison for VerbNet, consistent with how FrameNet variants are already handled. Closes FACTSlab#13
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.
Summary
Fixes
ValueError: Unknown lexlink resource type: VerbNet(and the symmetric rolelink error) inxref extract.PropBank frame files overwhelmingly use the capitalized form
"VerbNet"(39,821 occurrences vs 4 lowercase), but the extractor only matched lowercase"verbnet". This causesxref extractto abort on standard SemLink-annotated PropBank frames.Root Cause
In
_index_propbank_mappings, both the lexlink and rolelink branches compare against lowercase"verbnet"only, whilesrc/glazing/types.pyexplicitly lists"VerbNet"(capitalized) as a validResourceType. The FrameNet branch already handles multiple capitalization variants ("FrameNet","Framenet"), but VerbNet did not get the same treatment.Fix
Use
.lower() == "verbnet"for case-insensitive comparison in both the lexlink and rolelink branches, consistent with how the codebase normalizes resource names. Also add"framenet"(lowercase) to the FrameNet variant list for completeness.Verification
Closes #13