The CLiC web app – a corpus tool for studying literary texts

There are already loads of digital humanities tools out there, but they don’t necessarily focus on the literary linguistic analysis of texts. In this post we introduce the CLiC web app, a corpus tool that has been specifically designed to address research questions in stylistics.

In addition to standard corpus tool functionalities, CLiC (Corpus Linguistics in Context) allows the user to restrict searches to text within or outside of quotation marks. As of March 2018, CLiC contains over 130 books. These are available via four corpora: the corpus of Dickens’s Novels (DNov), a 19th Century Reference Corpus (19C), a corpus of 19th Century Children’s Literature (ChiLit) – compiled for the GLARE project, which explores gender in children’s literature over time – and Additional Requested Texts (ArTs). We created the ArTs Corpus in order to respond to requests by users and particular teachers who want to use CLiC in their teaching. With ArTs, we added more books that are set texts for the British exam specifications (GCSE and A-Levels).

The poster gives you a quick overview of the main functions in CLiC. One feature specific to CLiC is the ‘KWICgrouping’ of results: the KWICGrouper makes it possible to semi-automatically group concordance lines based on searching the context. The lines with the most matches (i.e. shared patterns) are highlighted and moved to the top of the concordance. (For a demonstration of the KWICGrouper in action you can watch a video tutorial; although this video is based on an older version of CLiC, 1.5, the current KWICGrouper still works on the same principle; also see O’Donnell 2008.) For a more detailed description of the interface, please refer to the User Guide in the CLiC Help Menu.

CLiC Poster SIG-DLS blog

Here we focus on a concordance of the word chin, a body part noun, to illustrate the value of concordancing when looking for patterns in the text. Body part nouns are useful starting points to find descriptions of body language in novels. On the one hand, patterns of body language can relate to wider cultural behaviours (for an example of this, see our blog post about the ‘fireplace pose’). However, body language can also contribute to characterisation. Overall, there are 317 instances of the word chin in Dickens’s novels. In order to look for patterns that are character-specific we might want to search for a character name. For example, the Major in Dombey and Son co-occurs three times with chin. The other option is to explore patterns of body language and check which characters they occur with.

Using the KWICGrouper we can go through the list of words in the context of chin and select another body part word, such as eyes, in order to identify patterns of co-occurring body parts. In this case, just by adding the possessive her to the KWICGrouped terms we retrieve a pattern that is unique to one character. The resulting concordance on the poster shows that all instances of chin with her and eyes come from the novel Our Mutual Friend, and indeed all describe Miss Jenny Wren, who is also called “the person of the house”:

‘And she always has the use of this room for visitors,’ said the person of the house, screwing up one of her little bony fists, like an opera-glass, and looking through it, with her eyes and her chin in that quaint accordance. ‘Always this room for visitors; haven’t you, Lizzie dear?’

(Our Mutual Friend, Charles Dickens, Chapter 18)

Our example shows how the KWICGrouper can be used to highlight patterns across novels and provide examples for themes such as body language. A more detailed description of this “chin” case study can be found in the KWICGrouper section (I.4) of the CLiC Activity Book. The Activity Book contains a basic introduction to corpus linguistics and a collection of activities for teaching at secondary school and undergraduate level. Further news related to the project, case studies using CLiC and teaching materials are regularly posted to our CLiC Dickens Blog. We would be interested to hear about how you use CLiC (or what we could improve) and are always happy to consider related guest posts for the blog. Please get in touch via email or Twitter.

Written by Viola Wiegand and Michaela Mahlberg

The CLiC web app was initially developed as part of the AHRC-funded CLiC Dickens project at the Universities of Birmingham and Nottingham (grant reference AH/P504634/1). Please cite Mahlberg et al. (2016) when you use CLiC in your work.


Macroetym: a Command-Line Tool for Macro-Etymological Textual Analysis

Consider the set of words “kingly,” “royal,” and “regal.” The words are near-synonyms, but there are important distinctions between them, owing to their etymology: “kingly” is of Anglo-Saxon origin, while “royal” is descended from French, and “regal” from Latin. Macro-etymological text analysis quantifies the etymologies of every word in a text, and uses this as a proxy measurement of the tone, voice, genre, or level of discourse of the text. English texts with high proportions of Latinate words, for instance, are frequently non-fiction works, while those with high proportions of Germanic words are often works of fiction. Correlations like these also exist within a single literary work: Bildungsromans like James Joyce’s A Portrait of an Artist as a Young Man often begin with low proportions of Latinate words, and end with high proportions.

Macroetym is a command-line tool, written in Python, that provides verbose macro-etymological analyses of single texts, is capable of comparative analysis of multiple texts, and works for texts in any language that is widely represented in Wiktionary. It adheres to the Unix Philosophy, meaning that it produces machine-readable output, and is therefore interoperable with other command-line tools. When used in conjunction with a tool like chapterize, which breaks a novel into chapters, it can be used to identify changing language patterns over the narrative time of a novel or similar work.

To use it, simply type macroetym followed by the text file you want to analyze. Wildcard patterns (*.txt) can also be used to comparatively analyze a group of texts. To analyze Virginia Woolf’s Mrs Dalloway, use the command:

$ macroetym woolf-mrs-dalloway.txt --allstats

Which provides the output:

Anglo-Norman                                      7.23
Angloromani                                       0.03
Arabic                                            0.06
Aragonese                                         0.06
Dutch                                             0.29
Dutch, Middle (ca. 1050-1350)                     0.27
English, Old (ca. 450-1100)                      36.56
French                                            7.81
French, Middle (ca. 1400-1600)                    3.96
French, Old (842-ca. 1400)                       21.58
German                                            0.06
German, Middle Low                                0.12
... etc.

To compare the proportions of Latinate words among books in John Milton’s poem Paradise Lost, use the command:

$ macroetym paradise-lost-books/* --showfamilies Latinate        

Which provides the output:

          bk/book01.txt  bk/book02.txt  bk/book03.txt  bk/book04.txt
Latinate      52.622816      56.005313      52.644493      50.522588   

          bk/book05.txt  bk/book06.txt  bk/book07.txt  bk/book08.txt
Latinate      55.929858      56.608863       51.46886      54.492665   

          bk/book09.txt  bk/book10.txt  bk/book11.txt  bk/book12.txt  
Latinate      53.625632      54.745275      50.982633      52.195609  

Many more functions are available. See macroetym --help for more.

Pilot studies that use macroetym include:

Macroetym is free and open-source software. To download the program, report a bug, or contribute code to the project, visit the project’s GitHub repository.