edmcouncil / ontology-publisher

The owl-builder "builds" publishable / deployable versions (and derived products) of a given set of ontologies (such as FIBO)
MIT License
7 stars 6 forks source link

Better Mapping of Object Properties from the Ontology to the Vocabulary #35

Closed ghost closed 3 years ago

ghost commented 3 years ago

There are approximately 1,000 object properties defined in the vocabulary namespace which are subproperties of skos:related and therefore have domains and ranges of skos:Concept. I believe this is not the desired instension of the mapping. I believe that they should be mapped to instances of skos:Concept and linked to the concepts that correspond to the classes which their defining object properties specify as domains and ranges. This linkage should be implemented by new FIBO-specific subproperties of skos:related with the connotation indicating the special nature of the concepts being mapped and the mapping itself.

mereolog commented 3 years ago

Can we discuss an example so that we can get the actual details of your proposal?

For instance, do you propose to specify the domain and the range of fibo-v-loan:administeredBy as shown below?

fibo-v-loan:administeredBy rdf:type owl:ObjectProperty ;
     [...]
     rdfs:domain [ rdf:type owl:Class ;
                   owl:oneOf ( fibo-v-loan:LoanRegulatoryRequirement
                             )
                 ] ;
     rdfs:range [ rdf:type owl:Class ;
                  owl:oneOf ( fibo-v-fbc:RegulatoryAgency
                            )
                ] ;
     [...].

In this context I am not sure what you meant by:

This linkage should be implemented by new FIBO-specific subproperties of skos:related with the connotation indicating the special nature of the concepts being mapped and the mapping itself.

ghost commented 3 years ago

<urn:x-fibo:skos:extensions#domain_association> rdf:type owl:AsymmetricProperty, owl:IrreflexiveProperty, owl:TransitiveProperty. <urn:x-fibo:skos:extensions#domain_association> rdfs:subPropertyOf skos:related. <urn:x-fibo:skos:extensions#range_association> rdf:type owl:AsymmetricProperty, owl:IrreflexiveProperty, owl:TransitiveProperty. <urn:x-fibo:skos:extensions#range_association> rdfs:subPropertyOf skos:related. fibo-v-loan:administeredBy rdf:type rdf:type skos:Concept ; <urn:x-fibo:skos:extensions#domain_association> fibo-v- fibo-v-loan:LoanRegulatoryRequirement ; <urn:x-fibo:skos:extensions#range_association> fibo-v-fbc:RegulatoryAgency.

mereolog commented 3 years ago

Ok, thanks.

I can see two issues with this solution:

  1. it introduces a (new ?) instance of puning, as fibo-v-loan:administeredBy will then be an individual and an object property, and puning is somewhat frowned upon in FIBO. (Perhaps you suggest that fibo-v-loan:administeredBy should not be declared as an object property, in which case the charge of puning will be dismissed.)
  2. the bog-standard plugin DL reasoners to Protege will refuse to check consistency - see an example of log below:
    ERROR  15:01:50  An error occurred during reasoning: Non-simple property 'range_association' or its inverse appears in asymmetric object property axiom..
    java.lang.IllegalArgumentException: Non-simple property 'range_association' or its inverse appears in asymmetric object property axiom.
    at org.semanticweb.HermiT.structural.ObjectPropertyInclusionManager.rewriteAxioms(ObjectPropertyInclusionManager.java:106) ~[na:na]
ghost commented 3 years ago
  1. I don't think the object properties in the ontology should be object properties in the vocabulary. They should only be instances of skos:Concept
  2. IMHO there's very little value in running DL reasoners against the vocabulary. A suite of SPARQL queries or SHACL shapes, as demonstrated by the TopQuadrant products would be preferable.
mereolog commented 3 years ago

As for 1, I have no particular view, so let's wait for the FIBO Founding Fathers (and Mother :)) to react. As for 2, I am happy to agree - just wanted to record the point.

ghost commented 3 years ago

Being the Homo Erectus in the lineage of the FIBO vocabulary, I have strongly held, if archaic views on it. Let me know if the college of cardinals require a PowerPoint deck expounding my views and I will gladly produce one :-)

rivettp commented 3 years ago

Good points, @kptyson, and I'm inclined to agree with you: especially that the FIBO properties make sense as skos:Concepts (maybe with a top level PropertyConcept); though @dallemang is best to respond since I've focused almost exclusively on the ontology and not the SKOS. I do know that its original purpose was for the benefit of those using tools that were unable to consume OWL, and I suspect those tools would not be able to consume the extension properties you propose. However I don't know whether we have people that are still consuming FIBO Vocabulary, with those same tools, and whether those tools still have the same limitations. Either way, we could usefully better document the rationale behind the FIBO Vocabulary; the fact that it's not vanilla use of SKOS, how it's expected to be used, and which tools it's intended to be used with, and which we know it will not work with... All we have right now at https://spec.edmcouncil.org/fibo/vocabulary " Properties in FIBO appear as properties in the FIBO vocabulary. Logical restrictions relating pairs of FIBO classes are rendered as simple relationships between corresponding concepts in FIBO Vocabulary."

ghost commented 3 years ago

My original proposal for the vocabulary was that it should serve as the place where the financial services community could enter concepts for which they only had connotations which would then serve as input to the burndown list for the ontologists who would create classes which denoted meaning more precisely. C’est la guerre. The following SPARQL updates, when applied to the NQUADS distribution of FIBO, create what I think is a better vocabulary structure given the current approach of deriving the vocabulary from the ontology.

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl# #

Drop the vocabulary graph

# DROP GRAPH vgraph:

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl# #

Create concept schemes and properties

# INSERT DATA { GRAPH vgraph: { conschns:ClassConcepts a skos:ConceptScheme ; rdfs:label "Classes Scheme" ; rdfs:comment "The concept scheme for concepts derived from ontology classes". conschns:PropertyConcepts a skos:ConceptScheme; rdfs:label "Property Scheme" ; rdfs:comment "The concept scheme for concepts derived from ontology properties". conp:rangeRelated a owl:ObjectProperty ; rdfs:subPropertyOf skos:related; rdfs:label "Range relationship" ; rdfs:comment "Denotes an rdfs:range relationship between concepts" . conp:domainRelated a owl:ObjectProperty ; rdfs:subPropertyOf skos:related; rdfs:label "Domain relationship" ; rdfs:comment "Denotes an rdfs:domain relationship between concepts" . } }

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl#

#

Create concepts from classes

# INSERT { GRAPH vgraph: { ?iri a skos:Concept ; skos:prefLabel ?plbl ; skos:definition ?def ; skos:inScheme conschns:ClassConcepts } } WHERE { GRAPH ?g { filter(?g != vgraph:) ?iri a owl:Class ; rdfs:label ?plbl ; OPTIONAL { ?iri skos:definition ?def } FILTER (isIRI(?iri)) } }

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl# #

Create concepts from properties

# INSERT { GRAPH vgraph: { ?iri a skos:Concept ; skos:prefLabel ?plbl ; skos:definition ?def ; conp:rangeRelated ?range ; conp:domainRelated ?domain ; skos:inScheme conschns:PropertyConcepts } } WHERE { GRAPH ?g { filter(?g != vgraph:) ?iri a owl:ObjectProperty ; rdfs:label ?plbl ; rdfs:range ?range ; rdfs:domain ?domain . OPTIONAL { ?iri skos:definition ?def } FILTER (isIRI(?iri)) } }

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl# #

Create hierarchies

# INSERT { GRAPH vgraph: { ?child_iri skos:broaderTransitive ?parent_iri . } } WHERE { GRAPH ?g { filter (?g != vgraph:) ?child_iri rdfs:subClassOf ?parent_iri FILTER (isIRI(?child_iri)) FILTER (isIRI(?parent_iri)) } }

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl#

#

Create hierarchies for property concepts

# INSERT { GRAPH vgraph: { ?child_iri skos:broaderTransitive ?parent_iri . } } WHERE { GRAPH ?g { filter (?g != vgraph:) ?child_iri rdfs:subPropertyOf ?parent_iri FILTER (isIRI(?child_iri)) FILTER (isIRI(?parent_iri)) } }

PREFIX skos: http://www.w3.org/2004/02/skos/core# PREFIX vgraph: <urn:x-fibo:skos:graph#> PREFIX conschns: <urn:x-fibo:skos:graph:concept:scheme#> PREFIX conns: <urn:x-fibo:skos:graph:concept#> PREFIX conp: <urn:x-fibo:skos:graph:properties#> PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema# PREFIX owl: http://www.w3.org/2002/07/owl# #

Create top concepts in each concept scheme

# INSERT { GRAPH vgraph: { ?ciri skos:topConceptOf ?csiri }} WHERE { GRAPH vgraph: { { ?ciri skos:inScheme ?csiri FILTER NOT EXISTS { ?ciri skos:inScheme ?csiri ; skos:broaderTransitive ?broader } } } }

rivettp commented 3 years ago

Maybe @dallemang this should be a separate product from the current Vocabulary if we have consumers who are wedded to the current one despite the flaws you point out @kptyson ? Though EDMC has dropped several products without seeming to worry about it. @trypuz do we know how many downloads we have of the current? Not sure what we should call a new one - the current "Vocabulary" name always seemed pretty odd to me, especially alongside the Glossary (terms and text definitions in spreadsheet format) we had.

trypuz commented 3 years ago

Hi Pete (@rivettp), we had over 250 downloads of FIBO-V this year. I know that BlackSwan Technologies and Solidatus take advantage of FIBO-V as-it-is now. @kptyson, I suggest we do not change radically how FIBO-V is framed

ghost commented 3 years ago

I understand completely. If the ontology is available as open source then I'd like to publish a project on github that produces and alternate vocabulary from it.

trypuz commented 3 years ago

@kptyson, thank you! We can have a new FIBO-V product following your guideline (we can even add its automatic building to the pipeline). In fact, @mereolog has already implemented your code. If you do not mind, I'll ask @mereolog to contact you to agree on the details. Then @przemekgradzki will update the ontology-publisher.

mereolog commented 3 years ago

@kptyson following (roughly) your queries I created this version of FIBO-V. Would you mind reviewing it? fibo-vD.zip

rivettp commented 3 years ago

Where do we stand with this? I have a contact who's interested.

mereolog commented 3 years ago

I am going to implement my initial proposal, which is rather close to @kptyson suggestion. I will try to do this before next release.

rivettp commented 3 years ago

One thing not included in @kptyson proposal is the use of skos:broader for subPropertyOf relationships in the original OWL.

BTW @mereolog I tried loading your file into VocBench and it worked, but ended up with 1500 top concepts in the hierarchy because of not making use of subPropertyOf.

rivettp commented 3 years ago

Also better to use skos:prefLabel rather than rdfs:label

mereolog commented 3 years ago

@rivettp we now have a new drop, which is close(r) to @kptyson's idea. Also we use skos:broader instead of owl:subPropertyOf and skos:prefLabel instead of rdfs:label. See: fibo-vD.zip