Sveino / Inst4CIM-KG

Instance of CIM Knowledge Graph
Apache License 2.0
5 stars 1 forks source link

remove spaces and lang tags from key values #47

Closed VladimirAlexiev closed 2 months ago

VladimirAlexiev commented 2 months ago

Key values must be spelled with ultimate care because... well, they are key. This is similar to https://github.com/Sveino/Inst4CIM-KG/issues/6 but worse.

Extraneous spaces in key values are NOK because:

Bad examples that come from https://github.com/Sveino/Inst4CIM-KG/issues/10, https://github.com/Sveino/Inst4CIM-KG/issues/38:

cim:UnitSymbol.VA a owl:NamedIndividual, owl:Thing ;
  rdfs:label "VA "@en ;
  eq:isenum "True" ;

cim:UnitMultiplier.M a owl:NamedIndividual, owl:Thing ;
  rdfs:label "M "@en ;

cim:Temperature.multiplier
  sc:isFixed "True ";
  dy:isFixed "True".
griddigit-ci commented 2 months ago

On the spaces. It will be good to know in which RDFS you find this. I checked in UML and I see that there are no spaces. It could be a bug in RDFS export if this is only in the 501 Ed2 Beta - I expect this is a bug in CimSyntaxGen prototype that was done 4 years ago

Also as a background. It looks like we have an agreement now to exchange in basic units i.e. no M but in form 1e6

VladimirAlexiev commented 2 months ago

@griddigit-ci

VladimirAlexiev commented 2 months ago

We checked, this only happens in Ed2 not in 2020.

VladimirAlexiev commented 2 months ago

the "en" lang tag is not appropriate for code values. Eg "VA" and "M" are SI unit and multiplier respectively. SI is the international system of units, so these codes cannot have lang tags.

This query finds 842 enumerations whose label is marked @en:

PREFIX cims: <http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#>
select * {
  ?x ?p ?y; cims:stereotype "enum"
  filter(lang(?y)="en")
} order by ?x

Examination shows that the following consist entirely of codes, so we'll remove the lang tag: cim:Currency cim:IfdBaseKind cim:PhaseCode cim:StaticLoadModelKind cim:UnitMultiplier cim:UnitSymbol cim:WindingConnection

VladimirAlexiev commented 2 months ago

fix14-langTagInCodes-47.ru. Asking @Sveino and @griddigit-ci to approve (re the last comment above).

VladimirAlexiev commented 1 month ago

https://github.com/Sveino/Inst4CIM-KG/issues/93 is related: it asks to remove lang tag from ontology term labels (and add to comments). Whereas this is about lang tags of values.