<?tei:SOF p2sase.odd ?>
<!-- $Id: p2sase.odd,v 1.8 1998/02/05 17:14:35 tei Exp $ -->
<!--*
    * $Log: p2sase.odd,v $
    * Revision 1.8  1998/02/05 17:14:35  tei
    * make examples parse
    *
    * Revision 1.7  98/01/28  11:09:58  cmsmcq
    * LB changes of January 1998
    * 
    * Revision 1.6  1994/03/27  21:47:19  msmcq
    * Correction of typos found by SJ, DB et al.
    * 
    * Revision 1.5  1994/03/16  03:29:41  msmcq
    * Changes as per JL, with some LB and TL.
    * 
    * Revision 1.4  1994/02/12  10:22:43  lou
    * reviions for P3
    * 
    * Revision 1.2  1993/09/16  19:01:31  msmcq
    * Minor SGML cleanup, add RCS log keyword
    * -->
<!-- Revisions:                                               -->
<!-- 8 Jan 98: LB : added ab element -->
<!-- 94-03-26 : MSM : corrections from SJ                     -->
<!-- 94-03-26 : MSM : disambiguate TERM, Q (> code, ident...) -->
<!-- 94-03-15 : MSM : changes as per LB, TL, JL               -->
<!-- 4 feb LB merged in anchor; revised and expanded          -->
<!-- 19 dec 93: LB: fixed an xref                             -->
<!-- 93-09-15 : MSM : minor SGML cleanup                      -->
<!-- 93-07-22 : DTL : more minor fixes                        -->
<!-- 93-07-12 : DTL : minor fixes                             -->
<!-- 93-07-08 : DTL : rewrite material on arbitrary           -->
<!-- segments from COse; exx from Shields "Dead Languages",   -->
<!-- refer to Pope ex in SApt, Sigmund ex in AIsp             -->
<div2 id=SASE><head>Blocks, Segments and Anchors</head>
 
<p>In this section, we define three general purposes elements which may be
used to mark and categorize both a span of text and a point within one.
These elements have several uses, most notably to provide elements which
can be given identifiers for use when aligning or linking to parts of a
document, as discussed elsewhere in this chapter.  They also provide a
convenient way of extending the semantics of the TEI markup scheme in a
theory-neutral manner, by providing for two neutral or <soCalled>anonymous</soCalled> elements to which the encoder can add any meaning not
supplied by other TEI defined elements.
 
<tagList>
<tagDesc tagDoc=ANCHOR>
<tagDesc tagDoc=SEG atts='part'>
<tagDesc tagDoc=ANONB atts="part">
</tagList>
 
These elements are all members of the class <ident
type=class>typed</ident>, and inherit from it the attributes
<att>type</att> and <att>subtype</att>:
 
<adList classDoc=TYPED atts='type subtype'>
 
<!-- Killed following example as insufficiently convincing -->
<!-- for reasons given in note. -->
<!-- Substituted references elsewhere and following discussion. -->
 
<!-- <p>For example, the <gi>seg</gi> tag may be used to -->
<!-- delimit the sequence of words at the beginning of a text -->
<!-- division that are highlighted in some way. -->
 
<!-- <note place=foot>The <gi>hi</gi> tag (see <xref -->
<!-- target=COHQHE>) may, of course, also be used in this case, -->
<!-- but the <att>type</att> attribute of the <gi>seg</gi> tag -->
<!-- makes it possible to specify the purpose of the -->
<!-- highlighting.</note> -->
 
<!-- David Shields, Dead Languages, 1990, p56 -->
<!-- <eg><![ CDATA [ -->
<!-- <div1 n=8> -->
<!-- <p><s><seg type='beginning of chapter' rend=caps> -->
<!-- So father's only</seg> -->
<!-- glory was the ballfield.</s> -->
<!-- ]]> -->
<!-- </eg> -->

<p>The <gi>anchor</gi> element may be thought of as an empty
<gi>seg</gi>, or as an artifice enabling an identifier to be attached
to any position in a text. Like the <gi>mileStone</gi> element
discussed in section <xref target=CORS>, it is useful where multiple
views of a document are to be combined, for example, when a logical
view based on paragraphs or verse lines is to be mapped on to a
physical view based on manuscript lines.  However, it differs from the
milestone and related elements in that the <gi>anchor</gi> element
should not be used to mark the start or end of an arbitrary zone
within a text, but only to mark an arbitrary point used for alignment,
or as the target of a spanning element such as those discussed in
section <xref target=PHAD>.
 
<!-- I think this is a really bizarro example -->
<!-- but havent been able to find  a better one (LB) -->
 
<p>For example, suppose that we wish to mark the end of the fifth word
following each occurrence of some term in a particular text, perhaps to
assist with some collocational analysis.  This can most easily be done
with the help of the <tag>anchor</tag> tag, as follows:
 
<!-- Vladimir Nabokov, Pnin, 1953, p14 of 1967 Avon pb reprinting -->
<eg><![ CDATA [
<!-- ... -->
English language.  Except for not very<anchor id=ENG1 >
<!-- ... -->
English at all at the time<anchor id=ENG2 >
<!-- ... -->
English was still full of flaws<anchor id=ENG3 >
<!-- ... -->
English.  This was revised by young<anchor id=ENG4>
]]>
</eg>
 
In  section <xref target="SACS1"> we discuss 
ways in which these <gi>anchor</gi>
points might be used to represent an alignment such as one
might get in a keyword-in-context concordance.

<!-- add more examples/ cross references --> 
 
<p>The <gi>seg</gi> element may be used at the encoder's discretion to
mark almost any segment of the text of interest for processing.  One use
of the element is to mark text features for which no appropriate markup
is otherwise defined, i.e. as a simple extension mechanism.  Another use
is to provide an identifier for some segment which is to be pointed at
by some other element, i.e. to provide a target, or a part of a target,
for a <gi>ptr</gi> or other similar element.
 
<p>Several examples of uses for the <gi>seg</gi> element are provided
elsewhere in these Guidelines. For example:
<list>
<item>as a means of marking segments significant in a metrical or
rhyming analysis (see section <xref target=VEME>)
<item>as a means of marking typographic lines in drama (see section
<xref target=DRBOD>) or title pages (see section <xref target=DSTITL>)
<item>as a means of marking prosody- or pause-defined units in
transcribed speech (see section <xref target=TSSASE>)
<item>as a means of marking linguistic or other analyses in a
theory-neutral manner (see chapter <xref target=AI> passim)
</list>
 
<p>In the following simple example, the <gi>seg</gi> element simply
delimits the extent of a stutter, a textual feature for which no
element is provided in these Guidelines.
 
<eg><![ CDATA [
<q>Don't say
<q><seg type=stutter>I-I-I</seg>'m afraid,</q>
Melvin, just say
<q>I'm afraid.</q></q>
]]>
</eg>
<!-- David Shields, Dead Languages, 1990, p10 -->
<!-- removed irrelevant tagging LB -->
 
The <gi>seg</gi> element is particularly useful for the mark-up of
linguistically significant constituents such as the phrases that may be
the output of an automatic parsing system.  This example also
demonstrates the use of the <att>id</att> attribute to carry an
identifier which other parts of a document may use to point to, or align
with:
 
<eg><![ CDATA [
<seg type=sentence id=BL0034>
  <seg type=phrase id=BL0034.1>Literate and illiterate speech</seg>
  <seg type=phrase id=BL0034.2>in a language like English</seg>
  <seg type=phrase id=BL0034.3>are plainly different.</seg>
</seg>
]]>
</eg>
<!-- Bloomfield, "Literate and Illiterate Speech", 1927   -->
<!-- removed irrelevant rend attribute -->
 
<p>As the above example shows, <gi>seg</gi> elements may be nested
directly within one another, to any degree of analysis considered
appropriate.  This is taken a little further in the following example,
where the <att>type</att> and <att>subtype</att> attributes have been
used to further categorise each word of the sentence (the <att>id</att>
attributes have been removed to reduce the complexity of the example):
 
<eg><![CDATA[
<seg type=sentence subtype=declarative>
  <seg type=phrase subtype=noun>
    <seg type=word subtype=adjective>Literate</seg>
    <seg type=word subtype=conjunction>and</seg>
    <seg type=word subtype=adjective>illiterate</seg>
    <seg type=word subtype=noun>speech</seg>
    </seg>
  <seg type=phrase subtype=preposition>
    <seg type=word subtype=preposition>in</seg>
    <seg type=word subtype=article>a</seg>
    <seg type=word subtype=noun>language</seg>
    <seg type=word subtype=preposition>like</seg>
    <seg type=word subtype=noun>English</seg>
    </seg>
  <seg type=phrase subtype=verb>
    <seg type=word subtype=verb>are</seg>
    <seg type=word subtype=adverb>plainly  </seg>
    <seg type=word subtype=adjective>different</seg>
    </seg>
  <seg type=punct>.</seg>
  </seg>
]]>
</eg>
 
<p>(The example values shown are chosen for simplicity of comprehension,
rather than verisimilitude).  It should also be noted that specialized
segment elements are defined in section <xref target=AILC> to facilitate
this particular kind of analysis.  These allow for the explicit mark up
of units called <term>s-units</term>, <term>clauses</term>,
<term>phrases</term>, <term>words</term>, <term>morphemes</term> and
<term>characters</term>, which may be felt preferable to the more
generic approach typified by use of the <gi>seg</gi> element.  Using
these, the first phrase above might be encoded simply as
 
<eg>
<![ CDATA [
  <phr type=noun>
    <w type=adjective>Literate</w>
    <w type=conjunction>and</w>
    <w type=adjective>illiterate</w>
    <w type=noun>speech</w>
  </phr>
]]>
</eg>
 
Note the way in which the <att>type</att> attribute of these specialized
elements now carries the value carried by the <att>subtype</att>
attribute of the more general <gi>seg</gi> element.  For an analysis not
using these traditional linguistic categories however, the <gi>seg</gi>
element provides a simple but powerful mechanism.
 
<p>In language corpora and similar material, the <gi>seg</gi> element
may be used to provide an end-to-end segmentation as an alternative to
the more specific <gi>s</gi> element proposed in chapter <xref
target=AILC> for the mark-up of orthographic sentences, or
<term>s-units</term>.  However, it may be more useful to use the
<gi>s</gi> element for this purpose, since this means that the
<gi>seg</gi> element can then be used to mark both features within
s-units and segments composed of s-units, as in the following example:
<note place=foot>See section <xref target=AISP>, where the text from
which this fragment is taken is analyzed.</note>
 
<eg><![ CDATA [
<seg id=S1S3 type='narrative unit'>
<s id=S1>Sigmund, the
  <seg type=patronymic>son of Volsung</seg>,
   was a king in Frankish country.</s>
<s id=S2>Sinfiotli was the eldest of his sons.</s>
<s id=S3><!-- ... --></s>
</seg>
]]>
</eg>
 
<p>Like other elements, the <gi>seg</gi> tag must be properly enclosed
within other elements.  Thus, a single <gi>seg</gi> element can be used
to group together words in different sentences only if the sentences are
not themselves tagged.  The first of the following two encodings is
legal, but the second is not.
 
<!-- Made up example -->
<eg rend=erroneous><![ CDATA [
Give me <seg type=phrase>a dozen.  Or two or three.</seg>
 
<!-- Illegal! -->
<s>Give me <seg type=phrase>a dozen.</s>
<s>Or two or three.</s></seg>
]]>
</eg>
 
<p>The <att>part</att> attribute may be used as one simple method of
overcoming this restriction:
 
<eg><![ CDATA [
<s>Give me <seg type=phrase part=I>a dozen.</seg></s>
<s><seg part=F>Or two or three.</seg></s>
]]>
</eg>
 
Another solution is to use the <gi>join</gi> element discussed in
section <xref target=SAAG>; this requires that each of the <gi>seg</gi>
elements be given an identifier.  For further discussion of this generic
encoding problem see also chapter <xref target=NH>.
 
<p>The <gi>seg</gi> element has the same content as a paragraph in
prose:  it can therefore be used to group together consecutive sequences
of <ident type=class>inter</ident> class elements, such as lists,
quotations, notes, stage directions etc. as well as to contain sequences
of phrase-level elements.  It cannot however be used to group together
sequences of paragraphs or similar text units such as verse lines; for
this purpose, the encoder should use intermediate pointers, as described
in section <xref target=SAPTIP> or the methods described in section
<xref target=SAAG>. 
 
<!-- deleted (mistagged?) example of how not to do it LB  -->
<!-- M.F.K. Fisher, "I was really very hungry", As They       -->
<!-- Were, 1983, p41                                          -->
<!-- <eg><![ CDATA [ -->
<!-- Illegal! -->
<!-- <seg> -->
<!-- <p> -->
<!--  -->
<!-- <q who=MFKF><foreign lang=FR>Mon Dieu!</foreign> All for -->
<!-- me?</q> I peered at her.  She nodded, her discretion quite -->
<!-- gone now and a look of ecstatic worry on her pale face and -->
<!-- eyes and lips.  </p> <p> There were at least eight dishes. -->
<!-- I felt almost embarrassed, and sat for a minute looking -->
<!-- weakly at the fork and spoon in my hand.  </p> </seg> ]]> -->
<!-- </eg> -->
 
 
It is particularly important that the encoder provide a clear
description of the principles by which a text has been segmented, and
the way in which that segmentation is represented.  This should include
a description of the method used and the significance of any
categorization codes.  The description should be provided as a series of
paragraphs within the <gi>segmentation</gi> element of the encoding
description in the TEI header, as described in section <xref
target=HD53>.
 
<!-- EDITORS: I can't readily locate where you have said      -->
<!-- this; please supply any missing details.  This problem   -->
<!-- also occurs elsewhere.  (DTL)                            -->
<!-- done. Lou -->
 
<p>The remainder of this chapter contains a number of examples of the use
of the <gi>seg</gi> element simply to provide an element to which an
identifier may be attached, for example so that another segment may be
linked or related to it in some way.
</p><p>
The <gi>ab</gi> (anonymous block) 
element performs a similar function to that of the <gi>seg</gi> element, 
but is used for portions of the
text which occur not within paragraphs or other component-level
elements, but at the component level themselves.  It may be used, for
example, to tag the canonical verse divisions of Biblical texts:
<eg>
<![CDATA [<div1 type='book' n='Gen'>
<head>The First Book of Moses, Called</head>
<head type='main'>Genesis</head>
<div2 type='chapter' n='1'>
<ab n='1'>In the beginning God created the heaven and the
earth.</ab>
<ab n='2'>And the earth was without form, and void; and darkness
<hi>was</hi> upon the face of the deep.  And the Spirit of God
moved upon the face of the waters.</ab>
<ab n='3'>And God said, Let there be light:  and there was
light.</ab>
<!-- ... -->
]]>
</eg>
<!--* Authorised Version *-->
</p><p>
In other cases, where the text clearly indicates paragraph divisions
containing one or more verses, the <gi>p</gi> element may be used to
tag the paragraphs, and the <gi>seg</gi> element used to subdivide
them. The <gi>ab</gi> element is provided as an alternative to the
<gi>p</gi> element; it may <emph>not</emph> be used  within 
paragraphs. The <gi>seg</gi> element, by contrast, may appear only
within and not between paragraphs (or anonymous block elements).<eg>
<![CDATA [<div1 type='book' n='Gen'><head>Das Erste Buch Mose.</head>
<div2 type='chapter' n='1'>
<p>
<seg n='1'>Am Anfang schuff Gott Himel vnd Erden.</seg>
<seg n='2'>Vnd die Erde war w&uuml;st vnd leer / vnd es war
finster auff der Tieffe / Vnd der Geist Gottes schwebet auff
dem Wasser.</seg>
</p>
<p>
<seg n='3'>Vnd Gott sprach / Es werde Liecht / Vnd es ward
Liecht.</seg>
<!-- ... -->
]]>
</eg>
<!--* Martin Luther [tr].  Die gantze Heilige Schrifft Deudsch.
Wittenberg 1545.  Letzte zu Luthers Lebzeiten erchienene Ausgabe, hsg.
Hans Volz unter Mitarbeit von Heinz Blanke. Textredaktion Friedrich Kur.
M&uuml;nchen:  Rogner & Bernhard, 1972. *-->
</p><p>
The <gi>ab</gi> element is also useful for marking dramatic speeches
when it is not clear whether the speech is to be regarded as prose or
verse.  If, for example, am encoder does not wish to express an opinion
as to whether the opening lines of Shakespeare's 
<title>The Tempest</title> are to be
regarded as prose or as verse, they might be tagged as follows:
<eg><![CDATA [<div1 type=act n='I'> <div2 type=scene n='1'> 
<head rend=italic>Actus primus, Scena prima.</head> 
<stage type=setting rend=italic> A tempestuous noise of Thunder and Lightning heard:  Enter a Ship-master, and a Boteswaine.</stage>
<sp><speaker>Master.</speaker>
<ab>Bote-swaine.</ab></sp> 
<sp><speaker>Botes.</speaker>
<ab>Heere Master: What cheere?</ab></sp> 
<sp><speaker>Mast.</speaker>
<ab> Good: Speake to th' Mariners: fall too't, yarely, or 
we run our selues a ground, bestirre, bestirre. 
<stage type=move>Exit.</stage></ab></sp> 
<stage type=move>Enter Mariners.</stage> 
<sp><speaker>Botes.</speaker> 
<ab>Heigh my hearts, cheerely, cheerely my harts: 
yare, yare: Take in the toppe-sale: Tend to th' Masters 
whistle: Blow till thou burst thy winde, if roome e-nough.</ab></sp>   
]]></eg>  See further section  6.11.2, "Core Tags for Drama," on p. 212,
and section 10.2.4, "Speech Contents," on p. 285).</p>

<p>These elements are formally defined as follows:
 
<dtdFrag id=DSASA n='Blocks, Segments and Anchors'>
<tagDecl tagDoc=ANCHOR>
<tagDecl tagDoc=SEG>
<tagDecl tagDoc=ANONB>
</dtdFrag>
 
<?tei:EOF p2sase.odd ?>
