1 Introduction

The advent of the internet has allowed many devoted fans to write and publish continuations or adaptations of their favorite books online. These stories, referred to as fanfiction, have been portrayed in many different lights by the media. Additionally, fanfiction as a certain kind of written narrative is a “root metaphor” for psychology described by Sarbin (1986), and there is a significant space for extending the psychological studies on it. With some claiming they have great potential Burt (2017), while others say it is something to be feared Grady (2016). Fanfictions can be a place where the typical stereotypes are shaded. Fans can represent themselves in their stories, and fanfiction gives a voice to the people who are normally marginalized by society and positively affect their lives. The fanfiction community also gives amateur writers a space to practice writing and get immediate feedback Campbell et al. (2016). But how different are these stories from the original books that inspired them in the first place, and what might affect their popularity? At first, this question might not be worth pursuing as people may believe that there are no real-life impacts related to the topic. However, if we shift toward counterfactuals and appreciate that the fanfictions are presenting us what would’ve happened if the story was different, the importance of this topic would be more conspicuous. By analyzing fanfictions and their various properties, we are actually having access to different derivations of the main story. That said, investigating a story would be much easier as we can look at the other available versions of the story and see what their fans want to change about the original story. This could be even beneficial for future stories or personalized variations of a story. With the distributed mentoring that Campbell et al. (2016) attends to which the fanfiction community offers, the importance of this topic is intensified even more.

Two of the main approaches used in this study are emotional arcs and the graph of interactions between characters. The emotional arcs can be obtained by natural language processing (NLP) techniques and represent the reader-perceived emotional content of written stories as the reader progresses through the book. The emotional arc of a story does not give us information about the intended meaning of its content or plot, but it provides information about the overall trends of the story.

Another tool for delving deeper into the information that can be extracted from fanfictions is the graph of interactions between characters which can help us develop a better understanding of the level to which characters in the story are in contact with each other. Like the emotional arcs, having only the graph of characters does not reveal much information about the story’s content but gives us a quantifiable basis for comparing stories.

As Reagan et al. (2016) puts forward, a cardinal part of a narrative in terms of its psychological aspects is the emotional experience that is evoked when people are reading it. They even help us get a broader understanding of the stories Hipson and Mohammad (2021). Plus, the characters’ relations are one of the components of a narrative that make it memorable. We can mention thousands of examples, such as the friendship between Harry, Hermione, and Ron, or Sherlock Holmes and Dr. Watson. But if we go a bit further, we can conclude that the experience which is evoked is based on a story resonating with ourselves or our previous experiences as Kurt (2010) describes. Apart from that, one of the main reasons that fanfictions are prevailed being people want to change or replace certain parts of the original stories Thomas (2011); there are so many aspects to stories that people may target for this alternation. We opted to use two of the main components of the stories, namely the emotional flow and the characters’ relations, to see if a deviation from the original stories in terms of these two aspects contributes to the popularity of fanfictions. Additionally, focusing on certain properties of fanfictions apart from their original stories, the length of the fanfictions and their genres were considered auxiliary factors affecting fanfictions’ popularity. The contribution of this study to the existing literature would be to answer the following research questions:

  • Does the extent to which the emotional arc of the fanfictions is similar to their associated original story relate to the level of popularity of fanfictions?

  • Does the similarity of a fanfiction’s characters graph to the original story’s graph relate to the popularity of the fanfiction?

  • Does the length of fanfictions play a role in determining their popularity?

  • Are the genres that fanfictions fall under them affects their popularity?

The rest of this paper is structured as follows: Sect. 2 provides a brief overview of the related work. In Sect. 3 the data used in this dataset are described, and its characteristics are explained. Our methods and results are discussed in Sects. 4 and 5, respectively. Finally, we conclude our study in Sect. 6.

2 Related work

Milli and Bamman (2016) is one of the first computational studies conducted on fanfictions. The authors investigate how the main protagonists are deprioritized in these literary texts, and instead, more attention is placed on the secondary characters of the original stories. Building on the idea of this study, Büchler et al. (2018) explores how much of the original style of the Harry Potter novels is retained in both the movies and fanfictions. Frens et al. (2018) addresses the importance of distributed mentoring (in the form of reviews) in online writing communities (fanfiction.net) for the growth of young authors and finds that the number of reviews an author receives predicts increased lexical diversity in the chapters they have written. Additionally, changes in reading habits have been noticed. For instance, Pianzola et al. (2020) studies the stories and comments on Wattpad and points out the rise of a global reading culture in youth which is different from national preferences in certain topics and genres.

With consideration of popularity and success, a dataset of Italian fanfiction is introduced in Mattei et al. (2020). Using this dataset, the authors also discuss what writing styles are more successful (defined by the number of reviews they receive). They report a variety of linguistic features and their distributions that could lead to a successful fanfiction. Carvallo and Parra (2020) tries to discover which factors explain the popularity of the authors, and they find that the size of the authors’ biography has a negative effect on the popularity of the author. In Zhao (2016), Zhao investigates the influence of short summaries on readership and popularity of fan-written stories by analyzing the future attractiveness of short summarizations with classification methods. Moreover, the effect of lexical richness, average sentence and paragraph lengths on the popularity of fanfictions are examined in Rubin and Girouard (2014).

In contrast to these articles, we investigate the popularity of fanfictions in the light of novel computational tools such as emotional arcs and character interaction graphs. Both the emotional arcs and the graph of characters’ relations have been used in different settings to derive various conclusions regardless of the media. Different data structures such as audio and text or even video are being used to apply these tools and extract information. A number of studies such as Chu and Roy (2017) have attended to the subject that the engagement of the consumers or even the degree to which people favor one story over the other can be predicted by the emotional arcs of that story. With a slightly different approach, Berger (2021) investigates the effect of sentiment volatility (period-to-period shifts in sentiment) on the success of the stories. Even further, Del Vecchio et al. (2021) uses the emotional arcs alongside an econometric model to predict the overall success parameters of the movies, including box office revenues. As we can see, there is much attention on the study of the popularity and evoked experience, focusing on the emotional arc of the stories. Wang et al. (2020) being the closest one to ours studying the popularity of fictions in terms of their emotional arcs, none of the already available studies, to the extent of our knowledge, have attended the similarity of fictions to their original ones in terms of the emotional flow of the stories.

Apart from the studies of emotional arc, the characters’ relations as a social network can give us the ability to study the fanfictions from a more social perspective as Labatut and Bost (2019) provide us with different approaches and different interpretations. The literature also contains several studies on the modeling of these networks to dive deeper into their latent structures. One example is Aires et al. (2017) that investigates the similar structures that are observed in popular movies in terms of their characters’ relations networks. Moreover, trying to predict the popularity of the movies based on their ratings, Kounelis et al. (2021) leverages character graph embeddings with a slightly different approach. Similar to emotional arcs, we can see that there is a rich foundation for modeling and studying the characters’ relations network, especially in movies; however, the study of fanfictions and their popularity considering their similarity to the original stories in terms of the characters’ relations network is not yet fully discovered.

3 Dataset

As previously mentioned, in this study, we aim to analyze the relationship between fanfictions and their original story. To do so, we use the website fanfiction.net as our source for fan-written stories. Due to the enormous collection the platform holds, we chose five of the most popular original series as of January 2021, namely, (1) Harry Potter, (2) Twilight, (3) Percy Jackson and the Olympians, (4) Lord of the rings and (5) Hunger Games. These series, in the same order they were mentioned, are the top five series in terms of number of fanfictions available online and account for 78% of all of them. For each story, the text and the popularity/interaction metrics (number of likes, number of followers, number of reviews, number of words and their genres) are gathered.

The number of collected stories from each book series is shown in Table 1. We can see that several thousand stories are collected for each series; however, after collecting the fanfictions, we placed a limit of ten thousand words on the minimum length of stories (referred to as Long Stories in the table), focusing only on stories that are long enough for making meaningful emotional arcs and characters graphs.

Table 1 Number of fanfiction stories in the dataset

Fanfiction stories in our dataset are available in different languages. Table 2 displays how many stories are available in each language after the elimination phase in terms of their length (languages are detected using the Python Langdetect libraryFootnote 1). We can see that 85% of the collected stories are written in English. Emotional arcs can be studied in all the stories, as the dataset we are using to create emotional arcs allows us to do so. The emotional arc creation process is described in Sect. 4.

Table 2 Number of fanfiction stories belonging to different languages in the dataset

As previously mentioned, popularity/interaction metrics are collected for each story. These metrics include the number of people who reviewed the story, the number of people who liked it (favorites), and the number of people who followed the story. The statistics of these metrics are presented in Table 4. We also extract the genres for each story. The numbers of fanfictions in the first five genres are shown in Table 5. Moreover, the distribution of the number of favorites for every fanfiction is demonstrated in Fig. 1.

Fig. 1
figure 1

The dstribution of number of favorites

As the process of analyzing the characters graphs (see Sect. 4.2) is computationally intensive, we reduced the number of fanfictions to be analyzed in Sect. 4.2 by applying a filter on the number of favorites and reviews a story has (only including those with at least 100 favorites and 100 reviews). In total, 376 of the available stories matched this criteria Table 3.

Table 3 Number of fanfictions for each series analyzed with at least 100 favorites and reviews
Table 4 Number of reviews, favorites and follows of fanfictions in the dataset
Table 5 Number of fanfictions falling under each genre

Lastly, for the purpose of comparing results with the original books, the text of all the books included in each of the series is also gathered.

4 Methods

In this section, we explain the methods used in this study in detail.

4.1 Emotional arcs

Stories all have specific shapes in terms of their flow of the emotional senses. The flow of stories can help us categorize them into distinguishable categories, which gives us a better understanding of their structure. The idea of the shapes of stories was first introduced by Kurt Vonnegut’s rejected master’s thesisFootnote 2. He categorized stories based on the flow of their happiness into eight groups. Reagan et al. (2016) introduced a computational method for the same task, grouping stories into six main categories. Some stories start happily and end sadly, while others may start with a huge loss and then reach the climax of happiness in several moments. Other ones are somehow a mixture of these two classes. We followed the computational method of Reagan et al. (2016) for extracting emotional arcs, but to compare the extracted arcs from original stories and their fan-written counterparts. In what follows, we explain the process of extracting emotional arcs from fanfictions and clarify the process of calculating the similarity between fanfictions and original stories in terms of their emotional arcs.

4.1.1 Emotional arc extraction

To extract emotional arcs from fanfictions, we used Hedonometer words datasetFootnote 3 Dodds et al. (2014), which provides us with each word’s happiness score in several different languages. To compute the happiness scores and their flow, we used a window-based method and extracted the words covered by a window of a specific size on the text and calculated the happiness score of that part of the text. In each step, the window slides forward, and the process is repeated till it reaches the end of the text. We chose to go with ten thousand words as the window size which is suggested by Dodds et al. (2011) for extracting emotional arcs. Note that choosing a small window size would make the emotional arcs sensitive to all the fluctuations, and a larger window size would not be able to capture essential nuances.

Two approaches for computing each section’s happiness score were considered. The first method works as follows: a set containing all the words in that section is generated. The score of that specific section is calculated as the average happiness score of the words of that section, with words not having a happiness score excluded. The second method is similar to the first, with the difference that the frequency of words was taken into account. Utilizing the first approach, we assume that a happy paragraph should contain more unique words with higher happiness levels instead of having repetitive happy words. Note that this assumption works perfectly for well-written stories but not for the chats and dialogues used in real-life scenarios.

To be able to create the windows and perform the aforementioned calculations, the following steps were taken. At first, books in PDF format were converted to text files by using the Fitz libraryFootnote 4. The first and last parts of the books, which are mostly acknowledgments and unrelated parts to the story itself, were excluded.

Some pre-processing was done to make the text ready to use the Hedonometer dataset and get the best output. Natural Language Toolkit (NLTK) Bird et al. (2009) was used as the tokenizer. All the numbers and non-alphabetic characters (including punctuations) were dropped as they are neutral words and are not associated with any emotions. Similarly, words with a size less than two were removed as they are either propositions or leftovers after tokenizing (e.g., ’s’ after the apostrophe) and hold no valuable information during the extraction of the emotional arcs. Finally, all tokenized words were lower-cased, which was in response to all words being lower-cased in the Hedonometer dataset.

4.1.2 Emotional arcs similarity detection

Our method for analyzing fanfictions’ similarities to the original books in terms of their emotional arcs is discussed in this section. For each pair of original books and fanfictions associated with the original series, a similarity score was computed using Dynamic Time Warping (DTW) algorithm Bellman and Kalaba (1959). DTW is an algorithm for measuring similarity between two temporal sequences, which may have different lengths.

We took advantage of the Tslearn library Tavenard et al. (2020) that has implemented a version of DTW. Because of this algorithm’s computational burdens, a sampling reduction in arc lengths was carried out. To drop all the fluctuations and the disturbance embedded in the emotional arcs, using time series analysis, we decomposed the arcs to their trends, seasonalities and noises exploiting the statsmodels libraryFootnote 5. Having the components of the arc separated, we focused on the trend component as the overall trend and shape of the stories has the highest importance. All the similarities were computed for each pair of fanfictions and original books since writers may be influenced by all the originals when writing their story and not only one of the books in a series.

4.2 Characters’ graph

To further investigate the relation between fanfictions and their associated originals, we generated the graphs of the characters for each story. Each node in the graph represents a character. Two nodes are connected if there are interactions between them in the context of the story. We assume the existence of interactions if both characters’ names are observed within a 15-word window in the text, which is suggested by Beveridge and Shan (2016). In this section, our method for character graph creation is discussed.

4.2.1 Extracting the graphs of interactions

To generate character graphs, we first need to detect the names of people within the story. To do so, we used BookNLP Bamman et al. (2014) which enables us to extract characters in stories alongside their names and nicknames, exploiting the Character name clustering ability in the BookNLP pipeline. This method is advantageous to other named entity recognition methods as it can match and cluster all the ways a character has been mentioned throughout a story (e.g., “Tom,” “Tom Sawyer,” “Mr. Sawyer,” “Thomas Sawyer” \(\rightarrow\) TOM SAWYER).

To reduce the errors in clusters of names, we carried out several post-processing techniques on these clusters. The first issue with the clusters was that the results generated for each volume in a series were slightly different from other volumes, although they used the same characters. In other words, in the case of each book, clusters were comprised of names and nicknames that were more frequent in that specific book and different from other books. For example, in the case of the Harry Potter series, it was possible to have a cluster with names Harry and Harry Potter in the same cluster, but not Mr. Harry Potter, although this might not be the case in other volumes and clusters. To alleviate this issue, we stacked up all the original books and ten fanfictions and fed them to the BookNLP. In this way, clusters became more robust, and they were comprised of approximately all the names and nicknames alluding to the same characters in all the stories. After the post-processings were done on the clusters, we fed each individual fanfiction to the BookNLP pipeline and obtained the results. We then matched the names extracted against the overall characters’ cluster computed from the stacked version of the books. As a result, we were able to create more accurate clusters by taking the similarities between every two clusters to merge any pair showing extreme similarities. The above technique was used in every stage to remove any redundant clusters and make results more precise. The outcome of these actions was character sets that are mostly identical across all the books in the same series and contributed positively to the task of comparing them.

Having the data ready for extracting the interactions between characters, we adopted an approach akin to Beveridge and Shan (2016). Each occurrence of pairs of characters with a distance of 15 words was interpreted as one interaction. Through this method, we created an array of which we used to generate the graphs of interactions between characters.

4.2.2 Character graph similarity between fanfictions and original stories

Moreover, to investigate the degree of structural similarity between fanfictions and their originals in terms of their characters’ interactions’ graphs, we computed the graphs’ similarity scores as follows. For every two stories that we are interested in their graphs’ similarity, we first matched their characters in terms of their similarity of names to extract the characters two stories had in common. Then, we computed the Hadamard product (a.k.a. elementwise product) of the adjacency matrices and counted the number of nonzero elements. This way, we count the number of common edges between the two graphs we are looking at. After normalizing this metric by the count of all edges in the graph of the fanfiction, we can interpret the result as the percentage of common edges in the fanfiction graph and the original one. A nuance that should be covered is that we matched the characters based on their names’ similarities and different strictness levels. The algorithm we used was a modified version of an algorithm published in the late 1980s by Ratcliff and Obershelp under the hyperbolic name “gestalt pattern matching” provided by difflibFootnote 6. Although this prunes some nodes we have in the characters graphs, the computed results would be more reliable to perform a regression analysis in Sect. 5.4.

5 Results

In this section, the results of our analysis and our interpretations have been thoroughly explained.

5.1 Relation between emotional arc similarity and fanfictions’ popularity

Emotional arcs of the stories can provide us with the intuition that to what degree fanfictions share the same emotional flow in the story with their associated original books. Note that we use the term similarity score throughout this section to refer to the similarity scores between fanfictions and their associated original stories in terms of their emotional arcs.

The control variables used in this study can be divided into two categories. The first group contains all the information available on the fanfiction.net that we gathered. Number of reviews, number of follows, number of people who favored the fanfiction, the genres of each fanfiction, and the length of the fanfiction lay in this category. The other category consists of the properties we extracted from the text of each fanfiction. The average happiness score of the story was computed with a similar approach to Sect. 4.1. Plus, different properties of the characters’ relations graph were extracted to account for their specific impact on the popularity of the fanfictions. These properties were: assortativity, average degree, density, diameter and the similarity of the fanfictions to their original stories in terms of communities. For extracting the communities and also to calculate their similarities, the Louvain method Blondel et al. (2008) and Jaccard similarity Jaccard (1912) were utilized. Note that each one of these properties can associate with the popularity of a fanfiction in a distinct way. For instance, the assortativity of the graph can represent the degree to which the characters featured in the story prefer having connections with people with whom they share similar interests. In other words, this way, we are controlling for different behavioral aspects of people involved in the line of the story.

We define the popularity of a fanfiction as its number of favorites. However, the number of reviews a fanfiction gets, as well, can be an indicator of its popularity as these two metrics are highly correlated with each other with more than 95%. By applying negative binomial regression Johnson (2011) to regress the popularity of fanfictions on the degree of similarity that fanfictions have to their original series in terms of their emotional arc, we can infer that there is a significant correlation between these two metrics. Our results in Table 7 show that the more similar fanfictions’ emotional arcs are to their original series, the less they are popular among the fanfiction community. This confirms the hypothesis that since the authors of fanfictions are fans who prefer an alternate turn of events, common audiences of this community would prefer to read a story that suggests a different flow of emotions. The significance of the results is presented in Table 7 separately analyzed for each series.

5.2 Relation between genres and popularity of fanfictions

With genres extracted from fanfiction.net, we were able to analyze how falling under some genre would affect how popular a fanfiction will be. The genres associated with fanfictions are presented in Table 6. We found that having certain kinds of genres would influence the overall popularity of fanfictions. For example, we see that fanfictions categorized as romantic are generally more accepted by the common audience Rawlings (2002) except for Harry Potter. However, considering that the background of each original series may be different from the others, various combinations of genres can be influential in each case. For instance, writing more in sci-fi domain is not well championed in the Hunger Games or Twilight. Also one of the interesting findings is that authors are in favor of having a family aspect in their stories. But in general, we can conclude that the genres authors choose to write in, although different for each series, do relate to the popularity of fanfictions.

Table 6 Results of Regressing Popularity of Fanfictions on Genres
Table 7 Results of regressing popularity of fanfictions on features including the extracted and metadata

5.3 Relation between stories’ lengths and fanfictions’ popularity

By extracting the number of words in each fanfiction, we found a significant correlation (a zero p-value) between the length of the story and its popularity for each series. Also, the corresponding coefficient with this variable in our regression model was positive; in other words, the longer stories are more likely to be popular as Blog (2015) posits too. One possible explanation for this observation is that the longer the fanfiction, the author is more capable of making the content immersive, which is not really the case for short stories. Besides, with the fanfictions released on a digital platform, the size of the printed versions of bigger books does not bother the readers anymore. Plus, the presumption that people have less time for anything in the modern era would not be the case for people who love reading and are being active in these kinds of communities. The adjusted \(R^2\) reported for the results in Tables 7 and 6 are presented in Table 8.

Table 8 The Adjusted \(R^2\) for Regressions Done with the Popularity of the Fanfictions as Response Variable

5.4 Relation between graph similarity and popularity

In this section, we present the results obtained from the analysis of the networks of characters and their interactions within the fanfictions and their associated originals.

Fig. 2
figure 2figure 2

The Character Graphs of three stories associated with the Twilight series: (a) Twilight Breaking Dawn, (b) a fanfiction being similar to the original story in terms of characters’ interactions, (c) a fanfiction being dissimilar to the original story in terms of the characters’ interactions. The edges in blue in figures (b) and (c) represent the interactions in the original story that are not present in the fanfiction, and the edges in red represent the interactions that are present in both the original story and the fanfiction

To see how the graph similarity is related to the popularity of fanfictions, in the regression performed, we incorporated the effect of characters’ interactions network by including it as a variable in the regression. The results are shown in Table 7. For the series examined in this study, except for the Harry Potter, we can infer that the degree to which a fanfiction is similar to its original story in terms of character graph is related to the popularity of that fanfiction. To exemplify, Fig. 2 illustrates this inference. In Twilight series, we can observe that the fanfictions having more similarity to their original book are not as popular as the ones who have chosen an alternate network of characters’ interactions. Having that said, we can say that in terms of the popularity of fanfiction, paying attention to the relationship between characters in the story and their deviation from how the original story used to plot them do matter, but based on what stories we are talking about. In some stories, we observe that the way characters are in contact with each other is not something that people want to change about the original story. As Jamison and Grossman (2013) raises, fanfictions are a way to get back to the older way of thinking. Certain parts of the stories are just there to be in common and untouched among all people who narrate them. In fact, this is how people kept the stories in the past. In the case of Hunger Games, Twilight, and Percy Jackson & the Olympians, results suggest that more successful fanfiction authors were the ones who changed the way characters were in contact with each other. On the other hand, the results are different for the rest of the series, and keeping the characters’ relations similar to the original story acts in favor of the popularity of the fanfictions.

6 Conclusion

As a huge source of fan-written stories inspired by original series, fanfiction help us develop intuition about what people like or do not like about the original series and how they prefer the story to be. In this study, we focused on two of the factors influencing the popularity level of fanfictions. The original stories and how fanfictions are similar to them in terms of the emotional arcs and characters graph found to be significantly related to the popularity of fanfictions. Also, the genres of the fanfictions and their length were indicators of the popularity of fanfictions. In addition to emotional arc, similarity, genres, length of stories, character graph similarity, we also analyzed the standard metrics in social network analysis on the characters graphs such as degree of assortativity, average degree and diameter of the character graphs. We explored how the communities extracted from character graphs can be similar or different from the original stories. We found none of the mentioned variables relevant to the popularity of fanfictions. Although attending to the importance of characters’ interactions graph and emotional arcs have been previously explored to a certain degree, as fanfictions might still have particular connections to their originals, paying attention to the similarity between fanfictions and their originals is an area that should be explored more. Also, as stated in Sect. 2, examining graph of characters interactions has received scant attention in fanfictions compared to movies. As a result, this study contributes to laying the ground for increased explorations similar to the work has being done for films in written stories. Furthermore, regarding the results we reported in this research article, several important questions can be brought up. Delving deeper into the particular features that every series possess, one can try to find the underlying factors which affect the results for different series. For instance, whether sticking to the original setting would be beneficial or not would necessitate further investigation over the unknown elements which are most probably related to the series’ social theme.