Open rjyounes opened 2 years ago
That makes sense, and I have run into this problem before. So, two possible approaches -
select ?class ?parent where {
?class (owl:equivalentClass|rdfs:subClassOf)/(owl:unionOf|owl:intersectionOf)/rdf:rest*/rdf:first ?parent .
?parent a owl:Class
filter (!isblank(?class) && !isblank(?parent))
}
.ttl
.I think we'd want to exclude subclasses that are already explicitly asserted in the ontology. Not that the redundancy does any harm, but it seems sloppy. In that case option 1 would be simpler - we could just remove the rdfs:subClassOf
disjunct. On the other hand, 2 is more general and will catch everything, even if it doesn't follow the gist pattern. Maybe we just live with the redundancies.
@justin2004 Thoughts?
@dylan-sa Has written a script to generate the subclass assertions for gist. The idea here is to build it in as an onto_tool
action.
@dylan-sa Has written a script to generate the subclass assertions for gist. The idea here is to build it in as an
onto_tool
action.
That's a pretty cool script, but seems a little too specific for a general utility like onto-tool
. How about the following solution:
reason
bundle command that would take some input(s) and run the reasoner, storing the output as specifiedsparql
bundle command to CONSTRUCT
the ontology, grabbing the subClassOf
triples only and adding the ontology definition.That sounds great.
Once this has done, we should revisit https://github.com/semanticarts/gist/issues/838.
See gist issue #714 for discussion.
The idea is that many tools support
subClassOf
assertions that are not able to infer the relationship. We would like to be able to generate these and store them in a separate file for use as desired.