fix: follow SKOS direction for broadMatch/narrowMatch - #27
Open
cmungall wants to merge 1 commit into
Open
Conversation
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
2 tasks
Per the SKOS Reference, "A skos:broadMatch B" asserts that the object B is the broader concept, so A is a proper subclass of B; narrowMatch is the inverse. The SSSOM converter had both reversed, and the SSSOM renderer emitted ProperSubClassOf(sub, sup) as "sub narrowMatch sup", which reads as sup being narrower. Round-tripping was self-consistent, so this only surfaced when exchanging SSSOM with other tools, where every hierarchical mapping came out reversed. The docs already described the correct direction for the OBO example. Fixes #17 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
cmungall
force-pushed
the
fix/splitter-fact-entities
branch
from
September 5, 2026 21:18
fc3d97b to
f1809a2
Compare
cmungall
force-pushed
the
fix/skos-direction
branch
from
September 5, 2026 21:18
053bd51 to
391a6b0
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
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 #17.
_make_factinsssom_converter.pytreatedA skos:broadMatch Bas "A is broader" and emittedProperSubClassOf(sub=B, sup=A), withnarrowMatchhandled the opposite way. The SKOS Reference says the object ofskos:broaderis the broader concept, andbroadMatch/narrowMatchare sub-properties ofbroader/narrower. SoA broadMatch Bnow yieldsProperSubClassOf(sub=A, sup=B)andA narrowMatch ByieldsProperSubClassOf(sub=B, sup=A).sssom_renderer.pyemittedProperSubClassOf(sub, sup)assub skos:narrowMatch sup, which per SKOS sayssupis narrower. It now emitsskos:broadMatch._make_fact, so they pick up the fix.test_sssom_converter.py,test_sssom_renderer.py, andtest_ontology_converter.pyasserted the inverted reading and are updated.docs/formats.mdanddocs/ontology-conversion.mdnow state the direction explicitly; the worked OBO example in the latter already described the correct direction and contradicted the code.Round-tripping boomer → SSSOM → boomer was self-consistent before, so existing internal results are unaffected. KBs built from third-party SSSOM
broadMatch/narrowMatchrows, and any SSSOM exported from boomer for other tools, should be regenerated.Stacked on #14.
Test plan
uv run pytestmake doctest(the_make_factdoctests encode the new direction)🤖 Generated with Claude Code