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

captureOf vs Capture #15

Closed nickdrummond closed 2 years ago

nickdrummond commented 2 years ago

What distinguishes the participation properties from the Event type? eg captureOf/Capture and escapeOf/Escape

If we can untangle the use of 'of' as being the main subject in an Event then we can remove these unnecessary properties?

nickdrummond commented 2 years ago

Can 'of' simply be a subproperty of participant? If it is only used as the subject of an Event then yes..

Counter examples:

It would also need an inverse?

nickdrummond commented 2 years ago

This still leaves multiple ways to model the murder - using 'of' or 'killingOf' If we have a mix then it complicates querying. Murder of A does not imply killingOf A

We might have Killing event but that's going to introduce a lot more class assertions: eventA killingOf ind becomes eventA -> includes some (Killing and (of value ind))

nickdrummond commented 2 years ago

And potentially adding a lot of nesting

included some 
    (Fight and (killingOf value Proach) and (participant value Garazeb_Orrelios) and (stunningOf value Kanan_Jarrus))

We've so far avoided nesting included

nickdrummond commented 2 years ago

This treatment of of works for the following Events which all have a primary subject:

nickdrummond commented 2 years ago

That's quite a lot of refactoring!

nickdrummond commented 2 years ago

Going to need some transformation code

nickdrummond commented 2 years ago

So, what are the transforms?

1) Property assertion:

    eventA killingOf personB
    eventA -> included some (Killing and (of value personB))

2) Class assertion:

    eventA -> killingOf some Droid
    eventA -> included some (Killing and (of some Droid))

3) Subevent - "merge" the types of the subevent - a fight and a killing?

    eventA -> included some (Fight and (killingOf value personB))
    eventA -> included some (Fight and (Killing and (of value personB)))

or make the killing a sub event?

    eventA -> included some (Fight and (included some (Killing and (of value personB))))

4) Subevent generic killing of some folk - same as 3)

    eventA -> included some (Fight and (killingOf some (hadRole some RoleC))
    eventA -> included some (Fight and (Killing and (of some (hadRole some RoleC)))
nickdrummond commented 2 years ago

Written a reifier to transform based on these rules. Applied to the ontologies. Made Killing an Event and Murder is a subclass.

Classification times are not ~8s Ontologies processed in 8072 ms by Pellet

Before this refactor: Ontologies processed in 7474 ms by Pellet

nickdrummond commented 2 years ago

Reifying Death(of) adds even more time to classification. Ontologies processed in 9097 ms by Pellet

nickdrummond commented 2 years ago

Replaced all diedInYear with events

nickdrummond commented 2 years ago

Just need to update the docs/examples/sparql

nickdrummond commented 2 years ago

"Attack of" doesn't scan so leaving for now.