Sveino / Inst4CIM-KG

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

Multilinguality in CIM? #73

Open VladimirAlexiev opened 2 months ago

VladimirAlexiev commented 2 months ago

This section was provoked by pondering the difference between cim:String and profcim:StringFixedLanguage.

AFAIK, CIM does not allow (and has not considered?) multilinguality

Eg cim:IdentifiedObject.name doesn't allow multiple values:

ido:IdentifiedObject.name-cardinality
        rdf:type        sh:PropertyShape;
        sh:description  "This constraint validates the cardinality of the property (attribute).";
        sh:group        ido:CardinalityIO;
        sh:message      "Missing required property (attribute).";
        sh:maxCount     1;
        sh:minCount     1;
        sh:name         "IdentifiedObject.name-cardinality";
        sh:order        0.1;
        sh:path         cim:IdentifiedObject.name;
        sh:severity     sh:Violation .

I think it would be better to allow multiple values but impose a sh:uniqueLang constraint (skos:prefLabel has the same restriction). In that way CIM data could accommodate multilinguality. Eg looking at some random properties:

Unfortunately, cim:String is used even for props that should not allow langString, i.e. no distinction is made between these two cases:

So for the time being I think CIM implicitly forbids the use of langString: if you cannot have multiple uniqueLang values, there's not much use for lang tags. Also, allowing lang tags may cause some disturbance in some receiving system.

So I'll map cim:String to xsd:string

rdf:PlainLiteral

The EU eProcurement Ontology allows multilingual data, and used rdfs:Literal. But that datatype is way too broad, so I raised an issue: https://github.com/OP-TED/ted-rdf-mapping/issues/407

The datatype hierarchy is like this: rdfs:Literal > rdf:PlainLiteral > (xsd:string, rdf:langString). What a text field needs to be mapped to depends on its nature:

If you want cim:String to allow langStrings, then we should map it to rdf:PlainLiteral.

VladimirAlexiev commented 2 months ago

hi @aries2004-bit is this a honest mistake, or are you some bot leading us to some malware?