<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title type="main">TEI by Example</title>
        <title type="sub">Module 4: Poetry</title>
        <author xml:id="EV">Edward Vanhoutte</author>
        <editor xml:id="RvdB">Ron Van den Branden</editor>
        <editor xml:id="MT">Melissa Terras</editor>
        <sponsor>Association for Literary and Linguistic Computing (ALLC)</sponsor>
        <sponsor>Centre for Data, Culture and Society, University of Edinburgh, UK</sponsor>        <sponsor>Centre for Digital Humanities (CDH), University College London, UK</sponsor>
        <sponsor>Centre for Computing in the Humanities (CCH), King’s College London, UK</sponsor>
        <sponsor>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</sponsor>
        <funder>
          <address>
            <addrLine>Centre for Scholarly Editing and Document Studies (CTB)</addrLine>
            <addrLine>Royal Academy of Dutch Language and Literature</addrLine>
            <addrLine>Koningstraat 18</addrLine>
            <addrLine>9000 Gent</addrLine>
            <addrLine>Belgium</addrLine>
          </address>
          <email>ctb@kantl.be</email>
        </funder>
        <principal>Edward Vanhoutte</principal>
        <principal>Melissa Terras</principal>
      </titleStmt>
      <publicationStmt>
        <publisher>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</publisher>
        <distributor>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</distributor>
        <pubPlace>Gent</pubPlace>
        <address>
          <addrLine>Centre for Scholarly Editing and Document Studies (CTB)</addrLine>
          <addrLine>Royal Academy of Dutch Language and Literature</addrLine>
          <addrLine>Koningstraat 18</addrLine>
          <addrLine>9000 Gent</addrLine>
          <addrLine>Belgium</addrLine>
        </address>
        <availability status="free">
          <p>Licensed under a <ref target="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution ShareAlike 3.0 License</ref>
                    </p>
        </availability>
        <date when="2010-07-09">9 July 2010</date>
      </publicationStmt>
      <seriesStmt>
        <title>TEI by Example.</title>
        <respStmt>
          <name>Edward Vanhoutte</name>
          <resp>editor</resp>
        </respStmt>
        <respStmt>
          <name>Ron Van den Branden</name>
          <resp>editor</resp>
        </respStmt>
        <respStmt>
          <name>Melissa Terras</name>
          <resp>editor</resp>
        </respStmt>
      </seriesStmt>
      <sourceDesc>
        <p>Digitally born</p>
      </sourceDesc>
    </fileDesc>
    <encodingDesc>
      <projectDesc>
        <p>TEI by Example offers a series of freely available online tutorials walking individuals through the different stages in marking up a document in TEI (Text Encoding Initiative). Besides a general introduction to text encoding, step-by-step tutorial modules provide example-based introductions to eight different aspects of electronic text markup for the humanities. Each tutorial module is accompanied with a dedicated examples section, illustrating actual TEI encoding practise with real-life examples. The theory of the tutorial modules can be tested in interactive tests and exercises.</p>
      </projectDesc>
    </encodingDesc>
    <profileDesc>
      <langUsage>
        <language ident="en-GB">en-GB</language>
      </langUsage>
    </profileDesc>
    <revisionDesc>
      <change when="2020-06-16" who="#RvdB">technical revision</change>
      <change when="2010-07-09" who="#RvdB">release</change>
      <change when="2010-07-08" who="#EV">revision and added 2.3. grouping structures and 6.2. dedications</change>
      <change when="2007-10-22" who="#EV">added 6.2 Acrostics</change>
      <change when="2007-10-22" who="#EV">
                <list>
                    <item>-added new prose with internal rhyme under 3.1</item>
                    <item>inserted enjambements under 4.4 and rewrote that section</item>
                    <item>edited summary of 4</item>
                    <item>added summary to 5</item>
                    <item>removed <q>suggestions</q> div</item>
                </list>
            </change>
      <change when="2007-10-11" who="#EV">correction of text</change>
      <change when="2007-10-11" who="#EV">revision</change>
      <change when="2007-09-25" who="#EV">revision</change>
      <change when="2007-05-22" who="#RvdB">revision</change>
    </revisionDesc>
  </teiHeader>
  <text xml:id="TBED04v00" type="tutorials">
    <body>
            <div xml:id="advanced">
        <head>Advanced Encoding</head>
        <div xml:id="components">
          <head>Components of the Verse Line</head>
          <p>It is often convenient for various kinds of analysis to encode further subdivisions of verse lines. This can be done using the <gi>seg</gi> element which contains any arbitrary phrase-level unit of text (including other <gi>seg</gi> elements).</p>
          <p>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:
            <figure xml:id="example30">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <lg 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 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>
              </egXML>
              <head type="legend">Identifying low-level structures with <gi>seg</gi>.</head>
            </figure>
          </p>
        </div>
        <div xml:id="dedication">
          <head>Dedications</head>
          <p>If the poem is encoded as an <gi>lg</gi>, the TEI doesn’t have an <soCalled>out of the box</soCalled> 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 <gi>head</gi> and use its <att>type</att> attribute for specifying its function as a <val>dedication</val>:
            <figure xml:id="example31">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <lg 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>
              </egXML>
              <head type="legend">Encoding a dedication following a heading as a special <gi>head</gi>.</head>
            </figure>
          </p>
          <p>The second option is to encode the poem as a <tag>div type="poem"</tag> instead of an <tag>lg type="poem"</tag>, and consider the title as an anonymous block <gi>ab</gi> with a value of <val>dedication</val> for its <att>type</att> attribute.
            <figure xml:id="example32">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <div 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>
              </egXML>
              <head type="legend">Encoding a dedication after a heading as <gi>ab</gi> inside <gi>div</gi>.</head>
            </figure>
          </p>
        </div>
        <div xml:id="acrostics">
          <head>Acrostics</head>
          <p>One example of the use of the <gi>seg</gi> 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 <title level="a">An Acrostic</title>, the first letters of each line of verse together form the first word of the first line: <q>Elizabeth</q>.
            <figure xml:id="example33">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <lg>
                  <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>
              </egXML>
              <head type="legend">A possible encoding of an acrostic.</head>
            </figure>
          </p>
        </div>
      </div>
        </body>
  </text>
    <!-- 
        $Date$
        $Id$  -->
</TEI>