Grounding Characters and Places in Narrative Text (2023)

Abstract: Tracking characters and locations throughout a story can help improve the understanding of its plot structure. Prior research has analyzed characters and locations from text independently without grounding characters to their locations in narrative time. Here, we address this gap by proposing a new spatial relationship categorization task. The objective of the task is to assign a spatial relationship category for every character and location co-mention within a window of text, taking into consideration linguistic context, narrative tense, and temporal scope. To this end, we annotate spatial relationships in approximately 2500 book excerpts and train a model using contextual embeddings as features to predict these relationships. When applied to a set of books, this model allows us to test several hypotheses on mobility and domestic space, revealing that protagonists are more mobile than non-central characters and that women as characters tend to occupy more interior space than men. Overall, our work is the first step towards joint modeling and analysis of characters and places in narrative text.

## introduction the association between characters and the places they navigate is central to a wide range of literary phenomena: bildungsromane depict a character's journey across geographic space as a component of their psychological coming of age @xcite ; the flâneur, who walks and observes throughout a city, epitomizes the power that follows from peripatetic access to public spaces @xcite @xcite ; class, gender, and racial associations can render surprising or scandalous a character's mere presence in an otherwise innocuous location. while much work in literary history and theory has explored this interaction, it has remained out of reach for empirical observation and large-scale comparisons with social constructs such as gender, mr. fogg repaired to [his bedroom] to , and called out, "passepartout!" as for mr. fogg, he slumbered as peacefully as if he had been in [his serene mansion in @xcite no rel ] no rel . on the ninth day after leaving @xcite from , phileas fogg had traversed exactly one half of the terrestrial globe . phileas fogg wished to go to @xcite no rel , but the captain would not carry him @xcite no rel . last friday at eight o'clock in the evening, monsieur fogg came @xcite to from [his club] from figure 1 : in around the world in 80 days, phileas fogg is mentioned in conjunction with a wide range of places, but is only physically grounded in some. disentangling the places he is in from the places he is not is crucial for tracking his movement throughout this work. nlp research has made substantial progress in the individual components of this endeavor: under entity tagging, spans of text that correspond to entities are identified and categorized by their entity types (e.g., @xcite ; methods can ground textual spans referencing a location to their real-world coordinates (e.g., @xcite ; and extensive schemas to precisely describe the relationship between locations have been proposed (e.g., @xcite . yet, despite this progress an important gap still remains: the technology supports the identification of characters and locations in text but falls short when it comes to placing the character with respect to a given location at any time in the story. in this work, we address this gap by proposing a classification task whose objective is to determine the spatial relationship between a candidate character and candidate location. the classification task helps make a judgment about the nature of the spatial relationship between the character and the location, allowing us to differentiate between scenarios in which the character is, for instance, at the location, approaching a location, has left a location, or has no relationship with the location in question. to illustrate the point even further, consider the toy example in figure 2 , in which multiple characters and locations are mentioned and their spatial relationships are annotated under the task we propose. to make progress on this task, we annotate excerpts from books and use this annotated dataset to construct a predictive model. in applying this predictive model to a larger set of books, we test two hypotheses on mobility and domestic space, finding that protagonists are often depicted as being more mobile than other characters, and finding a strong gender effect on the kinds of spaces that are accessible: women as characters are more likely to occupy indoor or domestic spaces compared to men. overall, our contributions in this paper can be summarized below. given a selection of narrative text containing a mention of a character and a mention of place, our overall task is to determine the nature of the relationship between that character and place at that instant in the story. formally, consider a piece of text as a sequence of tokens w 1 , w 2 , . . . , w n . an entity tagger identifies c as the character mention spanning tokens w c to w c+k , where similarly, the entity tagger also identifies l to be the place mention spanning w l to w l+m , where 1 ≤ @xmath0. both c and l are within 10 tokens of each other, i.e., if c + @xmath1, then c + @xmath2; otherwise, l + @xmath3. to operationalize the task further, we use entity definitions from @xcite . characters are defined as entities of the type per, which include instances that refer to a single person or a group. places or locations are defined as entities that are natural locations (loc) such as the forest or mars, human-built structures (fac) such as the kitchen or the church, and geo-political entities (gpe) such as london or the village. places may be entities that exist in the real world (with attendant latitude/longitude coordinates), common noun phrases that lack such geolocation, and places that exist only within imagined worlds (e.g., hogwarts). we decompose the overall task into four staged sub-tasks described next with examples. in each example, the characters marked by an entity tagger are underlined with a straight line, whereas places are marked with a wavy underline. ## annotation we apply this framework to a sample of englishlanguage books from project gutenberg. these titles span multiple centuries, index different genres, and contain a mix of fiction and narrative nonfiction. all works are in the public domain in the united states and are able to be openly published along with our annotations. from this collection, we apply the litbank entity tagger to identify all person and place mentions, and sample passages containing at least one character and one location separated by 10 or fewer tokens. 2506 of these samples were annotated in total by 3 annotators. the annotation process started by first carrying out pilot annotations. after an initial round of annotations, a codebook was created which was further refined in each subsequent pilot annotation round. next, the codebook was formalized into an annotation guideline document. the document described the tasks, defined the categories per task, and gave intuitive and real examples for each category. the annotation guidelines were iteratively refined throughout the annotation process. training. every annotator, other than the lead author, underwent training by reading the annotation guidelines and getting familiarized with the task. a small random sample of 50 examples were annotated and the annotations were discussed with the lead author. at this stage, any disagreements were discussed, discrepancies in the guideline were corrected, and additional clarification, if any, was added to the guideline. during training, the annotators were specifically asked to manage each annotation in under 2 minutes. interannotator agreement. after training, a common randomly picked sample of 261 examples was annotated independently by 2 annotators, yielding a cohen's κ of 0.53 on identifying the validity of entities, 0.58 on the spatial relationship categorization task, 0.48 on the temporal span classification task, and 0.53 on the narrative tense classification task. after this phase, every annotator separately carried out the annotations. during this separate annotation, difficult and ambiguous ex-amples were marked and discussed by all three annotators. the annotation guidelines were refined if necessary. any remaining disagreements were resolved by the lead author. a distribution of the labels in the annotated data is given in ## model we build classifiers for different tasks using the annotated data. every annotated example consists of a span of tokens denoting a character and a span of tokens denoting a location. we use the token representations from a bert language model @xcite , which we then aggregate into span representations by averaging the token representations. assuming that c and l are vector representations for the character and location respectively, the classification model is simply: setup. we train a binary classification model to identify groundable character/place pairs, temporal span classification and narrative tense classification, and a multi-class classification model for spatial relationship classification. to assess accuracy, we divide all the annotations into 70% for training, 10% for tuning the hyperparameters, and the remaining 20% for testing. features of the classification model are concatenated span representations from the final hidden layer of the bert-base-cased language model @xcite . we train our models to minimize the cross entropy loss, and maintain a learning rate of 1e -5 . we find the optimum value of the hyperparameters by testing the accuracy of the model against the development set. specifically, we tune the number of epochs to train the model for early stopping from the set {1 . . . 15}, the number of hidden layers from the set {0, 1}, and length of each excerpt passed to the model, operationalized as the number of tokens from the set {10, 50, 100} before the first and last mention of the character and place in the excerpt. ## analysis a predictive model of the spatial relationships can be used to draw inferences for individual character and location co-mentions but it also opens up the possibility of macro-analysis by aggregating these individual predictions across books. in this section, we show how the model can be applied to ## related work our two primary contributions are a new task on classifying the spatial relationship between characters and locations and subsequent analysis about the movement of characters in narrative texts. we briefly describe the relevant work along these aspects. in the analysis of characters and locations, named entity recognition (ner) has attracted considerable attention for its use in narrative texts such as books (e.g., @xcite ; a more focused task is the identification of characters from text (e.g., @xcite @xcite . progress has also been made at coreference resolution, crucial for correct identification of character references in text @xcite . in this work, we use a named entity tagger to mark spans of text as characters and locations, but extend the technology to categorize the relationship between a character and a location. an analytical lens that previous research has used is to study character networks in novels (e.g., @xcite @xcite and films (e.g., @xcite . similarly, recent research has developed models of inter-character relationships in literary text (e.g., @xcite @xcite . unlike prior research, our work does not focus only on analyzing characters but instead seeks to understand their spatial relationship with places. with respect to locations, there has been some work on toponym resolution in historial textsa task that computationally links the text to geographic coordinatess (e.g., @xcite @xcite . others have proposed rich annotation schemes to relate multiple placenames (e.g., @xcite . our proposed task and its associated annotations differs from the previous work because we relate locations to characters. finally, our analytical work exemplifies application of computational methods to historical, literary text. previous work has analyzed single attributes of a character such as gender in english fiction books @xcite . in contrast, our analysis considers multiple attributes such as gender and spatial location. prior work has also analyzed the dynamics of spatial locations, including mobility (e.g., @xcite , and related it to measurements of emotions (e.g., @xcite and race (burgers, 2020). the unit of such analyses have been books, in contrast to our work where we zoom in to analyze the mobility of characters within books. ## conclusion we propose a new, challenging task of grounding characters to places in narrative texts. unlike other domains that rely more heavily on surface lexical features to denote spatial relationships between entities, narrative texts often rely on indirect inference, exploiting a reader's commonsense knowledge and mental models of the geography within the imagined world to establish relationships between characters and the places they inhabit and navigate. this complexity presents challenges for both annotation and modeling, but we find that predictive models are able to ground characters in places for relations that are well attested in our data (e.g., in and no rel in particular), which offers promise for increasing the size of training data for less represented categories. in focusing on the core category measuring when a character is in a place, we illustrate the affordances of this work: grounding characters in place allows us not only to measure the formal elements of narrative (the structural mobility of protagonists) but also capture the degree to which mobility and the experience of space in narrative is intimately bound with gender.