Module 4: Poetry

6. Advanced Encoding

6.1. Components of the Verse Line

It is often convenient for various kinds of analysis to encode further subdivisions of verse lines. This can be done using the <seg> element which contains any arbitrary phrase-level unit of text (including other <seg> elements).

The third and the fourth stanzas of our poem, for instance, contain lines which include two items each, except for line 13. The appropriate encoding could be the following:

<lg xmlns="http://www.tei-c.org/ns/1.0" type="stanza" n="3">
<l>
<seg type="item">Paper towels</seg>
/
<seg type="item">garbage bags</seg>
</l>
<l>
<seg type="item">Pasta sauce</seg>
and
<seg type="item">Parmesan</seg>
</l>
<l>
<seg type="item">Pumpkin seed</seg>
and
<seg type="item">olive oil</seg>
</l>
</lg>
<lg xmlns="http://www.tei-c.org/ns/1.0" type="stanza" n="4">
<l>
<seg type="item">Cheesy crisps</seg>
and
<seg type="item">favourite mags</seg>
</l>
<l>
<seg type="item">Kidney beans (1 large can)</seg>
</l>
<l>
<seg type="item">Cling film</seg>
and
<seg type="item">kitchen foil</seg>
</l>
</lg>
Example 30. Identifying low-level structures with <seg>.

6.2. Dedications

If the poem is encoded as an <lg>, the TEI doesn’t have an “out of the box” solution to deal with dedications which appear under the title of the poem. In the case a dedication needs to be encoded, there are two viable options. The first one is to consider the dedication as a <head> and use its @type attribute for specifying its function as a "dedication":

<lg xmlns="http://www.tei-c.org/ns/1.0" type="poem">
<head>Shopping</head>
<head type="dedication">To my sweetest son</head>
<lg type="stanza" n="1">
<l n="1">Poppadom</l>
<l n="2">Oatmeal</l>
<l n="3">Bubble gum</l>
<l n="4">Cut of veal</l>
</lg>
<lg type="stanza" n="2">
<l n="5">Mince for pie</l>
<l n="6">Frozen peas</l>
<l n="7">Video for Guy</l>
<l n="8">Selection of teas</l>
</lg>
<lg type="stanza" n="3">
<l n="9">Paper towels​/garbage bags</l>
<l n="10">Pasta sauce and Parmesan</l>
<l n="11">Pumpkin seed and olive oil</l>
</lg>
<lg type="stanza" n="4">
<l n="12">Cheesy crisps and favourite mags</l>
<l n="13">Kidney beans (1 large can)</l>
<l n="14">Cling film and kitchen foil</l>
</lg>
</lg>
Example 31. Encoding a dedication following a heading as a special <head>.

The second option is to encode the poem as a <div type="poem"> instead of an <lg type="poem">, and consider the title as an anonymous block <ab> with a value of "dedication" for its @type attribute.

<div xmlns="http://www.tei-c.org/ns/1.0" type="poem">
<head>Shopping</head>
<ab type="dedication">To my sweetest son</ab>
<lg type="stanza" n="1">
<l n="1">Poppadom</l>
<l n="2">Oatmeal</l>
<l n="3">Bubble gum</l>
<l n="4">Cut of veal</l>
</lg>
<lg type="stanza" n="2">
<l n="5">Mince for pie</l>
<l n="6">Frozen peas</l>
<l n="7">Video for Guy</l>
<l n="8">Selection of teas</l>
</lg>
<lg type="stanza" n="3">
<l n="9">Paper towels​/garbage bags</l>
<l n="10">Pasta sauce and Parmesan</l>
<l n="11">Pumpkin seed and olive oil</l>
</lg>
<lg type="stanza" n="4">
<l n="12">Cheesy crisps and favourite mags</l>
<l n="13">Kidney beans (1 large can)</l>
<l n="14">Cling film and kitchen foil</l>
</lg>
</div>
Example 32. Encoding a dedication after a heading as <ab> inside <div>.

6.3. Acrostics

One example of the use of the <seg> element for further advanced analysis is the following proposal to signal the presence of an acrostic in a poem. In this poem by Edgar Allan Poe, entitled “An Acrostic,” the first letters of each line of verse together form the first word of the first line: “Elizabeth.”

<lg xmlns="http://www.tei-c.org/ns/1.0">
<l>
<seg type="acros" rend="acros​('ELIZABETH', 1)">E</seg>
lizabeth it is in vain you say</l>
<l>"
<seg type="acros" rend="acros​('ELIZABETH', 2)">L</seg>
ove not" - thou sayest it in so sweet a way:</l>
<l>
<seg type="acros" rend="acros​('ELIZABETH', 3)">I</seg>
n vain those words from thee or L​.E.L.</l>
<l>
<seg type="acros" rend="aros​('ELIZABETH', 4)">Z</seg>
antippe​'s talents had enforced so well:</l>
<l>
<seg type="acros" rend="acros​('ELIZABETH', 5)">A</seg>
h! if that language from thy heart arise,</l>
<l>
<seg type="acros" rend="acros​('ELIZABETH', 6)">B</seg>
reath it less gently forth - and veil thine eyes.</l>
<l>
<seg type="acros" rend="acros​('ELIZABETH', 7)">E</seg>
ndymion, recollect, when Luna tried</l>
<l>
<seg type="acros" rend="acros​('ELIZABETH', 8)">T</seg>
o cure his love - was cured of all beside -</l>
<l>
<seg type="acros" rend="acros​('ELIZABETH', 9)">H</seg>
is follie - pride - and passion - for he died.</l>
</lg>
Example 33. A possible encoding of an acrostic.