Abstract
This paper presents an ontological approach to the domain of drama. After a description of the drama domain in a cross-cultural and media setting, we introduce the ontology Drammar. Drammar consists of two components, encoding respectively the conceptual model and the SWRL rules. The conceptual model, mainly grounding in AI theories, represents the major concepts of drama, such as agents, actions, plans, units, emotions and values. Then, the paper focuses on the rule component that augments the representation by mapping the intentions of the characters onto the actions actually performed and by appraising the emotion felt by the characters in the drama. To illustrate the functioning of the ontology we introduce a running example from an excerpt of the drama
Introduction
The exponential spread of drama (and dramatic stories) in contemporary culture has led Esslin [35] to forge the definition of “dramatic media”, i.e. media that display characters performing live actions, such as theatre, cinema and videogames. The notion of drama, traditionally acknowledged by studies in all disciplinary fields, ranging from literary criticism [46] and semiotics [84], to aesthetics [15] and psychology [12], has been boosted, over the last decade, by the advent of digitalization and new media, with dramatic media objects shared by the users of social networks. Drama permeates fan-fiction, amateur and traditional audiovisual production, docu-fiction, digitalized contents, etc., thus setting the need for indexing and search tools especially geared to dramatic contents. In addition, new forms of drama have leveraged a number of AI techniques, with the devise of machine readable representations of drama and the automation of a number of dramatic functions [70,82,88,100]. Finally, the quest for the massive access to digital (dramatic) media has spawned the issue of the metadata annotation, which is necessary for the indexing, retrieval, and presentation of media items, with the appearance of models and applications in both the research and production communities [34,61,64].
Such scenarios advocate a carefully designed and theoretically sound model of drama, valid across different genres and media types. This paper addresses the application of ontological representation and reasoning to formalize the dramatic qualities of media objects. We describe a formal ontology of the drama domain, called Drammar, and its integration with a rule components (based on DL-safe SRWL rules), that augments the representation encoded in the ontology with further information obtained through automatic reasoning. In this paper, we describe this approach by resorting to the conceptual framework of drama annotation: after a semiautomatic annotation of some dramatic qualities (through a web–based platform for the annotation of dramatic media [64]), the rule component augments the obtained representation by inferring further dramatic qualities through reasoning.
In particular, the rule component addresses two specific tasks related with the description of drama, i.e., the mapping of the plot incidents onto the characters’ intentions, and the assignment of emotional states to the characters. Both tasks, relevant for drama indexing, manipulation and presentation, rely on the drama model encoded in the ontology. These tasks were selected with the research goal of assessing the use of the ontology as the pivot of a modular framework where different rule sets are employed on annotated dramatic works to augment their representation. These tasks correspond to two cognitive processes, intention recognition and emotion appraisal respectively, that are intrinsic to drama fruition and criticism, and can be easily operationalized through rules. The rule component yields a new set of relations over the elements of the conceptual model of drama (consisting of agents, actions, plans, units, etc., see Section 2) that are added to the representation, alleviating the annotation process and providing an explicit and verifiable encoding of the cognitive processes.
As a running example, we employ a paradigmatic and well known drama scene, the so called “nunnery scene” of Shakespeare’s
The structure of the paper is the following: Sections 2 and 3 survey the major facts about the domain of drama and the related work in drama formalization, respectively. Section 4 describes the ontology, with a thorough account of how its commitments are rooted in the literature on drama described in Section 2. Section 5 describes the rule component, with Sections 5.1 and 5.2 devoted, respectively, to its two modules. The evaluation (Section 6) and Conclusions conclude the paper.
The domain of drama
Drama has been largely discussed as cultural object in its historical and stylistic development [14]. Here we discuss drama from the technical point of view; in other words, we pay attention to the craftsmanship behind the standard production of drama rather than the excellence of a specific author. Referring to drama as a standard, means we do not address the body of works of a specific author, or a definite set of manuscripts. We address that abstract construct that western culture recognizes as drama behind various manifestations. Because in order to describe any object one must first define the dimensions and features that define that object, in this section we describe the elements we take in account to measure the quantity of drama, or in other words, how much drama there is in a story.
Standard drama can be summarized as a group of specific features, that can be defined more or less precisely. These features refer to the identifiable elements in Shakespeare’s
Within this wide range, the fruition of drama mostly focuses on
To distill what we have briefly named the standard drama we do not face the immense task of analyzing one by one the numbers of plays dispersed along centuries. We can count on a vast literature on drama techniques in which it is possible to find ready made semi-formal descriptions. In this literature we find a consumptive characterization about the form of drama. Drama scholars have developed a number of approaches to dramatic texts and theatrical plays [14]. The “technical point of view” relies on the so–called constructivist approach, which departs from the linguistic and literary forms to focus on the constitutive elements of drama. So, to explore the common story–based features that reconcile
Within this framework, in particular, the analyses of Lavandier [60], Ryngaert [91], Hatcher [52], and Spencer [96] contribute by distilling the dramatic elements that the author has to handle in order to produce a well formed play.
The Greek origin of the word
In this section, and all along the article, we use a running example taken for Shakespeare’s
Action
From Aristotle to Szondi, it is clear that drama is a specific manner of organizing actions that exhibit some qualities.
Agent
Action involves at least one agent and must be the outcome of a deliberative process [2, p. xxiv]. In order to be effective, the agent must have goals, deliberations and emotional states [93]. Modern drama has overcome the notion of the character as a whole nucleus (e.g., the romantic hero), and has developed the idea of a character consisting of the sum of its actions [91]. Therefore, the agent is a willing dynamic entity that constantly appraises the state of its world by means of rational deliberation and emotional charge. For example, the “nunnery” scene is carried out by two agents who interact according their own beliefs and feelings.
Conflict
Not all the actions carried on by an agent are dramatic. This quality spreads from a tension or an opposition between two or more agents and/or the environment. The notion of conflict is ubiquitous in drama critics.
Leaving aside the opposition between the tragic hero and the fate in classical Greek plays, we can easily trace it back to 1758 with the seminal work of Diderot, who foresees a conflict based on the opposition between the character and the social environment [28]. Years later, Lessing also wrote about an opposition driven by character’s different moral values, therefore motivated by the inner feelings [62]. The conflict is at the core of the drama for Hegel’s drama is not a mere representation of an enterprise which peacefully runs its course. It has interest only from the animated strife between its personages and their struggle and perils. It gives us the final result of these conflicts [54, p. 287].
Units
The wholeness of drama springs from its parts. The elements listed above (Action, Agents, Conflicts) must be coordinated within a container that allows them to interact one another. Although it is usual to describe drama in terms of acts and scene (or sequence for the movie), from Freytag [43] onward it is clear that the subdivision of plot does not respond to practical reasons (such as characters’ entrances or exits) but to dramatic reason. In other words the actions must be grouped according to theirs goal, conflicts and solutions; and each group can be further grouped as well, leading to the macro segmentation in three or five acts [39,60]. These grouped actions are narrative blocks, or scenes, that may be seen as
In the “nunnery” scene, the changing goals of Hamlet, with the corresponding tension rising and the emotional charge is contained in one scene. Here the clash of the divergent plans and goals generate the characters’ emotions. Furthermore, the several actions in the timeline mark the succession of a number of units, and implement Hamlet’s appeal to Ophelia to go to a nunnery, testing of Ophelia honesty, his angriness about Ophelia corruption, leaving Ophelia to face her own destiny.
Structure
The agent’s actions in conflict must be organized to give a sense of causality and wholeness, i.e., in a plot. In other words, the single action is not only dramatic (as described by Polti’s situations), but must be part of a sequence of actions that are ordered. The order is driven by the raising tension and is normally described as an arc along the temporal line. Therefore the sequence must be constructed according to a well established pace that goes from the introduction, to rising, climax and return [43].
In the “nunnery” scene, Hamlet quietly starts by trying to convince Ophelia to go to a nunnery (to escape the corruption of Elsinor court), proceeds by rising his tension to test Ophelia about her honesty, reaches a tension top after realizing that even Ophelia is corrupted, and turns his attention away from his love for Ophelia to the revenge of his father’s death.
Emotion
Whatever point of view we adopt to define the units and their sequencing in the structure, it is clear that all is driven by conflict and the result has to lead to some emotional charge. Therefore the units can be described also as
In the “nunnery” scene, Hamlet, as a consequence of his and Ophelia’s actions, feels Distress, for discovering that his belief that Ophelia is honest is false, and Anger, after Ophelia’s lie about her father.
This set of elements are necessary to describe the drama, though not sufficient to address any dramatic situation. Nevertheless, the model we present here is devised so to be extended by including other features addressing, for example, narratological or performative qualities.
Related work
The field of drama is relevant to several research lines, ranging from cultural heritage dissemination to the indexing and search of media repositories. Here we widen our perspective to include story ontologies, that also address the narrative models that are not strictly dramatic. We are particularly oriented to the applicative paradigms of the mediation between audience and cultural objects, aimed at stimulating the access to heritage items, and the metadata annotation of media repositories, aimed at the indexing and search of media items.
Story ontologies have been proposed with two main goals, namely the purpose of classifying story types and the purpose of providing an underlying model for narrative annotation [18,47,48,58]. A well known example of the first type of systems is the work in [48]. In this work, inspired by the work of Propp [84], an ontology of fairy tales, encoded in OWL, is exploited to model different plot types. The system uses the ontology to perform case-based reasoning: given a story plan, the system searches the ontology for a similar plot, measuring the semantic similarity of the given plot with the plots encoded in the ontology. A natural language module, then, generates a textual version of the obtained plot, adapted to the input parameters (characters, situations, etc.) provided by the user. In the same line, the work in [51] uses automatic classification techniques to classify plot types; the Opiate system [36] relies on a Proppian model of story to create and populate story worlds. A formalization of Propp’s model is described by [47]: in this work, a computational system exploits the formal model to generate new stories in the style of Russian fairy tales. Differently from previous attempts based on Propp’s theory, this proposal constitute a more rigorous description of the original model in computational terms. In recent years, the extension of Propp’s theory as a general story model has been questioned by several authors, especially in relation with the new media [19,47,101].
Overcoming the differences across media types and genres is one of the main challenges faced by the research on media annotation. In this field, story ontologies have been proposed as a way to provide a shared and inter-operable model for annotation scenarios which rely on the paradigm of crowd–sourcing and are characterized by the presence of different types of narrative contents. A media–independent model is provided by the OntoMedia ontology, exploited across different projects (such as the Contextus Project [58,61]), to annotate the narrative content of different media objects, ranging from written literature to comics and TV fiction. The OntoMedia ontology contains a very detailed model, tailored on story annotation, and mainly focused on the representation of events and the order in which they are exposed. In the ontology Stories2
The SUMO ontology, although not specifically tailored on story modelling, has been employed for the task of story annotation and story generation. In [21], the axiomatic definition of processes, in SUMO, is exploited to reason on stories and to generate plots. This approach, although not directly relevant for story models, reveals the relevance of an accurate representation of actions (processes, in SUMO terminology) for story description and annotation.
In the last decade, the use of ontologies (and story ontologies in particular) in online access to cultural heritage has been investigated by several projects. As reviewed by [29,55], computational ontologies are especially suitable to encode conceptual models for the access to digital archives, and to structure the interaction between the archive and the users.
A pioneering contribution in the use of ontologies for access to cultural heritage is given by the Culture Sampo project [57]. This project encompasses a set of domain ontologies, which provide the background against which cultural objects (artworks, artists, traditional practices, etc.) can be explored, tracking the underlying relations among them [56]. Concerning the story level, however, the system allows the exploration of the artifacts based on their connections with a reference story (the “Kalavala” Finnish saga), but the story representation is only functional to the access to cultural objects and is not intended as a standalone account of the story domain.
Narrative is the focus of the Bletchley Park Text system [75], a semantic system designed with the goal of supporting the users in the exploration of online museum collections. The system relies on an ontology of story, taken from the Story Fountain project [76]. Again, this system is strongly committed to the use of story to create narrative paths encompassing the museum objects, rather than representing the story elements in an all-purpose fashion.
In general, the exponential growth of digitized media has called the attention on the problem of providing contextualized information about the data. Although most research on metadata annotation is not targeted at story or dramatic elements, some drama-based approaches have emerged, possibly in conjuction with tools for annotation.
The amount of user–generated metadata concerning dramatic media witnesses the interest of the general audience (see, e.g., the tags that are freely inserted by users in public repositories). However, as reported in [63] for the YouTube clips extracted from a classic feature film, most of the tags concern the resource (Title, Actor, Director, Production, Editing, Publish, Genre) and only a few (Character, Object, Environment, Action) the content.
Based on the user–generated tags, in the specific domain of the performing arts (which are related to drama), the tool MyStoryPlayer is a purposely targeted interface for the semantic annotation of documents (such as video, audio, text, image, …, encoded in RDF format) and the navigation of the annotations creating its own non–linear experience or path [7].
Although all the ontologies and systems reviewed here provide a (partial) formal view of the drama phenomenon, none has developed a consistent and comprehensive metadata system, based on a shared set of constructs, that can appropriately reflect the vocabulary of dramatic elements. This paper aims at contributing to bridge this gap. We recognize that the set of elements we have identified for the formal representation of drama are not exhaustive of the variety of drama issues. However, we are confident that the evidence provided in Section 2 classify such elements as necessary and foundational for more extensive models of drama.
In the next sections we describe the Drammar ontology, with its conceptual model and the rule component.
The domain of drama, surveyed in Section 2, poses a set of requirements for the formal representation of dramatic qualities, ranging from the structural aspects of drama organization, necessary to account for the way the matter is structured in specific works, to the characterization of its main entities, such as characters and plot. Nevertheless, the literature never reaches a sufficient degree of formality such as to be straightforwardly expressed in a machine readable representation. So, in order to translate those requirements into the ontology, we resorted to a set of theories and models well established in AI. The ratio of this design strategy is twofold: on the one side, it augments the interoperability of the ontology with other systems and representations; on the other side, it allows relying on widespread, sound models, whose properties have been investigated to depth in the past. For example, the agent theory lends itself well to represent the notion of character: because the character is described as a deliberative and emotional agent in all the literature, we relied on a consolidated agent model to represent it, the BDI model [86], augmented with cognitive processes for emotion generation [78].
Finally, in order to ground the design on a definite task, the ontology was developed with the task of manual annotation of dramatic objects in mind. Annotation was selected as being fairly neutral with respect to the representational choices: tasks such as story generation or automatic detection of story units would have required the inclusion of specific heuristics and representational devices. Instead, we made an effort to select the constituents that are uncontroversial in drama, with a clear commitment to being as theory aspecific as possible. In the future, the ontology may be extended to represent the requirements of specific theories and tasks, without hopefully affecting the applicability of its core structures.
In the rest of this section, we first (Section 4.1) introduce the conceptual apparatus made available by AI to deal with the domain described in Section 2; then we describe the Drammar ontology (Section 4.2). By doing so, we provide a clear distinction between Drammar’s ontological commitment towards the notions surveyed in Section 2 and the modeling solutions it borrows from previous work in fields that are not inherently related with drama. Finally 4.3, we describe the annotation example.
Bridging dramatic qualities onto formal representation
As surveyed in Section 2, given Aristotle’s seminal definition of drama as “imitation of praxis” [3], we take (characters’) intentional actions as the building blocks of drama. Characters commit and execute actions intentionally, in order to achieve their individual goals, thus facing conflicts that develop into a well structured plot thanks to the author’s craftsmanship. A drama’s sense of wholeness stems from the orchestrated contributions of the single advancements brought about by its constituents, the drama units, where characters’ actions (and events) are encapsulated. Drama units, through the incidents they contain, affect the characters’ state, so that, by the end of the plot, the characters’ conflicting goals will be achieved or frustrated.
In order to represent the interplay of actions and intentions that underlies the account provided above, a model of agency is needed that ties intentions to actions into a unifying perspective. Inspired by Dennett’s “intentional stance” [25], the theory of bounded rationality [10,94], provides an account of how agents’ mental states determine their practical behavior.
A formal account of the theory of bounded rationality is provided by the BDI model [20]. According to the BDI model, an agent is a tripartite function of Beliefs, Desires (or Goals), and Intentions (or Plans of actions, see below), where beliefs are the knowledge of the agent (what she/he knows or believes to be true), goals are the objectives to be achieved through plans of actions, Following Feagin’s [37] intuition that the paradigm of BDI agents can be applied to drama characters, the representation of characters in Drammar relies on the BDI model, i.e., characters are represented as having goals and executing plans to achieve them. According to Feagin [37], Carrol’s notion of narrative closure [15] can be accounted for by the BDI model, since it describes the characters’ behavior as consequential to their goals and plans. As a consequence of the adoption of an actional perspective, the representation of plans is also relevant for Drammar. In Drammar, plans are represented according to a STRIPS-like format [40], i.e., a plan is formed by a sequence of actions and has precondition and effect states; moreover, in order to account for the different granularity of units in drama structure, a plan can encompass not only actions but also subplans, according to the well known paradigm of hierarchical planning [92]3
The resulting representation can also be expressed using standard languages for plan representation, e.g., PDDL [42].
Notwithstanding the explanatory power of the BDI model for characters’ behavior, this model does not account for characters’ emotions, that have been acknowledged to play an important role in drama. In drama, emotions are necessary to establish an emotional bond between the characters and the audience, thus promoting and guaranteeing the process of emotional participation. Based on previous work in characters emotions [33,66,67], we assume the well known “cognitive model of emotions” stated by [78], according to which characters’ emotions stem from their appraisal of plot incidents in terms of the consequences they have on their goals and beliefs, with a moral component to bridge the subjective judgment onto the culturally and socially determined moral values. In particular, Drammar includes the notion of “moral value” to represent the characters’ moral component, which enables the generation of moral emotions [5].
The theoretical framework introduced so far provides the primitives (goal, beliefs, intentions) that are necessary to represent the characters’ intentional behavior in drama. However, this apparatus must be integrated with representational devices that are suitable to describe how characters’ actions are eventually structured into a timeline. In Drammar, logical accounts of world dynamics, such as Situation Calculus [71], have inspired the representation of the timeline. Being a dynamic, temporal medium, drama unfolds through a sequence of states that occur as a consequence of the incidents contained in units, bringing about relevant changes in drama world, and in characters in particular; stated form the precondition and the effects of incidents. This representation requires that the ontology vocabulary acknowledges the distinction between states and processes, which realize the transitions. The representation of drama also requires to account for the relations of states and processes with non-temporal entities, such as agents and objects, i.e., to represent explicitly the role of characters and objects in states and processes (e.g., an object located in a given place, or a characters playing the role speaker in an asking action). In Drammar, the distinction between states and processes on the one side, and agents and objects on the other side, is inspired by the
In order to enrich the description of drama incidents and of the entities which participate in them, it is necessary to account for their qualities. For example, an action can be performed slowly, an object can be red, or steady, and so on. The solution adopted in Drammar for the representation of the qualities of entities and processes (including information about their type, such as an agent be a woman or a process being a murdering), is to include in the ontology some specific classes that interface drama entities with external knowledge. In particular, Drammar relies on two external large–scale semantic resources for the description of the commonsense knowledge, namely the Suggested Upper Merged Ontology (SUMO [79]) and Yet Another Great Ontology (YAGO [98]), merged into YAGO–SUMO [24], which provide very detailed information about millions of situations, including entities (agents and objects), processes/actions, and events. Terms in YAGO–SUMO are accessed through a lexical resource, the WordNet lexical data base [73], to increase the interoperability of the annotation data across languages.
In this section, we introduce the ontology Drammar, encoded in the OWL 2 RL language. The choice of a language is an important design issue since it impacts on modeling and querying the knowledge base with the tradeoff between expressivity and complexity. One of the mainstream languages for defining knowledge bases is OWL 2 (Web Ontology Language 2) described in [74]. Since OWL 2 is a World Wide Web Consortium (W3C) recommendation, it is supported by several available ontology-related tools (such as Protégé4
OWL 2EL, based on the EL++ description logics family, which simply supports existential quantification, allowing to perform basic reasoning in polynomial time with respect to the size of the ontology;
OWL 2 QL, based on the logic underpinning of DL-LiteR [13], usually employed in query–answering applications that use very large volumes of instance data (the expressive power of this profile is quite limited);
OWL 2 RL, based on a syntactic and semantic restriction of OWL 2, which provides an enhanced expressive power and efficient reasoning mechanisms, and allows for the implementation of additional reasoning mechanisms through the extension of rule-based engines.
As a matter of fact, the choice of the language OWL 2 RL, was driven by the need of building an expressive ontology-driven rule based system for computing emotional and motivational/intentional features of drama, respectively.
Drammar has been designed with the twofold goal of providing a formalized conceptual model of the dramatic elements described in Section 2, and an annotation schema for encoding the description of a dramatic item. So, along with classes that represent the domain of drama, it contains specific classes that are intended for interfacing the representation of drama with linguistic and common sense knowledge.
The representation of drama encoded in the ontology is basically structured into three layers, sketched in Fig. 1. The basic layer (Actional Layer) is given by the observable actions, grouped into units and organized into a timeline. The data contained in this layer are entirely annotated by hand, while the other two layers contain both manually encoded data and inferred relations among the data, and among the layers in particular. The middle layer (Motivational Layer) represents the agents’ plans and the goals to which they are related; plans are mapped onto the observed actions contained in the Actional Level through a mapping process encoded in a set of SWRL rules. The top layer (Dramatic Layer) represents the contents of scene, which basically consists of emotions, i.e., the dramatic qualities par excellence (see Section 2.1.6). Emotions are appraised from the representation of agent’s plans and goals, and of the conflicts that arise from them. The appraisal process is also encoded in a set of SWRL rules, which augment the scenes with the agents’ emotions. These layers are not formally represented in the ontology, which provides a description of dramatic qualities by abstracting from their source in the annotation process, i.e., if they are manually encoded or inferred through the use of the rules.

Layers of Drammar.
Figure 2 shows the main classes of Drammar: An available version of the ontology can be downloaded at

The main classes of the Drammar ontology.
The DramaEntity class is divided into three subclasses, each describing specific drama elements.
The
The

The basic pattern for drama annotation.
Both processes and states are divided according to a distinction between
The
The
The

The annotation of the example scene. Hamlet asks to Ophelia where her father is, and she answers with a lie.
Figure 3 describes the basic pattern for drama annotation in Drammar (some details are omitted for the sake of readability). A drama
Situated at a higher level than observable actions, which constitute the drama incidents, plans are tied to the unit content through states and endurants. An
We describe how drama can be represented in Drammar by illustrating the annotation of our running example, the “nunnery” scene from Shakespeare’s
The scene (Scene_WhereQuestion, see top of Fig. 4) encompasses the conflicting goals of

Description schema of the unit actions (
Figure 5 represents the description of the actions of asking and lying, executed, respectively, by Hamlet and Ophelia, trough the

The annotation of Hamlet’s belief that Polonious is hidden in the room (

The annotation of agents’ plans in the running example.
Figure 8 shows how the annotated unit (

Timeline of the “nunnery” scene.
The temporal development of the agents’ plans, instead, is represented separately and is potentially different from the unit ordering. Hamlet’s plan in the example unit is described in Fig. 7. As described in Section 4.2, plans are hierarchical objects, i.e. they contain not only actions but also simpler plans. Here, the multi–agent plan devised by Hamlet to learn about Ophelia’s honesty (
Finally, Fig. 9 exemplifies the annotation of characters’ emotions. In Drammar emotions belong to Dramatic layer and are cognitive states generated by the appraisal of situations and are included in scenes. In the figure, Hamlet feels Reproach towards Ophelia. Hamlet’s emotional state is represented by an individual of type
The rules account for the mapping and emotion appraisal operations, respectively (see the curved dotted arcs in Fig. 1), augmenting the properties by connecting the individuals of plan and unit, in the case of mapping, and the individuals of scene, plan and emotion, in the case of the appraisal. Properties that are defined over classes are instantiated on individuals.

Hamlet’s emotion of Reproach towards Ophelia in the example unit.
The rule component overcomes some expressive limitations of the ontological language OWL 2 RL and produces some novel interesting knowledge. The combination of ontological representations, expressed in some standard ontological language, with some ontology-compliant rule languages is not new (see, e.g., [1]). In the literature, different integration strategies between the rule and the ontological components have been proposed and several types of rule languages have been developed [31], such as Datalog and languages from the Answer Set tradition in logic programming. This solution allows to reason in a closed world assumption environment (differently from the ontological reasoning) and its non monotonic extensions allow to go beyond the classical ontological reasoning, which is focused on deduction. Another solution is the one pointed out by [50], working on the convergence of logic-programming and description-logic, which they call DLP (Description Logic Programs). However, such an approach has the limit of leaving both the rule and ontology language with very restrictive expressivity. For such reason, different extensions in the direction of logic programming and ASP on top of the DLP fragment have been proposed. This trend led to the realization of the Web Rule Language (WRL), a W3C proposal that, however, has not received much attention in both the academic and professional communities.

The representation of the values of Hamlet and Ophelia in the example unit. An agent has subjective values (
SWRL (Semantic Web Rule Language) is the language born form the fusion of Rule ML and OWL DL. It integrates OWL with a rule layer built on top of it, adding the possibility to declare arbitrary Horn clauses expressed as IF THEN rules. A SWRL based system is therefore composed of ordinary OWL axioms plus SWRL rules. The antecedents and consequents of the rules consist of lists of atoms, which may be OWL class expressions, property definitions, or built-ins. Most of the current available DL reasoners, such as Pellet or Hermit support inferences based on SWRL.
Concerning the integration strategies, there are two main approaches known in literature, both strongly related to the languages used in real applications. The “homogeneous approach” assumes a tight semantic integration between ontologies and rules through a common underlying semantics and there is no distinction between rule predicates and ontology predicates. In such approach the rules extend ontological axioms to include arbitrary Horn-like clauses. This is the case, for example, of the above mentioned SWRL.
The second approach is based on the assumption of a strict semantic separation between the ontology and rule components, respectively. The ontology is used as a conceptualization of the domain and the rules are used to build some application-specific relations. The communication between the two components is obtained via some interface ([31]). A classical example of such approach regards the use of Answer Set Programming [32], where ontologies are dealt with as an external source of information with a semantics treated separately. Nonmonotonic reasoning and rules are allowed in a decidable setting, as well as arbitrary mixing of closed and open world reasoning.
In our system, we adopted the homogeneous approach using an additional component consisting of a set of SWRL rules. This choice was driven by many factors. First of all, SWRL plugins are available in well known software packages for ontology editing, such as Protégé. This allows, from a practical perspective, to directly use a unique package for the design and development of both the knowledge base and the rules. Then, we found easier to ground both the ontological and the rule components on a common underlying semantics and under a common reasoning assumption (namely the Open World Assumption). On the other hand, the use of ASP or Datalog, despite their powerfulness and the possibility of using available non monotonic extensions, was beyond our application scope (extending with reasoning capabilities the conceptual knowledge expressed in the ontology). In order to enhance the system with the support of such simple additional mechanisms, we used SWRL in their DL-safe modality. This saves from undecidability and revealed to be enough for the current development of the system. Thus, we posed the restriction that individual variables in a rule must only bind to individuals named explicitly in the underlying ontology. In such a way, it was also possible to test directly the use of standard DL reasoners. In the following sections, we report the application of the SWRL rules for establishing a mapping between plans and units that reveals intentionality of actions, and the computation of the emotional states of the characters in the drama (see the overview in Fig. 1).

The main mapping rule, that accounts for the spanning relation between plans and units. Another rule accounts for the spanning of hierarchically higher plans with a number of units.
The mapping rules were devised with the aim of allowing a support for drama scholars based on the explicitation of character’s intentions connected to the unit (a visualization interface provide immediate access to such information, see [64,65]). The reasoning that we want to achieve by using this set of rules is that one of obtaining a recognition of equality between the actions (incidents) occurring in the unit, and the action in plans, according to some shared properties such as the fact that such actions are represented by the same Schema with the same Roles and Fillers. The result of the application of such rules is that the Timeline is augmented by interspersing units with precondition and effect states (called UnitStates).
In detail, the mapping works as follows:
match plan actions and unit incidents through the equality of the description schema in the antecedent of the rule; in the antecedent the rule also identifies the individuals to be connected in the consequent; project the states required by the plan as preconditions or effects (the plan states) onto the unit preconditions and effects (the unit states).
The SWRL rule is the following (syntax slightly adapted for readability issues, match the items of the description in Fig. 11):
contained in a
through the
each
each
The ontology is initialized with the Timeline that includes empty unit states that precede and follow the units. Then, each application of the rule fills the unit states with states contained in the plans.
In the excerpt of the “nunnery” scene, we have Hamlet’s plan
Emotion and SWRL rules
In order to automatize the annotation of characters’ emotions, we resort to a well known model of emotions issued by cognitive studies [78], that has been successfully applied to computational models of characters [23,26,80], and on the computational model presented in [6], that show an independent approach to generate emotions into a BDI agent extended with the notion of moral values.
Computational models of emotions rely on cognitive theories of emotions, which explain emotional states in terms of mental states (beliefs, goals, etc.), thus sharing the same mentalistic assumption that characterizes intelligent agents. The same holds for Drammar: as described in Section 4 characters are represented as augmented BDI agents, i.e. characterized by belief, goals, intentions and values.
Appraisal theories assert that emotional states arise from the “appraisal” of the situations in which the person who experiences the emotion is involved. In the OCC appraisal theory [78] emotions types are defined based on their causes, i.e., similar emotional states share similar causes. For example, the emotion type Distress describes all the emotions caused by a displeasing event, such as sadness, distress, frustration, etc. OCC appraisal theory arranges emotion types onto a hierarchical organization, which is based on the type of appraisal that motivates a particular emotion type; the three main categories are:
Last, from the combination of Well-being emotions and Attribution emotions, the

A component model view of computational appraisal models from [68].
Relying on the computational model presented in [6], that presents an explicit link between moral values and moral emotions6
Other approaches model moral emotions in a strictly domain dependent manner [26,33,45,67,87].
As in most computational models, we encode emotions types (e.g., Distress) as individuals, that encode all the family emotions (under the Distress type) defined in the OCC theory. So, the set of SWRL rules infers emotion types for characters involved in a scene.
Following [68], the SWRL rule antecedent encodes the Appraisal Derivation model, while the SWRL rule consequent asserts the emotion type felt by the appraising agent, encoding the Affect Derivation Model (see Fig. 12). The
In Fig. 13, we illustrate the SWRL rules concerning emotion appraisal with a tree representation: starting from the root, each path in the tree that arrives at some boxed term represents a SWRL rule. Note that each branch is not exclusive, rules can fire in parallel: according to the OCC theory, different emotions can be felt at the same time, without exceptions. This means, that a character can possibly feel, for example,

OCC SWRL rules encoded in the Drammar ontology.
The root node sets the
The appraisal variable
The SWRL rules for Joy and Distress do not consider if the agent intends a plan to achieve a goal and the appraisal variables
a
an
a
the
the
the
the appraising agent

The SWRL rule for Distress. The solid straight lines are properties tested in the rule antecedent; the dotted curved lines are properties asserted in rule consequent.
Note also that, the appraisal of Joy emotion is contained in the appraisal of the Satisfaction emotion, because the confirmation of a desirable event is itself a desirable event; conversely, the confirmation of an undesirable event is an undesirable event, and the appraisal of the Distress emotion is contained in the appraisal of the Disappointment emotion category.
The right sub-tree (cf. OCC Attribution category) represents SWRL rules for appraising emotions related to the consequences that some actions, i.e., the states contained in the
a a the the the
the appraising agent
and the SWRL rule for Reproach (see Fig. 16):
a
a
the
another
the
the appraising agent

The SWRL rule for Shame. The solid straight lines are properties tested in the rule antecedent; the dotted curved lines are properties asserted in rule consequent.

The SWRL rule for Reproach. The solid straight lines are properties tested in the rule antecedent; the dotted curved lines are properties asserted in rule consequent.
Following [6,78], the Compound SWRL rules require the appraisal of the emotions with target goals and agents at the same time. For example, if an agent
a
a
the
the
the
the
the appraising agent of emotions is the
the
the appraising agent

The SWRL rule for Anger. The solid lines are properties tested in the rule antecedent; the dotted curved lines are properties asserted in rule consequent. Notice that some of the curved lines are solid, because they were asserted because of the firing of Distress and Reproach SWRL rules previously.
In the following (Figs 18 and 19), we describe the activation of the Reproach, Anger and Shame SWRL rules for the agents Hamlet and Ophelia in the running example of the “nunnery” scene (Section 4.3); in particular, we return on the excerpt of the semantic annotation in Drammar of the

The annotation of the “nunnery scene” used by the emotion rule module for the agent Hamlet. The property
In Fig. 19, the
Ophelia’s goal is achieved in the scene and it is in conflict with the Hamlet’s goal

The annotation of the “nunnery scene” used by the emotion rule module for the agent Ophelia. The property
In Fig. 19, the Shame rule fires for the agent
In this section, we describe an evaluation of the rule–based component of the Drammar ontology in terms of the support it provides to drama studies and didactics.
Because of the increasing production of fiction as Film, Tv, and New Media industry, drama studies are leaving the realm of literature to develop structured formats for industrial production. In the last decades, in schools and universities the focus of the drama courses has switched from literary to structural and actional qualities. This means that the text is more and more intended both as an incident design (either on stage or on screen) and as a network of relations over agents’ intentions, which also result in the appraisal of emotions. For example, McKee [72] guides the author through the scene by splitting beats according to the character’s actional goal, and its value change, with the consequent rise and fall of emotional states. This information (that creates a sense of dramatic actions), which is missing from the text and is the gap filled by the audience, is the object of the analysis by drama scholars. As an evaluation of the Drammar ontology, we implemented an annotation task that instantiates the ontology onto a drama item, with its Action, Unit, Agent, Plan, State, …, components, and applied the rules to establish the mapping intentions–actions and to appraise the emotions felt by the agents, thus augmenting the annotation as described in Fig. 1.
In the rest of this section, we present the workflow of the annotation task, the role of the ontology and the rule–system in bridging the gap over actions–intentions–emotions and an analysis of the effectiveness of the rule system in the case of the emotion appraisal.
Workflow of the annotation task
The annotator, be her/him a scholar or an amateur, breaks drama into units (Segmentation phase, Fig. 20), and defines a timeline of units. Units are independently identified through the boundaries of the actions.7
As shown in [65], despite the individual approach, the segmentation of a drama reveals to be highly consistent among annotators.

The workflow for unit/timeline segmentation, manual annotation of metadata for goals, actions and plans, reasoning through mapping and emotion appraisal rules.
The annotation proceeds by introducing the description of the entities of the story (agents and objects) and retrieving the templates for actions, filling the template roles with the story entities identified before. The appropriate action templates are identified through natural language terms that access the external lexical and commonsense knowledge resources (respectively, FrameNet and YagoSumo, accessed via WordNet). For example, to annotate Hamlet’s action “testing”, the annotator starts by searching some word she/he thinks is appropriate for describing it (in the current implementation, the Italian verb “esaminare”); then, he/she selects the appropriate Wordnet synset (the number 61, in this case); finally, the system retrieves the frames that are mapped onto such synset in FrameNet, from which she/he selects the frame that is the most significant for the situation (here “questioning”). As a result, the application shows the roles to be filled for the selected frame (here, Speaker, Addressee, Topic, Message), that the annotator fills with the entities that have been already annotated (Agent Hamlet, Agent Ophelia, Object Polonius’ location, Object “Where is your father?”). When the annotator inserts some metadata (e.g., an Action name) the corresponding Java class creates the fragments of the ontology that stores the related instance, connected with all the other instances through the appropriate class–to–class properties.
Then, the system applies the rules for mapping actions onto plans and units and for appraising the emotions felt by the agents (Reasoning phase), thus producing an augmented annotation.
Drama is the audience’s cognitive appraisal of both the characters’ intentions and the events that take place. In the famous example by M. Forster, the phrase “The king died and then the queen died” is a chronicle, while “The king died, and then queen died of grief” is a plot, because the latter builds upon cause and effect nexus [41, p. 130]. Bringing the example further, and following the description of drama qualities stated in the Section 2, we could also say that a dramatization of the same content would be:
“The servant: (
Understanding the dramatic text is a complex operation that implies, for example, filling gaps such as the lack of an explicit relation between the two events (the queen dies because of the news), matching the nexus between a verbal expression and an action (the servant’s communication and the Queen’s falling), attributing emotions and values to the situation, and reconstructing the mental states of the agents (the Queen dies of grief because she loved the King). Thus, also in this oversimple example, we see that the dramatic text, and the dramatic performance in particular, plays upon an interwoven relation between the sequence of actions (or timeline) and the mental states (motivations, emotions, etc.) that we infer from it.
In the “nunnery” scene we have employed as running example in this paper, Hamlet’s questioning builds upon a complex mental process, being part of a plan to test Ophelia’s honesty. If the audience only appraised the action performed, i.e., the question “Where is your father?”, this would be read just as a meaningless lunatic behavior. The cognitive construct we call “character” is the outcome of the reader’s interpretation, based not only upon the mere represented actions but also upon its “enrichment” with the motivations that can be inferred from them. The character does not coincide with the agent in the narration and is more than its narrative container [77]. Our appraisal of Hamlet’s action in this excerpt depends upon our interpretation of his behaviors and mental states. There is a vast literature upon this line (“Where is your father”) that can be summarized in two main approaches: those who believe that he does not know the answer (and tend toward an inner psychological interpretation of the two lovers’ loneliness), and those who think he knows he’s being spied (and put the accent on the Elsinor’s intrigues) [59,90,97,102]. This proliferation is possible because of the huge gap that exists between the mere action and the intention the audience recognizes behind it, or, in other words, between the actions Hamlet is planning and the action he is actually displayed as performing. The character results comprehensible and believable only if this gap can be filled by the reader through a cause-effect chain, and this is why a simple lunatic behavior would not fit into the scene, and is not taken into account by our interpretative process. The interpretative process is the field where drama studies have proliferated, and have been carried out mainly by means of re-narration. For example, the seminal work of Harold Bloom on Shakespearian characters is mainly a new personal narrative of the plays [8]. Our system succeeds in giving a formal representation of this operation providing an explicit automatic mapping between the actions in the plans and the action in the timeline.
As shown in Fig. 4, the actions in the unit (and in the timeline) account for the execution of two plans aimed at achieving two conflicting goals. From a literary point of view, the audience of a drama can be focused on the quality of the verse, on the rhythm of the prose, even on the specific style of event design. From the storytelling point of view, it is important to measure the cognitive and emotional appraisal of actions and events. To appreciate the actional qualities of a drama, the reader must learn to focus on the precondition and effects that hold before and after the unit. Thanks to those, the audience is able to appraise the characters’ change, and the final results of the conflicts (see 2.1.3). Therefore, the mental states in the augmented representation are the key elements that allow the audience to build his/her cognitive representation of drama. Specifically, characters’ mental states cannot be described if not as result of characters’ deliberation, therefore by using the mapping of plans and incidents.
The emotional charge of the scene (consider the dialogue “Where is your father?”/“At home, my Lord”) is usually described in the traditional
Appraisal of emotions
In order to evaluate the coverage and effectiveness of the emotion rules, we carried out an experiment where the annotation of emotions performed by the system through the rules was compared with the annotation performed by human experts.
Pellet,
At the character level, there are some differences between the precision and recall of emotional ranges generated by the rules, especially concerning the precision values. These differences are not related with the drama type: for example, the false positives were 5 out of 9 for Carmen (one of the main characters of the musical drama with the same name), thus yielding the lowest precision value in the entire experiment, 44,4%, and 2 out of 9 for Don Jose, the male character of the same drama (yielding the highest precision value, 81.8%).
Less differences emerge concerning the recall, which ranges from 77,7% of Oedipus (
Precision and recall for each opera and the average values in the last column
Comparison between types annotated by human emotion and generated by SWRL rules. The sign ‘x’ means that the emotion is annotated or generated
Hope is a precondition to Disappointment and Satisfaction, so it must be generated any time Disappointment or Satisfaction are generated. Fear is a precondition to Fear-confirmed and Relief, so it is generated when the two are generated.
Compound emotions (Anger, Remorse, Admiration, Pride) are composed from primitive emotions; so, for each of them, the system needs to generate one of the preliminary Well-being emotions (Joy, Distress) and one of the preliminary Attribution emotions (Pride, Shame, Admiration, Reproach).
The appraisal of Disappointment and Satisfaction includes, respectively, the appraisal of Distress and Joy, so the system generates both. The same holds for Fear-confirmed and Relief, whose appraisal includes, again, Joy and Distress.
So, if we consider the dependencies listed above, and consequently remove from the false positives the emotions that are implied by the OCC theory (provided that are implied by an emotion type upon which there is agreement between the human annotator and the rules), the precision of the rule system increases significantly, from the initial 66,6% to 84,6% (Table 3). Even if there is still room for improvement, we think that this result can be considered a valuable one.
Precision computed considering the dependencies between emotions as in the OCC theory
Some of the discrepancies are related to the annotation of the linear succession of events that currently is left unmarked within a unit. So, cases in which the human annotates Disappointment about some state of affairs can be interpreted by the system as Fear towards that state, because the system does not compute the intermediate emotion Hope that leads to Disappointment when the state hoped for fails. Moreover, the discrepancies can be due to a focus of the human annotator on some specific temporal perspective on the event: for example, in some cases the annotator annotates Hope as the prevalent emotion of a scene, although the goal is subsequently reached and so the system automatically annotates both Hope and Satisfaction.
In general, we also need a more thorough evaluation of the system with a set of annotators for each drama, in order to limit the arbitrariness of the comparison (this is why we limited this preliminary evaluation to the emotion type range, instead of considering the emotion tokens). However, consider that such a schema would require a more complex experiment design: first, each annotator would provide her/his own segmentation and annotation of the major components: though the inter annotator agreement is normally high for segmentation, the annotation cannot be assumed to yield a good agreement (beside, it is appreciated to keep the differences in the annotation, due to the considerations made in 6.2). Then, different scholars can annotate different intentions, consistent with this or that annotator. Finally, the differences of perspective addressed by annotators and scholars can lead to various considerations that can be hardly interpreted and removed. To overcome these difficulties, we are designing an incremental process of annotation that can be implemented by a community of annotators and contribute to preserve the knowledge about drama, while at the same time addressing the many issues of formal analysis and the variety of teaching methods.
This paper has presented an ontological approach to the domain of drama. The importance of the domain of drama is addressed in its cross-cultural presence and in the wide amount of media items that fall into this domain. The relevance of this cultural object is well established in domain specific literature (drama critics, dramatic storytelling, new media narrative), but it has not been yet provided with a domain specific significant metadata to improve access and retrievability of the large repository available (from text to video archives). The ontology Drammar is aimed at contributing to fill this gap.
Drammar consists of two components, encoding the conceptual model and the mapping/appraisal rules, respectively. After a brief description of the theoretical background and of the conceptual model, with the ontology main classes and properties encoded in OWL, the paper has focused on the rule component. This consists of two sets of rules encoded in SWRL. The first implements the mapping operation, for projecting the motivations of the drama characters onto the timeline of dramatic units; the second accounts for the emotion appraisal, thus computing the emotional states of the agents in the units from the plans they are committed to, the goals they achieve, the values that are put in balance or at stake, and the conflicts in which they are involved. The paper has finally presented a preliminary evaluation, in which we test the expressiveness of this formalization and its relevance for drama scholars, in both their research activity and the teaching activity.
A first experiment has been carried out on the “nunnery scene” of Shakespeare’s
We are going to develop a further module of rules for the formulation of goals in response to values that are at stake: these tasks, as well as the selection of the plan to be committed, are the typical realm of rules in the development of applications of automatic and interactive storytelling. The long term aim is to see the convergence of annotation and production applications based upon a common core conceptual modeling and rule composing as demonstrated in this paper.
