nickdrummond / star-wars-ontology

An OWL ontology describing events, characters and places in the Star Wars Universe
https://nickdrummond.github.io/star-wars-ontology/
3 stars 1 forks source link

Separation of A-Box and T-Box #41

Open nickdrummond opened 1 year ago

nickdrummond commented 1 year ago

Much of the modelling of events introduces significant numbers of types to individuals. In many cases, these could be represented either by anonymous individuals or just named individuals.

Would this substantially improve the ontology - giving us a clean separation of instance level data? Would it massively improve classification times? What would be the impact on modelling and navigation?

This would have to be implemented using a transform - the ontology is now far too large to do manually. What do we do about naturally occurring sets - eg Killing and (of some (hadRole some StormTrooper)) - do we essentially instantiate every trooper that is killed?

nickdrummond commented 1 year ago

Nested anonymous nodes not supported by Protege:

###  https://nickdrummond.github.io/star-wars-ontology/ontologies#Confrontation_on_Florrum
:Confrontation_on_Florrum rdf:type owl:NamedIndividual ,
                                   :Mission ;
                          :after :Aurra_and_the_pirates ,
                                 :Tracking_down_Aurra_Singh ;
                          :during :Clone_Wars ;
                          :locatedIn :Florrum ;
                          :witnessedBy :Hondo_Ohnaka ;
                          :year -21 ;
                          :included [ :rdf:type :Capture ;
                                      :of :Boba_Fett ,
                                      :Bossk
                                    ] ;
                          rdfs:seeAlso "https://starwars.fandom.com/wiki/Lethal_Trackdown"^^xsd:anyURI .

Creates a _genid instance that cannot be inspected or navigated to in Protege.

Converting sub-events to named individuals is going to need a LOT of names. To be tidy, we should use "during" instead of "included" - this makes for a tidier hierarchy. They're names will only show up in the usage of an event so no holistic view of what happened during an event without walking the tree. Can maybe prefix with underscore or something to denote "minor". Also don't want to keep repeating year/location etc. At least it would be easy to "upgrade" sub-events that get more complicated.

###  https://nickdrummond.github.io/star-wars-ontology/ontologies#Confrontation_on_Florrum
:Confrontation_on_Florrum rdf:type owl:NamedIndividual ,
                                   :Mission ,
                                   [ rdf:type owl:Restriction ;
                                     owl:onProperty :included ;
                                     owl:someValuesFrom [ owl:intersectionOf ( :Capture
                                                                               [ rdf:type owl:Restriction ;
                                                                                 owl:onProperty :of ;
                                                                                 owl:hasValue :Boba_Fett
                                                                               ]
                                                                               [ rdf:type owl:Restriction ;
                                                                                 owl:onProperty :of ;
                                                                                 owl:hasValue :Bossk
                                                                               ]
                                                                             ) ;
                                                          rdf:type owl:Class
                                                        ]
                                   ] ;
                          :after :Aurra_and_the_pirates ,
                                 :Tracking_down_Aurra_Singh ;
                          :during :Clone_Wars ;
                          :locatedIn :Florrum ;
                          :witnessedBy :Hondo_Ohnaka ;
                          :year -21 ;
                          rdfs:seeAlso "https://starwars.fandom.com/wiki/Lethal_Trackdown"^^xsd:anyURI .

becomes:

###  https://nickdrummond.github.io/star-wars-ontology/ontologies#Confrontation_on_Florrum
:Confrontation_on_Florrum rdf:type owl:NamedIndividual ,
                                   :Mission ;
                          :after :Aurra_and_the_pirates ,
                                 :Tracking_down_Aurra_Singh ;
                          :during :Clone_Wars ;
                          :locatedIn :Florrum ;
                          :witnessedBy :Hondo_Ohnaka ;
                          :year -21 ;
                          rdfs:seeAlso "https://starwars.fandom.com/wiki/Lethal_Trackdown"^^xsd:anyURI .

###  https://nickdrummond.github.io/star-wars-ontology/ontologies#_cap_bobba_bossk
:_cap_bobba_bossk rdf:type owl:NamedIndividual ,
                           :Capture ;
                  :during :Confrontation_on_Florrum ;
                  :of :Boba_Fett ,
                      :Bossk .
nickdrummond commented 1 year ago

Created ABoxRefactor.

Has a significant impact on classification times - almost half!! Ontologies processed in 7276 ms by Pellet

Pretty horrible navigating around in Protege as we cannot see the structure of an event in one place anymore - especially with nesting.

zillo_beast_abox

Would also be significantly higher overhead for developing.

Worth saying this is not pure split as there are still plenty of class expressions in the event types (eg witnessedBy some Probe_Droid)

It could be used as a publishing step, but tools additional tool support required.

It also slightly restricts our modelling

Cliegg_Lars Unexpected some: injuredIn some 
    (Attack
     and (included some 
        (Capture
         and (of value Shmi_Skywalker)))
     and (participant some Tusken)
     and (locatedIn value Lars_Homestead))
Failed to transform: Cliegg_Lars Type injuredIn some 
(Attack and (included some 
(Capture and (of value Shmi_Skywalker))) and (participant some Tusken) and (locatedIn value Lars_Homestead))
Cliegg_Lars Unexpected some: participatedIn some (included some 
    (Rescue
     and (of value Shmi_Skywalker)))
Failed to transform: Cliegg_Lars Type participatedIn some (included some 
(Rescue and (of value Shmi_Skywalker)))
Recon_of_Concord_Dawn Unexpected some: after some 
    (Attack
     and (included some 
        (Killing
         and (of value Mandalorian_Protectors)))
     and (destructionOf value Protectors_Camp))
Failed to transform: Recon_of_Concord_Dawn Type after some 
(Attack and (included some 
(Killing and (of value Mandalorian_Protectors))) and (destructionOf value Protectors_Camp))
Axiom not visited: InverseObjectProperties(<https://nickdrummond.github.io/star-wars-ontology/ontologies#during> <https://nickdrummond.github.io/star-wars-ontology/ontologies#included>)
Failed to transform: during InverseOf included
Axiom not visited: Declaration(ObjectProperty(<https://nickdrummond.github.io/star-wars-ontology/ontologies#included>))
Failed to transform: ObjectProperty: included
Axiom not visited: SubObjectPropertyOf(<https://nickdrummond.github.io/star-wars-ontology/ontologies#included> <https://nickdrummond.github.io/star-wars-ontology/ontologies#includedTransitively>)
Failed to transform: included SubPropertyOf: includedTransitively
Axiom not visited: SubClassOf(<https://nickdrummond.github.io/star-wars-ontology/ontologies#Event> ObjectHasSelf(<https://nickdrummond.github.io/star-wars-ontology/ontologies#included>))
Failed to transform: Event SubClassOf included Self 
Mission_to_Onderon Unexpected complement: not (included some Fight)
Failed to transform: Mission_to_Onderon Type not (included some Fight)
nickdrummond commented 1 year ago

Axioms 18469 -> 23,888 Logical axiom count 13,109 -> 17,172 Declaration axioms count 2943 -> 4,298 Individual count 1907 -> 3,262

Events 763 -> 2118

nickdrummond commented 1 year ago

Slightly more compact files too

clone-wars.owl.ttl 10,261 -> 8,111 lines rebels 11,131 -> 9,173