Repository navigation
Add a check for more than one label per language - #66
Merged
Merged
Conversation
This was referenced Nov 25, 2026
jclerman
force-pushed
the
multiple-labels-per-language
branch
from
November 26, 2026 04:04
9f6ea9e to
b32dc05
Compare
averde15
approved these changes
Nov 26, 2026
Each entity may have one rdfs:label per language, so ROBOT's standard multiple_labels check doesn't fit RadLex's German labels. This custom check reports any entity with two labels in the same language. Its one violation on main, an extra label on RID50845 (#64), is fixed in #69, which this commit builds on. Closes #31 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jclerman
force-pushed
the
multiple-labels-per-language
branch
from
November 27, 2026 17:46
b32dc05 to
1c01792
Compare
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.
Fixes #31
Stacked on #69: merge that first. Until then this PR's base is #69's branch, so the diff shows only the new check.
Summary
Adds a
robot reportcheck that no entity has more than onerdfs:labelin the same language.Details
tests/sparql/robot/multiple_labels_per_language.rqreports every label of an entity that has another label in the same language. Untagged labels count as one more language. Each label in a clash is reported, so a class with two English labels gives two rows.tests/robot-report-profile.txtatERROR.multiple_labelsdoesn't allow for languages, so it would flag every class with an English and a German label. As Michael Hood noted on Add linting rule for max of 1 label per entity per language #31, that could change if the German labels later become@desynonyms.mainthe check reports onlyRID50845NI-RADS Primary Site Score 2a (MRI), which also has the label NI-RADS Primary Site Score 2b (MRI) (RID50845 (NI-RADS Primary Site Score 2a, MRI) also has the 2b label #64). Fix the NI-RADS Primary Site Score 2a and 2b (MRI) classes #69 removes that label, so with Fix the NI-RADS Primary Site Score 2a and 2b (MRI) classes #69 appliedrobot-report-tests.shreports no violations. Without it, this PR's CI would fail.obsolete_class_without_english_label.rq), and every live class currently has one.Motivation
A second label in the same language is a copy error or a misplaced synonym, and tools pick one label arbitrarily. The duplicate on
RID50845came in with #44, and none of the existing checks caught it.Affected classes and properties
None: this PR changes only the tests.
🤖 Generated with Claude Code