I just started generating the labels and there is another issue: The ontology uses inconsistent standards. For the classes it uses underscores e.g., "Health_Care" but for the object properties it uses reverse camel back so "hasPatient" rather than "has_Patient" This is also bad design, especially because at least one of the object properties uses an underscore. It doesn't matter which standard you use but you should pick one standard and use that consistently. I reworked my SPARQL queries to work with the underscores and that worked for the classes and individuals but not for the object properties. FYI, here are the SPARQL queries that generated labels for the classes and instances:
PREFIX owl:
PREFIX rdf:
PREFIX rdfs:
#Create labels for all Classes
CONSTRUCT {?c rdfs:label ?lblname.}
WHERE {?c rdfs:subClassOf owl:Thing.
BIND(STRAFTER(STR(?c), '#') as ?name)
BIND(REPLACE(?name,"_", " " ) as ?namewbs)
BIND (IF (STRSTARTS(?namewbs," "),SUBSTR(?namewbs,1),?namewbs) AS ?lblname)
OPTIONAL{?c rdfs:label ?elbl.}
FILTER(?c != owl:Thing && ?c != owl:Nothing && !BOUND(?elbl))}
#Create labels for all Individuals
CONSTRUCT {?i rdfs:label ?lblname.}
WHERE {?i a owl:Thing.
BIND(STRAFTER(STR(?i), '#') as ?name)
BIND(REPLACE(?name,"_", " " ) as ?namewbs)
BIND (IF (STRSTARTS(?namewbs," "),SUBSTR(?namewbs,1),?namewbs) AS ?lblname)
OPTIONAL{?i rdfs:label ?elbl.}
FILTER(!BOUND(?elbl))}