A Home without a “House”: Modelling Domestic Space in Nineteenth-Century British Fiction

Computational studies of literary space have been largely limited to tracking explicit spatial references, whether named entities (Piatti 2016; Evans and Wilkens 2018; Taylor and Gregory 2022) or seed terms like “street” (Bologna 2020; Schumacher 2023; Grisot and Herrmann 2023; Soni et al. 2023). Absent such markers, it remains difficult, except by hand-tagging (Bushell et al. 2017), to establish where a text is set. Current methods cannot determine, for example, whether a dialogue within a novel takes place in a kitchen unless the speakers themselves say “kitchen.” Similarly, nineteenth-century British fiction is full of domestic spaces that have a still-underspecified link to discourses of domesticity, even as scholars argue for the importance of this period in constructing both (Auerbach 2003; Gilbert and Gubar 2000; Armstrong 1987; McKeon 2005). As such, the link between domesticity as gendered, raced, and classed discourse and domesticity as fictional and material space is more tacit than textured (Armstrong 1987; Marcus 2009).

Our study productively unites these two gaps. We join them because this period’s “separate sphere” of domestic space corresponded with a “realist,” naturalized representation of such space (Cohen 2017; Wall 2006; Wagner 2021), a cultural history that simplifies contested theorizations of literary space (Bakhtin 1981; Zoran 1984; Jameson 1991; Bachelard 1994; Tally, Jr. 2013). In computationally modeling Victorian domestic space, we need only ask: is this passage set in a home?

That mimetic approach lets us train a machine-learning (ML) model that can accurately distinguish if a passage is set in a domestic space regardless of whether it mentions words like “house.” We fine-tuned the English BERT model (Devlin et al. 2019) with manually annotated training data from a corpus of 2,887 nineteenth-century British and Irish novels pulled from the University of Illinois libraries and Chadwyck-Healey Nineteenth-Century Fiction (Heuser and Le-Khac 2012; Chadwyck-Healey and ProQuest). Below, we introduce our model, which offers new computational approaches to literary space and domesticity.

Annotation of Training Data

Drawing on our knowledge of the period’s literary history, we, a team of experts in literary studies, iteratively crafted annotation guidelines, considering 450 annotations of 90 passages over three rounds of discussion (Reiter 2020). To produce useful training data, we only included unambiguously domestic interiors, though we hoped our eventual model would capture domestic space more holistically. Figure 1 visualizes our final annotation guidelines as a flowchart.

Figure 1: Annotation guidelines as a flowchart. “Trash” is for unusable passages (e.g., OCR errors); “Other” for those not set in domestic space; “IDK” for those where it is impossible to be certain if they are in domestic space or not; and “Domestic” for those set in domestic space.

We produced 3,657 annotations of 1,375 six sentence passages, settling on that size to balance speed and accuracy. Our passages included those likely to be set in domestic space, those set in non-domestic spaces, and a random selection.

Our inter-annotator agreement (IAA) aligns with past research. Because our team consisted of seven annotators with an uneven overlap, we measured IAA with Krippendorrf’s alpha (Krippendorrf 2018). We achieved an alpha of .58, below Krippendorrf’s suggested cutoff of .8. However, alpha did not vary across pairs of annotators, meaning we had no rogue annotators (De Swert 2012), and qualitative analysis did not show systematic deviations. Instead, our alpha demonstrates the underlying ambiguity of determining literary space, as scholarship has long observed (Soni et al. 2023; Mani et al. 2010; Wilkens 2013).

To produce final training data, each of our 1,375 passages was hard-coded as “Domestic,” “Other,” or “Trash” according to the majority of its annotations. 221 passages had no majority due to annotators’ uncertainty; we withheld 104 of these to make a test set, examining the full novel to create gold standard tags. We supplemented the test set with 500 more annotations of 100 randomly selected passages.

Training and Evaluating a Model

Although our annotations illuminated points of agreement among field experts in literary studies, our goal in this project was ultimately to train a ML model capable of discerning whether a (six-sentence) passage was set in a domestic space. We had two objectives for our model. First, we wanted it to classify all passages from our corpus and provide large-scale insights into historical changes across our corpus. Second, while our annotation guidelines prioritized explicit cues for determining setting, we hoped our model would identify passages set in domestic space if they contained content frequently associated with such spaces. For example, our guidelines did not include gardens as domestic spaces–but if passages set in gardens contained dialogue resembling that in parlors, then the model, with its generalized language features, would classify them as domestic.

While we tested a variety of interpretable classification models, including logistic regression and discriminant function analysis, they produced poor results. We therefore turned to a TensorFlow-based model using the Keras API (Chollet et al. 2015). Given our relatively sparse data for training embedding models and the well-defined sentences within our passages, we adopted a transfer learning approach using Google's multilingual sentence encoders (Cer et al. 2018).

On a hard-classification task (i.e., assigning passages to “Domestic”, “Other,” or “Trash”), the transformer-based sentence encodings performed surprisingly well. We knew from annotating that this was a difficult task, but the model achieved an accuracy rate of 83% (validated with our withheld test data to 80%) over 20 epochs (Figure 2).

Figure 2: Loss and accuracy for training (red) and validation (blue) data across the 20 epochs of the TensorFlow sentence encoding model.

Although the hard-classification results were better than expected, our results improved further when we returned the posterior probabilities of group membership for each passage. Figure 3 shows the model's assigned probability that each passage is set in a domestic space, grouped by the majority-agreement hard tag. For “Domestic” passages, the posterior probabilities are rarely below 30% and almost never below 10%; the converse holds for “Other” and “Trash” passages. Given our IAA, we anticipated some misclassification. Further, since we wanted the model to reveal passages set in domestic spaces outside our narrow guidelines (e.g., gardens), some misclassification is actually desirable. Analysis of the posterior probabilities therefore proved encouraging.

Figure 3: Probability of each passage being domestic according to our model. Tag represents the annotated passage type, while the y axis shows the probability of the passage being set in a domestic space. Color indicates the hard classification of each passage according to the model.

To validate the model, we sampled 120 new passages from the corpus, annotated them, and classified them using our model. Annotators agreed with the model in 85 cases (71% agreement), superior to our original IAA. Examining the outputted probabilities again strengthens the results. In 84 cases, the model rated the probability of the passage being “Domestic” above 70% or below 30%, and the annotators and model agreed on 82% of these more certain cases. The model assigned the remaining passages “Domestic” probabilities between 40% and 60%, indicating its high uncertainty, and here, the annotators and model only agreed 44% of the time. Thus, the vast majority of disagreement occurred in highly ambiguous passages that the model itself was uncertain about.

Use Cases

In applying the model to our corpus, we were excited to find that our model is sensitive to discursive signs of domestic space, not just literal markers. For example, it correctly detects more domestic space in Jane Austen’s Sense and Sensibility (Figure 4) than Walter Scott’s Waverley (Figure 5). Austen writes lots of dialogue but little description (Xu 2011), yet the model recognizes her extremely domestic settings, as we verified in examining individual passages.

Figure 4: The posterior probabilities that six-sentence passages from Jane Austen's Sense and Sensibility are set in domestic space, per our model. The six-sentence windows overlap in the middle to avoid overlooking segments of highly domestic or non-domestic text. Each passage’s posterior probability is marked with a dot, color-coded to indicate what its hard tag would be. The curve is a LOESS regression showing trends in domestic space over narrative time.

Figure 5: The posterior probabilities that six-sentence passages from Walter Scott’s Waverley are set in domestic space, per our model. See Figure 4 for details.

The model’s evaluation of Charlotte Brontë’s Jane Eyre, a touchstone in connecting domestic space to empire (Spivak 1985; Meyer 1996; David 2002), shows how it helps interpret individual texts. We used the posterior probabilities to classify passages into our annotation categories, then applied a Fisher’s exact test to find which words were most distinctive of “Domestic” and “Other” passages (Algee-Hewitt et al. 2020). We find that domestic space in this novel is discursively tied to women, materiality, and labor (“bid”) (Cuming 2013; Wagner 2021), while non-domestic passages are linked with men, Christianity, empire, and travel (Table 1). Our model brings us back to the chronotope: in these words and the novel’s plotting of domestic space (Figure 6), we see a struggle between the chronotopes of the road and the home.

Table 2: Most distinctive words of "Domestic" and "Other" passages in Jane Eyre per a Fisher’s exact test with p < .01. These terms occurred the most disproportionately across the tagged passages relative to the rest of the text.

“Domestic” Words “Other” Words
contented crag
sleeping toil
crib missionary
tray traveller
supper heath
wake deeply
curtains faithfully
sophie iron
amy lane
bid horse

Figure 6: The posterior probabilities that six-sentence passages from Charlotte Brontë’s Jane Eyre are set in domestic space, per our model. See Figure 4 for details.

Given the model’s accuracy in analyzing individual texts, we leveraged it to explore historical trends across our corpus. Figure 7 shows the classification results for 288,700 passages from our corpus (100 passages sampled from our 2,887 novels), averaging the probabilities of the sampled passages in each year. A subtle but clear trend emerges: the increasing presence of domestic space in the British novel over the nineteenth century, with sampled passages growing about 10% more “Domestic” from 1800 to 1900. The overall trend and specific patterns (e.g., the bump in domestic space post-1840) add nuance to scholars’ claims about the history of domestic space (Armstrong 1987).

Figure 7: Classification of domestic space over time in a sample from every novel in our corpus. The y-axis indicates the mean of the probabilities of all passages sampled in each year. The solid line shows the value in each year and the dotted line highlights the trend with a linear regression.

Conclusion

Using a theoretically- and historically-sensitive operationalization and human annotations, we have presented a BERT model capable of identifying whether six-sentence passages from nineteenth-century British novels are set in domestic spaces. The model is surprisingly accurate, especially when we examine its posterior probabilities, and it is able to identify the setting of passages even without named entities or explicit terms, a significant advance in computational literary studies. It facilitates interpretations of both individual texts and whole corpora, enriching Victorian studies with more concrete, large-scale arguments about the relationship between literary space and colonial, gendered, and classed discourses of domesticity. In future work, we hope to further probe the relationship between domestic discourses and literary space, as well as to generalize our process to computational analyses of other spaces.

Appendix A

Bibliography
  1. Algee-Hewitt, Mark / Porter, J.D. / Walser, Hannah (2020): “Representing Race and Ethnicity in American Fiction, 1789-1920”, Journal of Cultural Analytics, 5(2). Available at: https://doi.org/10.22148/001c.18509.
  2. Armstrong, Nancy (1987): Desire and Domestic Fiction: A Political History of the Novel. Oxford: Oxford University Press.
  3. Auerbach, Erich (2003): Mimesis: The Representation of Reality in Western Literature. Translated by William R. Trask. Princeton, New Jersey: Princeton University Press.
  4. Bachelard, Gaston (1994): The poetics of space. Translated by Maria Jolas. Boston: Beacon Press.
  5. Bakhtin, M.M. (1981): “Forms of Time and of the Chronotope in the Novel: Notes toward a Historical Poetics”, in Michael Holquist (ed.), Caryl Emerson and Michael Holquist (trans.) The Dialogic Imagination: Four Essays. Austin: University of Texas Press (University of Texas Press Slavic Series, 1), pp. 84–258.
  6. Bologna, Federica (2020): “A Computational Approach to Urban Space in Science Fiction”, Journal of Cultural Analytics, 5(2). Available at: https://doi.org/10.22148/001c.18120.
  7. Bushell, Sally / Butler, James O. / Hutcheon, Rebecca / Hay, Duncan (2017): Chronotopic Cartographies, Chronotopic Cartographies. Available at: https://www.lancaster.ac.uk/chronotopic-cartographies/.
  8. Cer, Daniel / Yang, Yinfei / Kong, Sheng-yi / Hua, Nan / Limtiaco, Nicole / St. John, Rhomni / Constant, Noah / Guajardo-Cespedes, Mario / Yuan, Steve / Tar, Chris / Strope, Brian / Kurzweil, Ray (2018): “Universal Sentence Encoder for English”, in Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, Brussels, Belgium: Association for Computational Linguistics, pp. 169–174. Available at: https://doi.org/10.18653/v1/D18-2029.
  9. Chadwyck-Healey Literature Collections / ProQuest (no date): “Nineteenth-Century British Fiction”. Available at: https://collections.chadwyck.com/marketing/products/about_ilc.jsp?collection=ncf.
  10. Chollet, François (2015): “keras”.
  11. Cohen, Monica F. (2017): “Domesticity in Victorian Literature”, in Cohen, Monica F., Oxford Research Encyclopedia of Literature. Oxford University Press. Available at: https://doi.org/10.1093/acrefore/9780190201098.013.252.
  12. Cuming, Emily (2013): “’Home is home be it never so homely’: Reading Mid-Victorian Slum Interiors”, Journal of Victorian Culture, 18(3), pp. 368–386. Available at: https://doi.org/10.1080/13555502.2013.826424.
  13. David, Deirdre (2002): “Empire, Race, and the Victorian Novel”, in P. Brantlinger and W.B. Thesing (eds) A companion to the Victorian novel. Oxford, UK ; Malden, MA: Blackwell (Blackwell companions to literature and culture), pp. 84–100.
  14. De Swert, Knut (2012): “Calculating inter-coder reliability in media content analysis using Krippendorff’s Alpha”, Center for Politics and Communication, 15, pp. 1–15.
  15. Devlin, Jacob / Chang, Ming-Wei / Lee, Kenton / Toutanova, Kristina (2019): “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding“, in Proceedings of the 2019 Conference of the North. Proceedings of the 2019 Conference of the North, Minneapolis, Minnesota: Association for Computational Linguistics, pp. 4171–4186. Available at: https://doi.org/10.18653/v1/N19-1423.
  16. Evans, Elizabeth / Wilkens, Matthew (2018): “Nation, Ethnicity, and the Geography of British Fiction, 1880-1940“, Journal of Cultural Analytics, pp. 1–48. Available at: https://doi.org/10.22148/16.024.
  17. Gilbert, Sandra M. / Gubar, Susan (2000): The madwoman in the attic: the woman writer and the nineteenth-century literary imagination. 2nd ed. New Haven: Yale University Press.
  18. Grisot, Giulia / Herrmann, Berenike (2023): “Examining the representation of landscape and its emotional value in German-Swiss fiction between 1840 and 1940“, Journal of Cultural Analytics, 8(1). Available at: https://doi.org/10.22148/001c.84475.
  19. Heuser, Ryan / Le-Khac, Long (2012): A Quantitative Literary History of 2,958 Nineteenth-Century British Novels: The Semantic Cohort Method. 4. Stanford Literary Lab. Available at: https://litlab.stanford.edu/LiteraryLabPamphlet4.pdf.
  20. Jameson, Fredric (1991): Postmodernism, or, The Cultural Logic of Late Capitalism. Durham: Duke University Press.
  21. Krippendorff, Klaus (2018): Content analysis: an introduction to its methodology. Fourth Edition. Los Angeles: SAGE.
  22. Mani, Inderjeet / Doran, Christy / Harris, Dave / Hitzeman, Janet / Quimby, Rob / Richer, Justin / Wellner, Ben / Mardis, Scott / Clancy, Seamus (2010): “SpatialML: annotation scheme, resources, and evaluation“, Language Resources and Evaluation, 44(3), pp. 263–280. Available at: https://doi.org/10.1007/s10579-010-9121-0.
  23. Marcus, Sharon (2009): “At Home with the Other Victorians“, South Atlantic Quarterly, 108(1), pp. 119–145. Available at: https://doi.org/10.1215/00382876-2008-026.
  24. McKeon, Michael (2005): The Secret History of Domesticity: Public, Private, and the Division of Knowledge. Baltimore: Johns Hopkins University Press.
  25. Meyer, Susan (1996): Imperialism at home: race and Victorian women’s fiction. Ithaca, N.Y: Cornell University Press (Reading women writing).
  26. Piatti, Barbara (2016): “Mapping Fiction: The Theories, Tools and Potentials of Literary Cartography“, in D. Cooper, C. Donaldson, and P. Murrieta-Flores (eds) Literary mapping in the digital age. London ; New York: Routledge (Digital research in the arts and humanities), pp. 88–101.
  27. Reiter, Nils (2020): “Anleitung zur Erstellung von Annotationsrichtlinien“, in Nils Reiter, Axel Pichler, and Jonas Kuhn (eds) Reflektierte algorithmische Textanalyse. De Gruyter, pp. 193–202. Available at: https://doi.org/10.1515/9783110693973-009.
  28. Schumacher, Mareike K. (2023): Orte und Räume im Roman: Ein Beitrag zur digitalen Literaturwissenschaft. Berlin, Heidelberg: Springer Berlin Heidelberg (Digitale Literaturwissenschaft). Available at: https://doi.org/10.1007/978-3-662-66035-5.
  29. Soni, Sandeep / Sihra, Amanpreet / Evans, Elizabeth / Wilkens, Matthew / Bamman, David (2013): “Grounding Characters and Places in Narrative Texts“, in Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Toronto. Available at: http://arxiv.org/abs/2305.17561 (Accessed: 9 December 2023).
  30. Spivak, Gayatri Chakravorty (1985): “Three Women’s Texts and a Critique of Imperialism”, Critical Inquiry, 12, pp. 243–61. Available at: https://doi.org/10.7916/D8KD1WSW.
  31. Tally, Robert T., Jr. (2013): Spatiality. New York: Routledge.
  32. Taylor, Joanna E. / Gregory, Ian N. (2022): Deep Mapping the Literary Lake District: A Geographical Text Analysis. Rutgers University Press. Available at: https://doi.org/10.36019/9781684483792.
  33. Wagner, Tamara S. (2021): “Laboring in a Place of Rest: Reconsidering Victorian Domestic Work and Its Narratives”, Victorians: A Journal of Culture and Literature, 140(1), pp. 103–114. Available at: https://doi.org/10.1353/vct.2021.0011.
  34. Wall, Cynthia S. (2006): The Prose of Things: Transformations of Description in the Eighteenth Century. Chicago: University of Chicago Press.
  35. Wilkens, Matthew (2013): “The Geographic Imagination of Civil War-Era American Fiction’, American Literary History, 25(4), pp. 803–840.
  36. Xu, Jun (2011): “Austen’s fans and fans’ Austen”, JLSE, 40(1), pp. 81–97. Available at: https://doi.org/10.1515/jlse.2011.005.
  37. Zoran, Gabriel (1984): “Towards a Theory of Space in Narrative”, Poetics Today, 5(2), pp. 309–35.
Alexander Sherman (ajsherm@stanford.edu), Stanford University, United States of America and Svenja Guhr (svenja.guhr@tu-darmstadt.de), Technical University of Darmstadt and Jessica Monaco (jmmonaco@stanford.edu), Stanford University, United States of America and Matt Warner (mattgw@stanford.edu), Stanford University, United States of America and Annie K. Lamar (kalamar@stanford.edu), Stanford University, United States of America and Mark Algee-Hewitt (malgeehe@stanford.edu), Stanford University, United States of America