Feat property specific label maps#6
Open
rmfranken wants to merge 3 commits into
Open
Conversation
Member
Author
|
@caviri feel free to put the clanker on this - but I couldn't find the option in my "Reviewers" tab. |
Member
|
@rmfranken done, I didn't received the notification. Sorry. |
There was a problem hiding this comment.
Pull Request Overview
This PR implements predicate-specific label maps to prevent mismatches like matching "Python" the snake for a programming language predicate. The key change is transitioning from a single global label map to predicate-specific label maps based on SHACL PropertyShape constraints.
Key changes:
- Refactored label map structure from flat dictionary to predicate-specific nested dictionaries
- Updated RDFTransformer to use the new predicate-specific approach
- Removed global ambiguity handling in favor of immediate failure on predicate-level duplicates
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/strings2things/app/core/ontology_manager.py | Replaced global label map building with SHACL-based predicate-specific label maps |
| src/strings2things/app/core/rdf_transformer.py | Updated to use predicate-specific label maps for matching |
| src/strings2things/app/config.py | Removed FAIL_ON_AMBIGUOUS_LABELS setting |
| src/strings2things/app/api/endpoints.py | Updated method call to get predicate-specific label map |
| tests/test_rdf_transformer.py | Refactored tests to use new predicate-specific structure |
| tests/test_ambigous.py | Updated ambiguity tests for new predicate-specific validation |
| tests/conftest.py | Added new test fixtures supporting the updated architecture |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Member
Author
|
@caviri ready for human review ! |
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.
Proposed Changes
label map is now predicate specific - meaning you can't match "Python" the snake for ex:programmingLanguage.
Types of Changes
What types of changes does your contribution introduce? Put an
xin the boxesthat apply
bugfix.tag
feature.functionality to not work as expected). Use MR tag
feature.other choices apply). Use MR tag
chore.Checklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
CONTRIBUTING
guidelines.
Further Comments