Skip to content

Give every obsolete class an English label - #30

Open
hoodcm wants to merge 2 commits into
mainfrom
obsolete-class-english-label
Open

hoodcm wants to merge 2 commits into
mainfrom
obsolete-class-english-label

Conversation

@hoodcm

@hoodcm hoodcm commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Part of #13.

I added one check.

Check Data checked Why
An obsolete class has an English label Classes under RID15849 Without one, tools show the bare RID.

I gave 912 obsolete classes an English label from their obsolete name:

  • 839 use the name as it is.
  • 69 match a live class's label, so they end in "(obsolete)".
  • 4 share a name with another obsolete class, so they also carry their RID, such as "middle para-aortic lymph node group (obsolete RID38140)".

RID32059's label changed from "pre-aortic lymph node group proper," which is another obsolete class's name, to its own name, "pre-aortic proper lymph node."

Two of the 912, RID27787 and RID49508, are the classes PR #9 files under RID15849.

Preferred_Name_for_Obsolete stays for now. A later PR removes it, after the reason-for-deprecation property is named.

ROBOT's missing_label drops from 972 to 67. All tests pass.

WHERE {
?entity rdfs:subClassOf+ rid:RID15849 .
FILTER NOT EXISTS { ?entity rdfs:label ?label . FILTER(LANG(?label) = "en") }
BIND(rdfs:label AS ?property)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternative pattern for this that is easily extended to cover more properties later (totally optional here):

Suggested change
BIND(rdfs:label AS ?property)
VALUES ?property { rdfs:label }

SELECT ?entity ?property ?value
WHERE {
?entity rdfs:subClassOf+ rid:RID15849 .
FILTER NOT EXISTS { ?entity rdfs:label ?label . FILTER(LANG(?label) = "en") }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this line down below the BIND (or VALUES) line, and then replace rdfs:label here with ?property. That eliminates repetition, so the two can't get out of sync.

FILTER NOT EXISTS { ?entity rdfs:label ?label . FILTER(LANG(?label) = "en") }
BIND(rdfs:label AS ?property)
OPTIONAL { ?entity rid:Preferred_Name_for_Obsolete ?name }
BIND(COALESCE(STR(?name), "") AS ?value)

@jclerman jclerman Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offending "value" is actually the lack of a value. I would drop the reference to the obsolete name and simply bind "" here (or some sentinel value that we treat as None - it doesn't really matter since it's the ?entity ?property combination that defines where there's an issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants