{'fraction_non_alphanumeric': 0.036489369528433756, 'fraction_numerical': 0.013560901444370877, 'mean_word_length': 5.315626451912653, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Graph-Learning Approach for Detecting Moral Conflict in Movie Scripts

Moral conflict is central to appealing narratives, but no methodology exists for computationally extracting moral conflict from narratives at scale. In this article, we present an approach combining tools from social network analysis and natural language processingwith recent theoretical advancements in theModel of IntuitiveMorality and Exemplars. This approach considers narratives in terms of a network of dynamically evolving relationships between characters.We apply thismethod in order to analyze 894movie scripts encompassing 82,195 scenes, showing that scenes containingmoral conflict between central characters can be identified using changes in connectivity patterns between network modules. Furthermore, we derive computational models for standardizing moral conflict measurements. Our results suggest that this method can accurately extract moral conflict from a diverse collection of movie scripts. We provide a theoretical integration of our method into the larger milieu of storytelling and entertainment research, illuminating future research trajectories at the intersection of computational communication research and media psychology.


Introduction
Art is fire plus algebra. (Jorge Luis Borges) Humans invest a large amount of their time and money engaging with fictional narratives. These narratives may be described as "cohesive and coherent stor [ies] with an identifiable beginning, middle, and end that provide information about scene, characters, and conflict; raise unanswered questions or unresolved conflict; and provide resolution" (Hinyard & Kreuter, 2007, p. 778). Fictional narratives on TV, like Game of Thrones, attract more than 44 million views per episode (Everett & Crockett, 2019), and screenwriters create up to 15,000 movie scripts per year (Eliashberg, Elberse, & Leenders, 2006). Successful movies can rake in billions of dollars.
Avengers: Endgame achieved a record-breaking, worldwide gross of nearly three billion dollars (Box Office Mojo, 2019). Though, not all narratives are created equal. A majority of movies produced for entertainment underperforms, leaving producers and studios with a loss, and one of the main reasons for underperformance is a bad story (Eliashberg et al., 2006). Clearly, decision makers in the film industry face a critical decision when "choos[ing] among thousands of scripts to decide which ones to turn into movies" (Eliashberg, Hui, & John Zhang, 2007, p. 881).
But what exactly makes a 'good' story? Attempts to answer this question date back to the beginnings of storytelling itself (László, 2008), and communication and media psychology research have since formulated many different theories to explain narrative enjoyment (e.g., Oliver, 1993;Tamborini et al., 2013;Vorderer, Klimmt, & Ritterfeld, 2004;Zillman & Cantor, 1977). Some assert that a good narrative is all about the appeal and complexity of the characters (McKee, 2005), while others argue that a good story is mainly about a sequence of events (Franzosi, 2010). Recent evidence suggests that appealing stories emphasize interactions between the traits of characters, the events that befall them, and the specific sequence in which character traits and events are intertwined (Cron, 2012;Tamborini & Weber, 2020). In evolutionary media psychology, the fictional creation of narrative character and event chains has been hypothesized as an evolved principle to organize humans' cognitive machinery. According to this view, good stories are "attended to, valued, preserved, and transmitted because the mind detects that such bundles of representations have a powerfully organizing effect on our neurocognitive adaptations, even though the representations are not literally true" (Tooby & Cosmides, 2001, p. 21).
In this article, we assume that 'conflict,' and in particular 'moral conflict,' are crucial organizing principles permeating universally appealing narratives. In narrative psychology, conflict patterns are argued to undergird all fictional stories (László, 2008), elevating "the strength of any exciting character and story…without [conflict], characters don't have drive, desire, or des-peration…there is no story, just words" (Ballon, 2014, pp. 49-51). Narratology further distinguishes external and internal conflict, with the former describing a character's goals and resistance from the environment (including interactions with other characters) and the latter occurring within a character and involving their internal needs (for an overview, see Szilas, Estupiñán, & Richle, 2018). Moral conflict-violating moral norms in order to uphold others (Tamborini, 2011(Tamborini, , 2013-has been related to the moral values of characters and to the ethical dimension of the story as a whole (Altman, 2008;McKee, 2005;Truby, 2007). In addition, moral conflict is regarded an especially salient component of cross-culturally appealing narratives (Knop-Huelss, Rieger, & Schneider, 2019;Lewis, Grizzard, Choi, & Wang, 2019;Lewis, Tamborini, & Weber, 2014;Tamborini, 2013;Weber, Popova, & Mangus, 2013). Yet, empirical assessments of the kinds of moral conflict that are present in existing, fictional narratives are absent, with only a few studies simulating agent-based moral conflicts in digital interactive storytelling (e.g., Battaglino & Damiano, 2014). This lack of knowledge hinders media and communication scholars to develop an inventory of moral conflict in narratives and stymies further research relating moral conflict and narrative appeal. As a first step toward filling this gap, we herein address two interlocking research questions: RQ1: How can moral conflict be conceptualized and mathematized?
RQ2: How can complex narratives be abstracted to guide the detection of moral conflict?
To address these questions, we propose a scalable, computational approach to identify moral conflict in story lines of movie scripts. This approach considers narratives as an evolving network of relationships between characters, leveraging the community structure of this network to reveal important points in the narrative's arc. Using a total of 894 movie scripts encompassing 82,195 scenes, we show that scenes in which characters from different network modules interact with one another often contain morally-charged conflict that pushes the narrative forward.

Moral Conflict and Narrative Appeal
Moral conflict permeates human culture and history, manifested in early philosophical discussions between Plato and Socrates on the relative priority of repaying one's debts over protecting others from harm; in ancient literature, such as Aeschylus's Agamemnon, where the protagonist has to decide between saving his daughter or leading Greek troops to Troy; in modern philosophy, including Jean-Paul Sartre's tail of a student who is torn between his personal devotion to his mother and the attempt to contribute to the defeat of an unjust aggressor; and in recent debates on algorithmic judgment during moral dilemmas (Awad et al., 2018). Traditionally, moral conflict has been defined as conflict between moral requirements: Moral reasons for adopting an alternative such that "it would be morally wrong not to adopt that alternative if there were no moral justification for not adopting it" (Sinnott-Armstrong, 1988, p. 12). When these requirements conflict, a moral dilemma arises if neither requirement overrides the other (i.e., is "stronger overall in some morally relevant way," Sinnott-Armstrong, 1988, p. 20). According to this view, moral conflict can only be resolved if one moral requirement overrides the other, otherwise there exists a moral dilemma.
Mounting evidence suggests that moral conflict motivates a variety of actions (Weber & Hopp, in press) and is essential for the construction, processing, and evaluation of fictional narratives (Altman, 2008;Eden, Daalmans, & Johnson, 2017;Lewis et al., 2014). Stories featuring moral conflict are processed and appraised in a slower, more rational fashion, compared to stories that do not feature conflict, and are therefore processed fast and intuitively (Lewis et al., 2014). In the parlance of entertainment research, exposure to morally conflicting stories elicits higher levels of appreciation, an entertainment experience characterized by thought-provoking, deeper, and meaningful insights into life (Knop-Huelss et al., 2019;Lewis et al., 2014Lewis et al., , 2019Oliver & Bartsch, 2011). But why are audiences often drawn toward stories that prominently feature moral conflict, despite the cognitively effortful process of appraising and resolving these dilemmas? The Model of Intuitive Morality and Exemplars (MIME; Tamborini, 2011Tamborini, , 2013 for the latest update of the model see Tamborini & Weber, 2020) provides an answer to this question.

The Model of Intuitive Morality and Exemplars
The MIME describes short-and long-term reciprocal relationships between individuals' moral intuitions and their mediated and non-mediated environments (Tamborini, 2011(Tamborini, , 2013. The MIME draws on Moral Foundations Theory (Graham et al., 2013) to conceptualize these moral intuitions. Moral Foundations Theory postulates the existence of five universal, innate moral sensibilities: care/harm, fairness/cheating, loyalty/betrayal, authority/subversion, and sanctity/degradation. The intuitive nature of these moral intuitions is described as "the sudden conscious appearance of a moral judgment, including an affective valence (good-bad, like-dislike) without any conscious awareness of having gone through steps of weighing evidence of inferring a conclusion" (Haidt, 2001, p. 818). Accordingly, the MIME suggests that media users experience an automatic, pleasurable response when their moral intuitions are reinforced, and an aversive reaction when these intuitions are violated, a prediction that has accumulated much evidence (e.g., Grizzard, Lewis, Lee, & Eden, 2011;Lewis et al., 2014;Tamborini et al., 2013;Weber, Tamborini, Lee, & Stipp, 2008).
The MIME asserts that individuals only exert these fast, pre-conscious evaluations in scenarios wherein a foundation is either upheld (e.g., care) or violated (e.g., harm) by character actions in a dominantly salient fashion (i.e., a moral foundation is distinctively upheld or violated). Conversely, within-foundation conflict (WFC) would arise if a foundation is both upheld and violated by a character's actions. For example, a character may need to enact (physical or emotional) harm in order to care for the (physical or emotional) well-being of another character. In contrast, between-foundation conflict (BFC) arises in situations in which different moral foundations are placed into conflict (Tamborini, 2011(Tamborini, , 2013. For example, a character may physically harm innocent people (violating the care foundation) in order to be loyal to his/her group or country (upholding the loyalty foundation). To derive an affectively valenced response from these moral conflicts, individuals must decide whether the violation of one (or multiple) foundations as means of upholding another is justifiable in the scope of their individual moral preferences (also called moral intuition salience). While moral intuitions can exert chronic influence on moral judgments, stories may contain particular characters (e.g., highly moralized entities, such as Jesus or Ghandi) that may bias audiences' moral judgments in view of the character's general exemplification of particular foundations. For instance, a police officer may exemplify the fairness and care foundations in a story and at the same time may violate the authority foundation (subversion) by breaking the law (a 'bad cop' story). The initial exemplification may lead to a biased judgment of the police officer's motivation for violating another foundation.

Detecting Moral Conflict in Narratives
Attempts to computationally extract moral conflict from textual corpora are sparse. This is partially due to the latent, context-dependent nature of moral language that complicates moral information extraction (Weber et al., 2018) and missing operationalizations for moral conflict measurements. Recently, progress has been made toward the automated extraction of moral information from text (for an overview, see Hopp, Fisher, Cornell, Huskey, & Weber, in press). For example, Sagi and Dehghani (2014) combined dictionary-based content analysis with latent semantic analysis to identify moral rhetoric in news articles discussing the World Trade Center before and after the terror attacks on September 11th, blog posts and comments surrounding the Ground Zero Mosque, and speeches during the abortion debate in the US senate. Building on this work, Hopp et al. (in press) recently introduced the extended Moral Foundations Dictionary (eMFD) to computationally identify morally charged words in text. Compellingly, the eMFD is based on a large, crowd-sourced contentanalysis study (Weber et al., 2018) and has been shown to outperform previous, word-count based moral extraction procedures.
We herein seek to build on this work to detect and mathematize moral conflict in narratives. To accomplish this aim, we theorize moral conflict as a set of hypotheses about the moral content and social network structure of narratives. We start with the simple assumption that moral conflict is likely to arise when characters from different groups, communities, or factions collide. Screenwriters frequently describe different communities of characters alternately, thereby constructing simultaneously evolving storylines (Weng, Chu, & Wu, 2007). Thus, as a story progresses, communities of characters come into focus as particular characters more frequently interact with each other. More specifically, the underlying cognitive process through which narrative consumers assign interacting characters to communities likely follows a stochastic, graph-learning process (Lynn & Bassett, 2019): The continuous registration of characters' spatiotemporal dependency leads viewers to develop expectations about characters' social relations, including their group affiliation, and hence expect particular characters to be more likely to 'flock together.' Based on this rationale and in line with narrative theory (Altman, 2008;Booker, 2004), we predict that narrative events in which characters from different communities collide highlight discrepancies across characters' group-based, moral motivations and thereby presage moral conflict (Tamborini & Weber, 2020).
To test these predictions, a computational translation is required that abstracts narratives into social network representations. In what follows, we make the bold claim that reducing a story to its main characters and their dialogue achieves a level of abstraction that enables computational learning of moral conflict.

Narratives as Social Networks of Characters in Movie Scripts
To examine characters and their interactions, mounting research draws on network science to conceptualize a narrative as an evolving social network in which nodes correspond to characters and edges between characters denote some dimension of their interaction (Ding & Yilmaz, 2010;Gleiser, 2007;Mac Carron & Kenna, 2012;Skowron, Trapp, Payr, & Trappl, 2016;Tran & Jung, 2015;Weng et al., 2007). This network representation of narratives has been fruitful in a variety of areas, from understanding character relations (Ding & Yilmaz, 2010;Park, Oh, & Jo, 2012) to identifying character types (Gleiser, 2007;Skowron et al., 2016) as well as learning leading roles, hidden communities, and storylines (Weng et al., 2007).
Due to their pre-structured format, movie scripts have been especially prominent for computationally constructing social networks of characters. Properly formatted movie scripts allow the distinction between several structural screenplay features such as scenes and stage directions, action descriptions, characters, and dialogue ( Figure 1). Structural elements can subsequently be harnessed when computationally parsing a script, allowing one to extract, for example, which characters appear in the same scene or appear next to each other in dialogue. We utilize these structural features for computationally learning moral conflict patterns that permeate movie scripts.

Movie Script Collection
We acquired scripts from the ScriptBase J dataset (Gorinski & Lapata, 2018), which contains 917 movie scripts. Each movie script is formatted in extended markup language (XML), with tags corresponding to particular script elements (e.g., speech, speaker, scene description, etc.). We wrote a custom Python script to query the XML tree for each script to extract the scene number, stage direction, speaker, and dialogue for each script. 63 movie scripts had to be discarded due to formatting errors, resulting in a total of 894 movie scripts spanning 82,195 scenes.

Character Dialogue Networks
To create the character dialogue network for each movie (Figure 3a), we divided the corresponding script into individual scenes. We created a node in the network for each unique character that has at least one line of dialogue in the script. We incremented the weight of the edge between two characters by one each time the two characters had lines of dialogue immediately adjacent to one another in the scene. For example, consider a scene containing the set of characters {i, j, k}, and the sequence of lines [i, j, k, i, k, i]. The network for this scene would contain one node for each character, and would contain three edges: an edge of weight one between i and j; an edge of weight one between j and k; and an edge of weight three between i and k. The final edge weight between two characters thus reflects how often the two characters appeared next to each other across the entire movie script.
Modularity is commonly used to detect sub-units or communities within a network. The extraction of these communities is based on computations that partition networks into classes that maximize the density of links between nodes inside that class compared to links between classes. Applied to our character dialogue networks (Figure 3b), we expect modularity to reveal communities among characters such that characters assigned to the same module are more likely to interact with each other in contrast to characters from different modules. To extract topological information about the characters and their relationships, we calculated network modularity using the Louvain modularity maximization algorithm (Blondel, Guillaume, Lambiotte, & Lefebvre, 2008).  (Lucas, 1977).

Detection of Cross-Module and Within-Module Scenes
According to our network rationale for detecting conflict, we assume that the majority of conflicts-both moral and non-moral-occur between characters that belong to different communities as indexed by modularity. Hence, for each movie script, we label each scene as either a 'cross-module' scene if this scene contains characters from different modules or 'within-module' scene if this scene solely features characters from the same module ( Figure 3c). Furthermore, we assert that the dialogue across character modules contains language cues that reveal: (a) whether the conflict has a moral or nonmoral basis; and (b) how and which moral foundation(s) are conflicted.

Moral Content Extraction
To extract moral content from characters' dialogue, we utilized the extended eMFD (Hopp et al., in press;Weber et al., 2018). The eMFD contains word lists in which each word is assigned a vector of five probabilities, denoting the likelihood that this word belongs to any one of the five moral foundations. These probabilities were derived from crowd-sourced content annotations and have been shown to improve moral signal detection compared to extant moral content classification procedures.
In turn, we tokenized each character's dialogue and assessed which words in the dialogue are contained in the eMFD (Figure 3d). We then obtained the moral foundation probabilities for each detected word along with whether the given word denotes that the given founda-tion was 'upheld' (positive valence, e.g., care) or whether it was 'violated' (negative valence, e.g., harm). Finally, all probabilities for words in the upheld and violated categories were averaged, returning a vector of ten scores per scene-two (upheld versus violated) per foundation.

Moral Conflict Measurement
We operationalized moral conflict as a situation in which one foundation (or perhaps more than one) is violated in order to uphold the same foundation or other foundations (Tamborini, 2011(Tamborini, , 2013. Thus, moral conflict can occur in two ways: WFC describes situations in which the same foundation is simultaneously upheld and violated, whereas BFC can occur in contexts where some moral foundations are upheld while others are violated. Furthermore, we assert that the degree of moral conflict is a function of: (1) the magnitude to which a foundation is upheld and violated; and (2) the polarity (i.e., difference) of simultaneously upholding and violating a foundation. Magnitude signals the general moral relevance of a particular event (e.g., killing might have a stronger moral relevance than hitting), whereas polarity denotes the degree to which conflicting moral requirements are incomparable, such that one (or multiple) moral requirement cannot override each other as "neither is stronger than, weaker than, or equal in strength to the other" (Sinnott-Armstrong, 1988, p. 58; see also Tamborini, 2013). To better capture this relationship, we can visualize the above model on a two-dimensional grid, where one axis reflects the degree to which a foundation is upheld, with the other axis capturing the degree to which the same (or another) foundation is violated (see Figure 2). Accordingly, the degree of moral conflict on this grid is a function of: (a) the magnitude of the up- held and violated foundation, where a higher magnitude results in moving further to the top right of the grid and increasing the degree of moral conflict; and (b) the polarity with which the moral requirements diverge from each other, with higher polarity indicating a greater distance to the diagonal of the grid. Mathematically, this relationship can be expressed as the Equation 1 shows below: Here, f i,u reflects the degree to which foundation i has been upheld and f i,v reflects the degree to which the same foundation i (in case of a WFC) has been violated. The first term expresses the average magnitude of upholding and violating a foundation: There will be no WFC if f i,u =0 or f i,v = 0 or both f i,u and f i,v = 0 (i.e., either only upholding or only violating a foundation, or neither upholding nor violating a foundation). Likewise, there will be maximum WFC if f i,u = 1 and f i,v = 1 (i.e., simultaneous, maximum upholding and violating a foundation). The second term integrates the polarity between virtue and vice: When a foundation is both maximally upheld and maximally violated (f i,u = 1 and f i,v = 1) the polarity between upheld and violated is maximized. In this scenario, there should not be any regularization of the moral conflict score and hence f i,u − f i,v = 0. However, if a foundation is relatively more upheld or violated, this should cause a decrease in moral conflict as either the upholding or the violation of the foundation becomes overridingly salient (Sinnott-Armstrong, 1988;Tamborini, 2011Tamborini, , 2013. Building on this formula, we can express within-and between-foundation conflict in a straightforward manner. For WFC, the degree to which the same foundation is both upheld and violated can simply be computed by entering the virtue (f i,u ) and vice (f i,v ) score of the same foundation (e.g., care and harm; fairness and cheating; etc.) into Equation 1. Hence, five WFC scores can be computed that reflect the degree to which any one or all foundations are internally conflicted.
Analogously, we can compute the degree of BFC by entering the virtue (f i,u ) score of one foundation (e.g., care) and the vice (f j,v ) score of a different foundation (e.g., cheating). To obtain the average degree to which a particular foundation (e.g., care) is conflicted with all other foundations, the following Equation 2 can be applied: In this equation, f i,u reflects the degree to which foundation i has been upheld (e.g., care) and f j,v reflects the degree to which a different foundation j has been violated (e.g., cheating). Accordingly, for every foundation, four conflict scores are calculated to measure the degree to which a single foundation has been upheld while violating any of the remaining four foundations. Averaging across these sums captures the mean degree to which a particular foundation has been upheld while violating all other foundations. WFC and BFC can also be expressed in terms of a conflict matrix C (see Table 1), where each cell reflects a computed moral conflict score. The diagonal of this matrix denotes the previously introduced WFC, whereas values on the off diagonal capture BFC. Summing the diagonal of this matrix produces the total WFC, whereas summing the upper and lower triangular elements of C produces the total BFC.

Results
We first provide a detailed, small-scale evaluation of our moral conflict detection algorithm across a set of three diverse movie scripts. Thereafter, we present results of a large-scale validation of our algorithm, scaling it up to a total of 894 screenplays.

Character Networks and Modularity
We first evaluated the computational construction of character networks and assignment of modularity . .  classes across three popular movie scripts. Figure 4 demonstrates that character networks provide a highlevel summary of each movie, containing main characters and their relative interactions. Corroborating previous findings (Gleiser, 2007;Weng et al., 2007), modularity maximization performs well as a means of partitioning the character networks into different modules, such that characters belonging to the same module more frequently interact with each other compared to characters from a different module. For example, in Star Wars Episode IV, the largest module consists of the main hero (Luke) and his closest allies (Ben, Han, Leia, and Threepio), whereas the second largest module contains the main antagonist (Vader) along with his imperial allies (e.g., Tarkin, Motti, Tagge; Figure 4a). Similar 'good versus evil' communities are detected in The Matrix (Figure 4b).
However, as the character network for The Lord of the Rings: The Fellowship of the Ring (Figure 4c) reveals, modules do not always reflect the social networks around heroes and villains, but rather capture which characters are co-present throughout alternately evolving storylines (Weng et al., 2007). The Fellowship of the Ring. Notes: Node size reflects degree centrality, edge weight captures total co-occurrence in dialogue, node color illustrates modularity class. Networks are laid out using the force-directed Fruchterman-Reingold algorithm. See SM Sections 1 and 2 for scree plots and character dialogue adjacency matrices. Source: Authors.

Star Wars Episode IV
A total of 20 cross-module scenes (Figure 5b) were detected for which we extracted the moral content across dialogues and calculated the degree of moral conflict (Figure 5b). Overall, the results are promising in that cross-module scenes indeed frequently contain moral conflict: For example, in scene 16, Vader and his allies are accusing Leia of passing through a restricted system and being part of the Rebel Alliance, which both are indicators of violating authority. Yet, Leia stresses the authority of the Imperial Senate to punish Vader for interfering in a diplomatic mission. Accordingly, as indexed by the scene's corresponding conflict matrix, there is strong WFC between authority and subversion. Moreover, in scene 89, Leia faces the BFC of whether to reveal the location of the hidden rebel base (betrayal, but following the authoritative order of Tarkin), or keeping loyal to her alliance at the cost of being partially responsible for the killing (harm) of innocent people should she not cooperate.

The Matrix
In The Matrix, a total of 13 cross-module scenes were identified ( Figure 6A). In scene 19, for example, the highest WFC occurs within the loyalty foundation, denoting the emphasis on Neo's double-life as a program writer and a computer hacker who is "guilty of virtually every computer crime we have a law for" (Wachowski & Wachowski, 1999). Likewise, Agent Smith stresses that he "believe[s] [Neo] want[s] to do the right thing" (Wachowski & Wachowski, 1999) yet Neo emphasizes that he is denied his rights for not having the opportunity to make a phone call. When evaluating the representation of moral conflict in scene 56, it becomes apparent that harm and degradation are most salient and conflicted: Agent Smith multiple times emphasizes the deal between him and Cypher, "I'll get you what you want" (Wachowski & Wachowski, 1999). While not explicitly mentioned in the dialogue, this scene clearly contains moral conflict: Deciding whether Cypher should betray his allies in return to being loyal to upholding the deal with Agent Smith.

The Lord of the Rings: The Fellowship of the Ring
In The Lord of the Rings: The Fellowship of the Ring, a total of 35 cross-module scenes were identified (Figure 7). Remarkably, the majority of cross-module scenes were high in (moral) conflict: The secret council meeting in Rivendell (scene 94), Boromir's attempt to take the ring from Frodo (scene 133), the breaking of the fellowship and the death of Boromir (scene 136), and the appearance of the Crebain in the Eregion Hills (scene 98). For instance, in scene 94, the main conflict revolves around the appropriate manner in dealing with the one ring, which induced the highest conflict, both within and across fairness (e.g., who should be given the ring), loyalty, (e.g., who can be trusted with the ring), and authority (e.g., who decides what happens with the ring). Likewise, in scene 133, moral conflict emerges from Boromir's attempt to steal the ring from Frodo (cheating), although assuring that he is no thief (fairness). Furthermore, Boromir accuses Frodo of betrayal, which explains the high degree of conflict surrounding the loyalty foundation.

Large-Scale Validation of Moral Conflict Detection Algorithm
The previous section demonstrated convergent validity of our moral conflict algorithm across three selected movies. To corroborate these findings across a larger set of screenplays, we scaled our algorithm to 894 movie scripts, containing a total of 82,195 scenes. First, we found a much higher frequency of within-module scenes (N = 69,042) compared to cross-module scenes (N = 13,153), although the ratio of cross-module to within-module scenes varies across movies (see Figure 3 in the SM). Furthermore, this result can be expected for two reasons: First, the modularity maximization algorithm assigns characters to modules that do not interact with each other frequently. As such, scenes in which characters from different modules are co-present will be rare. Second, screenplay writers frequently describe different communities of characters alternately, such that there will be a higher representation of scenes featuring characters from the same module compared to scenes in which characters from different modules are present.
Next, we tested the hypothesis that cross-module scenes are more moralized than within-module scenes. Compellingly, we indeed found that across moral foundation categories, cross-module scenes contain on average more moralized language as identified by the eMFD compared to within-module scenes (see Figure 8a). In a final step, we tested whether cross-module scenes are higher in moral conflict than within-module scenes. As illustrated in Figure 8b and Figure 8c, we again found support for our prediction that cross-module scenes are consistently higher in moral conflict than within-module scenes. Interestingly, we observed highest BFC for the loyalty foundation, which suggests that characters are more concerned with upholding their in-group loyalty at the cost of violating other moral foundations. In contrast, we found that WFC is highest for the care foundation, indicating that characters frequently face situations in which they, for example, have to commit an act of (physical or emotional) harm in one context in order to uphold (physical or emotional) care in another. Likewise, we observed that BFC is higher than WFC across the loyalty and authority foundations, whereas WFC is higher in care and fairness foundations.

Discussion
This article introduced a computational approach for extracting moral conflict from movie scripts. While moral conflict is an important factor for story development (Ballon, 2014) and narrative appeal (Eden et al., 2017;Knop-Huelss et al., 2019;Lewis et al., 2014), no tools exist for the large-scale, standardized extraction of moral conflict from narratives. Our suggested approach provides a first step towards the automated, computational assessment of moral conflict in narrative texts. We found that network structures among characters serves as a useful heuristic for identifying movie scripts' main characters and their interactions. Furthermore, we demonstrated that modularity maximization is a promising method to extract communities of characters within a story. Lastly, we showed that scenes in which characters from different network modules co-occur are more moralized and higher in moral conflict than scenes in which characters from the same network module are co-present. In order to measure the degree and kinds of moral conflict that permeate the dialogue of rival characters within identified conflict scenes, we derived two different metrics: First, we operationalized WFC as the degree to which distinct moral foundations are simultaneously upheld and violated; second, we defined BFC as the degree to which a single moral foundation is upheld, while other moral foundations are being violated. Our results indicate that these measures demonstrate acceptable validity as indicated by their alignment with expressed moral sentiment and conflict in characters' dialogue.

Implications
The herein introduced methodology is inspired by recent research synergizing structural and content features of narratives (e.g., Skowron et al., 2016) to push the envelope of computational entertainment research. Specifically, our finding that cross-module scenes are richer in moral content and moral conflict compared to within-module scenes is compelling for two reasons: First, it emphasizes the attentional capture of moral cues (Gantman & Van Bavel, 2015) for assisting viewers in directing their attention towards important plot points; second, the collision of characters from different network modules likely highlights characters' groupidentity and reinforces motivations for coalition building and group cohesion. Hence, to emphasize distinctiveness between group affiliations, screenwriters may attribute characters in cross-module scenes with more moralized dialogue in order to highlight group differences and evoke moral conflict. This leads to the interesting future prediction whether: a) Character network modules are more homogenous in their moral language use; and b) whether this similarity increases during cross-module scenes where group-identity becomes hyper-salient.
Moreover, our herein developed approach paves the way for testing various central predictions of the MIME at an unprecedented scale. First, if moral conflict is indeed a central predictor of narrative appeal, then our developed conflict metrics should correlate with viewership and story evaluations, including movie performance as indexed by box office sales or film critic ratings . Second, our approach may illuminate which kinds of moral conflict are more likely to engage particular morality subcultures: communities among audiences with distinct moral sensitivities (Mastro, Enriquez, & Bowman, 2013). Ongoing research demonstrates that subgroups among audiences differ in their moral sensitivities and hence tend to enjoy different moral content patterns (Bowman, Jöckel, & Dogruel, 2012). Accordingly, future work may examine how violating particular moral norms in order to uphold others is enjoyed in some morality subcultures but not in others. Accordingly, we envision that the evaluation of a story's moral conflict pattern may be of assistance to screenwriters during the script creation process and furthermore inform decision-makers in the film industry during content marketing (see e.g., The Moral Narrative Analyzer [MoNA], https://mona. medianeuroscience.org; Dramatica, https://dramatica. com; StoryFit, https://www.storyfit.com).

Limitations and Future Directions
Although our findings are promising, they have limitations. First, our approach does currently not allow for the tracing of the dynamic development of moral conflict related to specific characters, as it considers moral conflict as a holistic concept that is expressed across multiple characters within particular scenes. This limitation largely arises from the fact that the edges in our character networks are undirected and hence do not allow for an assessment of 'who is talking to whom, with what message, and with what effect.' Put differently, characters following each other in dialogue do not necessarily interact with each other, although we assume that dialogue co-occurrence is a more precise proxy for interaction compared to the commonly used scene co-occurrence (see e.g., Gorinski & Lapata, 2018;Weng et al., 2007). A consideration of the directed edges between particular characters may enable more in-depth analyses of moral conflicts between particular characters. As such, we are currently collecting human-annotated data to more precisely detect speaker-addressee relationships across movie script dialogue. Second, we herein applied modularity maximization to detect potential conflicts between different communities of characters. Hence, our approach does not account for potential conflicts that may arise within a given community. Future work may thus experiment with more fine-grained modularity parametrization to 'modularize within modules.' Relatedly, modularity maximization might not always extract modules that resem-ble classical 'good versus evil' splits as illustrated in Star Wars Episode IV or The Matrix. As such, future work may extend the herein introduced approach to detect stereotypical personas of film, such as heroes and villains (Bamman, O'Connor, & Smith, 2013). Analogously, we herein focus on external moral conflicts as expressed in dialogue between characters. Yet, recent advancements in the MIME (Tamborini & Weber, 2020) suggest that moral conflicts may also arise within characters, expressed as the collision of individuals' egoistic motivations and altruistic concerns for others. Moreover, our use-case of structured movie scripts reflects a 'best-case' scenario for computationally extracting moral conflict from text corpora. Yet, we think that many of the herein introduced steps can be mapped onto more unstructured texts to identify moral conflict in other media formats. For example, news articles may be promising to understand how moral conflict evolves in public discourse and dynamically shapes and is shaped by unfolding sociopolitical events .
Perhaps most importantly, we encourage future researchers to further validate the herein established conflict computations. First, permutation tests in which words of a script are randomly assigned to scenes may corroborate our findings if our moral conflict matrices consistently deviate from null models. Likewise, it would be helpful to randomly permute characters to scenes in order to examine whether detected modules are preserved or destroyed. In addition, we suggest contrasting the computationally derived moral conflict measures against a crowd-sourced, manually annotated dataset. Doing so may reveal, among other things: (a) Whether humans attribute cross-module scenes higher conflict ratings compared to withinmodule scenes; or (b) whether algorithmically derived moral conflict matrices correlate with humans' judgment of conflicted moral foundations.
We are optimistic that future applications and enhancements of the computational algorithms can serve to help media psychology researchers-as well as industry professionals-decipher and learn the types of moral conflict that permeate stories, and how these conflicts influence how we engage with and respond to narratives in our everyday lives.