Computing Duffy’s Style

Rationale

“Style is a way to say who you are without having to speak.” — Rachel Zoe

“Style is primarily a matter of instinct.” — Bill Blass

“Fashion fades, only style remains the same.” — Coco Chanel

“Create your own visual style…let it be unique for yourself and yet identifiable for others.” Orson Welles

Google “style quotes” and you’ll get a slew of pithy phrases that emphasize not only how important it is to be distinct but also how style is unspoken, instinctual, persistent, and the way by which others will identify you. Most of these quotations tend to be about fashion, as the names above suggest, but style is, of course, much more than bow ties, bright socks, and shoes with red laces.

When we discuss literature, style is always near the heart of the matter. It is style, perhaps, that distinguishes the “literary” from the potboilers on the bestseller lists. It is what makes it clear that a poem was written by Walt Whitman, H.D.,  Ann Sexton, Sherman Alexie, or Natasha Trethewey. It is often why we choose to continue reading a particular author of whose style we have grown fond.

As we are wrapping up our examination of Carol Ann Duffy’s poetry for the semester, it is worth considering her style. To what degree does the style of The World’s Wife differ from that of her previous four volumes? This is perhaps a more difficult question. We could, no doubt, tell the difference between an Emily Dickinson poem and one by Duffy. The subject matter, punctuation, rhyme, and any number of other tells give it away. But how do we tell the difference between one Duffy poem and the next? Sure, they have different topics and lengths. Some have rhymes and some don’t. But if she wrote them, they must all have the same style, n’est-ce pas?

Fortunately, discriminating between small nuances of style is something that computers can help us with. For this project, we will be taking a stylometric approach to Duffy’s work. Although stylometry is often used for authorship attribution, we can use the same methods to detect whether her style changes appreciably from her first four volumes to her fifth.

Nitty Gritty

For this assignment, you will conduct a stylometric analysis of Duffy’s poetry and begin the process of interpreting your results. The assignment has one outcome: a collaboratively written blog post. The blog post is due at the end of class, Wednesday, 10 April.

Step One: Get the Data

I’ve created a folder in our repository for our stylometry experiments. The Duffy folder has a corpus, which is exactly the same data as in the 2019-cleaned-simple folder. The only changes are the names of the files, since Stylo needs undersscores in different places than we used them when making our TEI.

You can all work with the files from the repository on your local devices, but be aware that if you start making commits to the repo that you will probably overwrite each other’s work.

If you would like to have a copy of these data, you can find them in the cleaned-data folder.

N.B. No stop words are removed from data that we will use for stylometry.

Step Two: Style the Data

Using Stylo and the Stylometry Step-by-Step guide, make at least 3 different stylometric analyses of Duffy’s poetry. Experiment with some or all of the following:

  • Changing the number of words used in the n-gram analysis from 1 to 2. (This option is under Features.)
  • Changing the number of most frequent words (MFW) used in the analysis. (This option is under Features.)
  • Changing whether words must be included in a large swath of the corpus in order to be used in the analysis. Putting an integer n between 1 and 100 in the Culling option (under Features) will require that the words appear in n% of the documents in order to be considered in the analysis. For example, a culling setting of 50 would mean that only words that appear in at least 50% of the documents would be considered in the analysis.
  • Changing the PCA Flavour (an option under Output) from Classic to Loadings, which will superimpose the most frequent words onto the outputted graph along with the document titles.

An Option to Consider

Remember: Stylo colors its output based on the prefix for each file name, based on what appears before the first underscore. In our data set, this is the volume name, e.g., mt_02_litany.txt. This will make it easy to see where the volumes cluster in relation to one another.

You could, however, experiment with other categories for sorting the data. For example, if you wanted to look at how poems that use first-person narration compare stylistically to third-person narration you would 1) consult the metadata that we created for each poem; 2) change each poem’s filename to represent the difference, using a prefix like first_ or third_. You would then process the poems as normal through Stylo.

If this is something you’d like to do, let me know and I can probably script it pretty easily.

Step Three: Analyze Duffy’s Style

After getting each of the outputted graphs from Stylo, open them in an image viewer so you can zoom in and out as necessary. Which poems are near the center of the graph? Which ones are near the margins? Where are the prominent clusters in the graph? Do the poems group according to volume? What is surprising in the output and what is expected?

As always, please be especially attuned to the differences that may or may not exist between Duffy’s first four volumes and The World’s Wife.

Step Four: Blog about Duffy’s Style

Write about your modeling and your data using Google Docs. When you are done, publish the Doc and post a link to it on our blog. The post is due by the end of class on Wednesday, 10 April. The post should contain the following information:

  • A list (bullet points is fine) of the different options you tried with Stylo. This might look something like, “300 MFW, 2-word n-grams, no culling, loadings PCA.”
  • Post the output images for each of your three options, making sure that each are clearly labeled.
  • Identify which of the abovementioned options you think is best for understanding Duffy’s poetry and why you think that is the case.
  • Write 2-3 paragraphs to report on what you observed in Step Three.
  • Write a paragraph that discusses what you have learned from this approach that you did not learn through either TEI markup or topic modeling.
  • Write a paragraph that discusses what you learned about digital humanities from this assignment.

Grading

This assignment is worth 50 points. You will be graded on whether your post has all the required items; the quality of the work that you did in trying and evaluating different Stylo settings; and your analysis of the output that you generate.

Credits

This assignment was created in 2018,  based on my topic modeling assignment. I’ve made some changes here and there for 2019. This assignment is distributed under the terms of a CC BY 4.0 license.

Obvious credit is due to the authors of the Stylo package for R: Maciej Eder, Jan Rybicki, and Mike Kestemont. I also appreciate my colleague Jeremy Browne, who trod the stylometric waters a few weeks prior to me and stood ready to answer questions and share scripts.