Converted from a Word document
Writing often takes place or is displayed on a two dimensional surface, but many of the digital techniques for the representation of language reduce two dimensions to one. This reduction leads to many powerful tools in corpus linguistics, which depends heavily on patterns involving words appearing in linear sequences. However, it is widely acknowledged that language is not wholly captured by a purely sequential representation. As (Gross, 1997, p16) notes in the context of poetry: ‘Texts that are presented as spatial (rather than linear) arrangements in order to activate the visual composition on the page as an element of signification have a long tradition’.
More widely than poetry, layout in the two dimensional space of a single page can carry meaning – alignments both horizontal and vertical of lines of text, and placement of blocks of text in relation to images and diagrams are a key feature of multimodal documents (Bateman, 2008). Frameworks for such documents have been proposed by Bateman and others. Further areas where layout is essential, including comics and graphic novels (Bateman et al., 2017), have also been studied.
It is striking that although representing two dimensional structure in documents of many kinds is clearly relevant to the digital humanities, existing work has made very little use of the techniques of qualitative spatial representation that have been applied in artificial intelligence over more than the past two decades. This paper describes work currently in progress to apply these particular techniques as a means of representing some aspects of the two dimensional structure of poetry layout.
The idea of qualitative spatial representation (QSR) is that spatial relationships, such as
next to, alongside, bordering, overlapping, and many other topological notions, can be represented computationally using logic. An introduction to the technical foundations of QSR is provided by (Cohn & Renz, 2008). The motivation in artificial intelligence is that humans use common sense spatial concepts in everyday situations rather than the numerical coordinates which predominate in most computational representations of space. The origins of QSR go back to philosophical interests in an account of space fitting human experience, such as the theory of extensive connection proposed by (Whitehead, 1929).
To explain how QSR can be applied to the space of poetry in its printed form we will consider some examples. The following is the result of some standard image processing techniques applied an image of Southey’s
Cataract of Lodore printed in 1823. The text here occupies four pages but initially we only consider relationships between successive lines of text.
This poem is a well-known example of visual arrangement as the form follows the cascade of water: initially having a variety of directions before a long descent ending in progessively widening course as it reaches the bottom. Many related examples are known and described in (Gross, 1997) and (Hollander, 1975). Two further examples are given in Figure 2.
On the left of Figure 2 is Eavan Boland’s poem “CODE. An Ode to Grace Murray Hopper 1906-88 maker of a computer compiler and verifier of COBOL.” from (Boland, 2001) consists of four blocks in which lines start successively further to the right, interleaved with three blocks in which all lines are justified on the left. On the right of Figure 2 is Alasdair Gray’s poem
First of March 1990 (Gray, 2010, p128) consisting of six blocks of text sharing a roughly similar shape. In each block the lines end successively further to the left down the page, although the right hand ends do not display any easily identifiable regularity.
Although the examples have been presented visually, the reduction of poetry to simplified images does not give a computational means of comparing one poem to another. Given a corpus of tens of thousands of poems, how can the space of different shapes be understood? How can one query such a corpus for poems of a particular kind of shape? How could shapes be described, and how might one map changes to favoured shapes over time? These questions suggest a visual kind of distant reading (Moretti, 2005) but one we have begun to investigate using QSR rather than geometrical methods.
One basic QSR technique comes from the work of Allen (1983) in qualitative relationships between intervals of time. If we consider possible ways two intervals may relate, one answer is the 13 relationships indicated on the left in Figure 3. This shows 7 ways the uppermost interval of each pair relates to the lower one. The last 6 relations have inverse relations. Although the inverse of before might be called after, we use the initial letter of each of the 6 followed by “i” to indicate the inverse. The application of this scheme to a sequence of lines appears on the right in Figure 3.
This means the spatial arrangement can be represented by: di, di, di, e, e, e, d, d, d. Of course, this loses many features, such as the left-right and up-down symmetry, in this case. However it does capture the structure of: lines becoming shorter on each side, then continuing down the page at a fixed width and finally expanding on both sides.
We have developed prototype software by coding in Python which determines qualitative relationships between lines and between blocks of text. This uses standard image processing techniques to segment images of pages into text lines as rectangular regions. Qualitative relationships are then calculated from the positions of these regions.
In continuing work we are exploring other systems of spatial relationships, since the ones provided by Allen are only one example of many that are mentioned in (Cohn & Renz, 2008). We note that (Dubba et al., 2015) uses spatial relations between bounding boxes in video frames to detect patterns making up events. It is an exciting possibility that QSR can describe patterns making up visual poetic structure in an analogous way.