For storytelling purposes, I am developing an application that allows a user to navigate between a collection of narrative events. Each event has an accompanying 3D environment with participants and items that can be interacted with. Interactions include displaying more information about the selected object, superimposing the selected object over the user’s view of the real world (that is, Augmented Reality or AR), or visually outlining all of the objects in a 3D environment that have been tagged with a specific tag.

The semantic model that I have developed for this purpose is loosly based on something that journalists will be very familiar with: the Five Ws. What that means is that the semantic model describes what is happening, when and where the event is taking place, who the event’s participants are and why the event is taking place (which, in turn, is basically a collection of prior events).

class Event(Entity):
    def __init__(
        self,
        identifier: str,
        action_property: str,
        rank: int = 0,
        name: str = "Undefined",
    ):
        super().__init__(identifier, instance_of="event", name=name)

        self.rank = rank

        # What?
        self.action_property = action_property
        self.events: Dict[str, Event] = {}

        # Who?
        self.participants: Dict[str, Participant] = {}
        self.things: Dict[str, Thing] = {}

        # When?
        self.when: TimeInterval = None

        # Where?
        self.where: Place = None

        # Why?
        self.why: Dict[str, Event] = {}

Events are recursive meaning that they can be described in terms of other events (that is, sub-events) making it possible to represent events in a very fine-grained manner. What’s more, sub-events are to events, what events are to a narrative; they keep moving the narrative forward, each at their own level.

In addition, two types of connection between events are currently supported: the events-centric temporal connection and the spatial connection. The temporal connection establishes a cause-effect relationship between events while the spatial connection is used to establish a more physical from-to relationship.

The events-centric model described above is modelled on top of the topic maps model that TopicDB provides. This approach of using the topic maps model to model another model (that is, meta-modelling) exemplifies the expressive power and flexibility of topic maps. If you want to get a better understanding of this approach, I recommend taking a look at StoryDB, the library that underlies this project.

StoryDB is still a bit rough around the edges, so expect it to be refined as I make progress in this project. Nonetheless, its current state is sufficient for the application that I mentioned at the beginning of this post. I will make the application available within the next couple of weeks so that those that are interested can play around with it.