Much ado about computational methods

By Tom Liam Lynch. Posted

Originally published in Hello World Issue 18: Cybersecurity, March 2022. All information true at the time of original publishing.

Computational methods shouldn’t be limited to STEM disciplines. Tom Liam Lynch makes the case for integrating computing into the study of literature and the wider humanities

Over the last year, our screens have been awash with data: of the spread of Covid-19, the number of hospitalisations and fatalities, and line charts predicting regional trends. Computationality undergirds such reporting, yet to limit our understanding of digital data to the world of STEM, as we so often do in school-age education, is inadequate. In the coming months and years, as schools cautiously emerge from the pandemic, I argue that we should rekindle and reimagine school-age computer science initiatives. Computational methods must become ubiquitous across wider subjects, especially in humanities classrooms. If the pandemic taught us nothing else, it taught us that the quantities we tally only matter because of the human qualities they attempt to represent.

Data for humanistic inquiry

When we embed computer science in English, language, and arts classrooms, we introduce computationality in the service of humanistic inquiry. Questions of character, ethics, truth, justice, equity, and morality can be richly posed and explored with the help of computational methods. Here’s an example I have used with English teachers many times. In the chart in Figure 1, I offer two lines representing keywords from one of Shakespeare’s plays. The words are ‘love’ (the red line) and ‘death’ (the black line). The x-axis lists the acts and scenes in the play. The y-axis indicates the number of times the words appeared in each scene. Forget what play it might be; just look at the data.

Figure 1: Plotting keywords across scenes in a Shakespeare play

Then ask yourself three questions. Firstly, what do I observe? Teachers will often observe that the frequency of the words have an inverse relationship. Love is way more popular in the beginning of the play; death is more frequently used in the latter half. Teachers will also often observe that in the third act, both words seem to be used more evenly. Secondly, based on your observations, what questions about the story emerge for you? Teachers have asked questions such as: What happens in Act 3 when the words are used with similar frequency? Do people die at the end of this play, because death is used far more often than love? What happens in the last scene that causes the use of the word love to surge one last time? Is there a wedding, or a funeral, or something else? Finally, what do you hypothesise about the plot and characters based on the data? Many rightly hypothesise that it is a nuanced love story that ends tragically, with some kind of important turning point in the third act. And if you guessed that it is Romeo and Juliet, in which Tybalt slays Mercutio and Romeo kills Tybalt in Act 3, you would be correct.

In this exercise, notice how computational methods (i.e. quantitative literary data visualised as a line chart) are used in the service of humanistic inquiry. In fact, readers can identify patterns in language and pose questions about a text using a data visualisation that they could not easily do if conducting a traditional close reading of the play alone.

Deepening our inquiries

Computational methods and quantitative data can help readers deepen and expand humanistic inquiry: deepen, because it actually forces us to look more closely at texts, and expand, because it offers new methods for doing so that complement existing practice. I taught Romeo and Juliet countless times as an English teacher. There is no realistic way to see patterns in the whole text at once as we do with the chart on the previous page. This method also provides myriad new points of entry for students to make meaning of the author’s work, while simultaneously building a critical and humanistic understanding of how quantitative data operates in the world.

Figure 2: Plotting the keywords ‘love’ and ‘death’ across all Shakespeare plays

You can even extend the above example to all of Shakespeare’s works at once. Instead of looking at scenes on the x-axis, we can look at acts in the play, because all of Shakespeare’s plays have precisely five acts. Look at Figure 2 for the frequency of love and death in all of his plays.

Again, what do you observe, inquire, and hypothesise? With just a quick glance, I observe that Hamlet has a similar pattern of frequency for our keywords. I wonder how Shakespeare’s use of the words compares across the two plays. Though they are both tragedies, I don’t think of Hamlet as a love story primarily, but rather as a tale of madness. I hypothesise that on rereading Romeo and Juliet, I might explore whether the protagonists’ affection for each other might be interpreted as an act of madness rather than frenetic teenage love. Does Shakespeare ultimately conflate love and madness? How do the actions of the star-crossed lovers compare to those of the Prince of Denmark? Those are valuable questions for students to pose, and ones that quantitative data and computational methods make it possible for us to identify and explore.

The pandemic has exposed our young people to the complex and sometimes traumatic relationship between digital data and lived visceral experience. In the coming months and years, our schools must help students explore what Covid-19 has heartlessly underscored: that the boundaries between numbers and letters, STEM and the humanities, and computers and human beings are falsely drawn. We must prepare students to contribute to the world in a way that sees the lives behind the lines on a chart, the human faces embodied in every data point. Computer science belongs in humanities classrooms because neither computers nor the sciences have very much value in the world unless they help us all understand and improve humanity itself — in the moment, and for generations to come.

Project ideas

  • Explore a book using literary data for yourself at

  • When teaching poetry, try forefronting the concept of algorithms to explore with students how rhyme and metre serve as formulas poets use to increase literary effects.

  • Upload any text into Voyant Tools ( to explore its language use using visualisations. Just note that the literary data will not be organised by chapters or scenes, but rather general percentage.

  • Ask students to score each paragraph in a text for sentiment: negative (-1), neutral (0), or positive (1). Collect the data, calculate the average per paragraph, and create a simple line chart showing how sentiment rises and falls in the text. Finally, discuss what specific devices the author uses (such as the use of metaphors) to achieve this effect.

  • Give students an excerpt from a literary text with keywords blanked out. Using ‘if–then’ statements, ask them to explain what words the author could have used and what effect they would have on the reader. For example, “If the author uses ‘bloody’, she makes the reader cringe and worry. If the author uses ‘red’, the reader just keeps reading.”

Further reading


Free - UK only

If you’re a UK-based teacher, volunteer, librarian or something in between, we'll send each issue free to your door.



Just want to read the free PDF? Get each new issue delivered straight to your inbox. No fuss and no spam.


From £6

If you’re not a UK-based educator, you can buy print copies from our store.