<!--* $Id: p2ai.odd,v 1.9 1998/01/31 19:18:50 tei Exp $ *-->
<!--*
    * $Log: p2ai.odd,v $
    * Revision 1.9  1998/01/31 19:18:50  tei
    * fix log keyword, use public identifier
    *
    *-->
<!-- Revisions:                                               -->
<!-- 26 Feb: re-ordered and tidied prose a bit -->
<!-- 19 dec: added missing </term>, dtdfra->dtdfrag           -->
<!-- 93-11-26 : MSM : minor revisions, add some text on atts  -->
<!-- 93-11-23 : MSM : point to ailc, not aila                 -->
<!-- 93-11-23 : MSM : add section (stub) on attributes        -->
<!-- 1993-11-23 : CMSMcQ : revision.  Clean up invocation,    -->
<!--                       restore analysis class             -->
<!-- 93-07-05 :  DTD :  Remove references to copying          -->
<!-- mechanisms (moved to SA chapter}.  Move definitions of   -->
<!-- equiv=, exclude=, and select = attributes to SA chapter  -->
<!-- (so as to go along with other global attributes defined  -->
<!-- that chapter).  Change reference to feature-value pair   -->
<!-- tags to span and interpretation tags (section AIsp).     -->
<!-- Add reference to simple linguistic analysis tags         -->
<!-- (section AIla).  Capitalize words in < head >. Add       -->
<!-- footnote regarding attribution.                          -->

<div1 id="AI" n="15"><head>Simple Analytic Mechanisms</head>

<p>This chapter describes a tag set for associating simple analyses and
interpretations with text elements.  We use the term
<term>analysis</term> here to refer to any kind of semantic or
syntactic interpretation which an encoder wishes to attach to all or
part of a text. Examples discussed in this chapter include familiar
linguistic categorizations (such as <q>clause</q>, <q>morpheme</q>,
<q>part-of-speech</q> etc.) and  characterizations of narrative
structure (such as <q>theme</q>, <q>reconciliation</q> etc.). The
mechanisms presented in this chapter offer simpler but less powerful
than those described in chapter <ptr target="FS">.


<!-- <note place=foot>Most of the material in this chapter was -->
<!-- first prepared for inclusion in other chapters; the -->
<!-- <gi>span</gi> tag was originally developed for inclusion in -->
<!-- chapter <ptr target=CO>, and the discussion of simple -->
<!-- linguistic annotation was written originally for chapter -->
<!-- <ptr target=CC>.  The present chapter was assembled and -->
<!-- prepared by D. Terence Langendoen.</note> --></p>

<p>Section <ptr target="AIlc"> introduces a tag set for characterizing
text segments according to the familiar linguistic categories of
<term>sentence</term> or <term>s-unit</term>, <term>clause</term>,
<term>phrase</term>, <term>word</term>, <term>morpheme</term>, and
<term>character</term>. These elements represent special cases of the
generic <gi>seg</gi> element described in section <ptr target="SAse">.</p>

<p>Section <ptr target="AIatts"> introduces an additional global
attribute  which allows passages of text to be associated with
specialised SGML elements  representing their interpretation.
<!-- , by pointing either from the text to -->
<!-- the interpretation, or from the interpretation to thetext. -->
These <socalled>interpretative</socalled> elements (<gi>span</gi> and
<gi>interp</gi>) are described in detail in section <ptr
target="AIsp">.
They  allow the encoder to specify an analysis as a series of names and
associated values,<note place="foot">Or, as they are widely known,
<term>attribute-value pairs</term>; this term should not be confused,
however, with SGML attributes and their values, which are similar in
concept but distinct in their formal definitions.</note> each such pair
being linked to one or more stretches of text, either directly, in the
case of spans, or indirectly, in the case of interpretations.</p>

<p>Finally section <ptr target="AIla"> revisits the topic of linguistic
analysis, and illustrates how these interpretative mechanisms may be
used to associate simple linguistic analysis with text segments.</p>


<p>The following DTD fragments show the overall organization of the
class of analytic elements discussed in the remainder of this chapter.
File <term>teiana2.ent</term> defines the additional global attribute
made available by this tag set.

<eg id=daient>
<![ CDATA [
<!-- 15:  Modifications to TEI class system for
analysis     -->
<!-- ... declarations from section 15.2                       -->
<!--     (Global attribute for analysis)                      -->
<!--     go here ...                                          -->
]]>
</eg>


<!-- Reference to global analytic attributes omitted.  (why?  -->
<!-- restored by msm)                                         --></p>

<p>File <term>teiana2.dtd</term> contains declarations for elements
used to represent simple analyses or interpretations of portions of a
text.

<eg id=dai>
<![ CDATA [
<!-- 15:  Simple analytic mechanisms                          -->
 <!-- Text Encoding Initiative: Guidelines for Electronic      -->
<!-- Text Encoding and Interchange. Document TEI P3, 1994.    -->

<!-- Copyright (c) 1994 ACH, ACL, ALLC. Permission to copy    -->
<!-- in any form is granted, provided this notice is          -->
<!-- included in all copies.                                  -->

<!-- These materials may not be altered; modifications to     -->
<!-- these DTDs should be performed as specified in the       -->
<!-- Guidelines in chapter "Modifying the TEI DTD."           -->

<!-- These materials subject to revision. Current versions    -->
<!-- are available from the Text Encoding Initiative.         -->

<!-- We declare the various elements, group by group.         -->

<!-- ... declarations from section 15.3                       -->
<!--     (Spans)                                              -->
<!--     go here ...                                          -->
<!-- ... declarations from section 15.1                       -->
<!--     (Linguistic Segment Categories)                      -->
<!--     go here ...                                          -->
]]>
</eg>
</p>

<p>This tag set is selected as described in <ptr target="STin">; in a
document which uses the markup described in this chapter, the document
type declaration should contain the following declaration of the entity
<term>TEI.analysis</term>, or an equivalent one:

<eg>
<![ CDATA [
<!ENTITY % TEI.analysis 'INCLUDE'>
]]>
</eg>

The entire document type declaration for a document using this
additional tag set together with that for linking and alignment and the
base tag set for prose might look like this:

<eg>
<![ CDATA [
 <!DOCTYPE TEI.2 PUBLIC "-//TEI P3//DTD Main Document Type//EN" "tei2.dtd" [
    <!ENTITY TEI.prose    'INCLUDE' >
    <!ENTITY TEI.linking  'INCLUDE' >
    <!ENTITY TEI.analysis 'INCLUDE' >
 ]>
]]>
</eg>
<!--* $Id: p2ailc.odd,v 1.7 1998/01/29 21:43:46 tei Exp $ *-->
<!--*
    * $Log: p2ailc.odd,v $
    * Revision 1.7  1998/01/29 21:43:46  tei
    * fix typos in eg
    *
    * Revision 1.6  1998/01/28 11:23:15  cmsmcq
    * LB changes of Jan 1998, and add RCS kyewords
    *
    *-->
<!-- Revisions:                                               -->
<!-- 5 Jan 98 : LB : fixed typo in eg -->
<!-- 93-11-26 : MSM :  minor improviements\                   -->
<!-- 93-11-23 : MSM : fix sgml syntax slips                   -->
<!-- 93-11-23 : MSM : revise (substantially)                  -->
<!-- 93-07-05 : DTL : Make file.                              -->

<div2 id=AIlc><head>Linguistic Segment Categories</head>

<p>In this section we introduce specialized <term>linguistic segment
category</term> elements which may be used to represent the segmentation of
a text into the traditional linguistic categories of
<term>sentence</term>, <term>clause</term>, <term>phrase</term>,
<term>word</term>, <term>morpheme</term>, and
<term>characters</term>.

<list type=gloss>
<label><gi>s</gi></label>
<item>contains a sentence-like division of a text.</item>
<label><gi>cl</gi></label>
<item>represents a grammatical clause.</item>
<label><gi>phr</gi></label>
<item>represents a grammatical phrase.</item>
<label><gi>w</gi></label>
<item>represents a grammatical (not necessarily orthographic) 
word.
Attributes include:
<list type=gloss>
<label><att>lemma</att></label>
<item>identifies the word's lemma (dictionary entry form).</item>
</list>
</item>
 <!-- rename lemma as baseform? -->
<label><gi>m</gi></label>
<item>represents a grammatical morpheme.
Attributes include:
<list type=gloss>
<label><att>baseform</att></label>
<item>identifies the morpheme's base form.</item>
</list>
</item>
<label><gi>c</gi></label>
<item>represents a character.</item>
</list>


<p>As members of the <ident type=class>seg</ident> class, these
elements share the following attributes:

<list type=gloss>
<label><att>type</att></label>
<item>characterizes the type of segment.</item>
<label><att>function</att></label>
<item>characterizes the function of the segment.</item>
</list>

<p>The <gi>s</gi> element may be used simply to segment a text
end-to-end  into a series of non-overlapping segments, referred to here
and elsewhere as <term>s-units</term>, or <term>sentences</term>.

<eg> <![ CDATA [
<p>
<s>Nineteen fifty-four, when I was eighteen years old,
is held to be a crucial turning point in the history of
the Afro-American  --- for the U.S.A. as a whole --- the
year segregation was outlawed by the U.S. Supreme Court.</s>
<s>It was also a crucial year for me because on June 18,
1954, I began serving  a sentence in state prison for
possession of marijuana.</s>
]]>
</eg>
<!-- Eldridge Cleaver, Soul on Ice (first para of first    -->
<!-- letter from prison)                   -->

The <gi>s</gi>may be thought of as  providing an abbreviated version of
the tag <tag>seg type='s-unit'</tag>, with the important additional
proviso that (unlike <gi>seg</gi> elements) <gi>s</gi> elements may not
be nested within each other. The <att>type</att> attribute of the
<gi>s</gi> element corresponds to the <att>subtype</att> attribute on
the <gi>seg</gi> element, that is, a tag <tag>s type='xxx'</tag> should
be thought of as synonymous with a tag <tag>seg type='s-unit'
subtype='xxx'</tag>.  Similar considerations apply to the  <gi>cl</gi>
and <gi>phr</gi> elements , which  can be thought of as short for
<tag>seg type=clause</tag> and <tag>seg type=phrase</tag>,
respectively.

<p>The <gi>s</gi> element may be further subdivided into
<term>clauses</term>, marked with the <gi>cl</gi> element,
as in the following example:

<eg>
<![ CDATA [
<p>
<s><cl>It was about the beginning of September, 1664,
    <cl>that I, among the rest of my neighbours,
      heard in ordinary discourse
      <cl>that the plague was returned again
        in Holland;
      </cl>
    </cl>
  </cl>
  <cl>for it had been very violent there, and
    particularly at Amsterdam and Rotterdam,
    in the year 1663,</cl>
  <cl>whither,
    <cl>they say,</cl>
    it was brought,
    <cl>some said</cl>
    from Italy, others from the Levant,
    among some goods
    <cl>which were brought home
    by their Turkey fleet;</cl>
  </cl>
  <cl>others said it was brought from Candia;
    others from Cyprus.
  </cl>
</s>
<s><cl>It mattered not
    <cl>from whence it came;</cl>
  </cl>
  <cl>but all agreed
    <cl>it was come into Holland again.</cl>
  </cl>
</s>
</p>
]]>
</eg>

<!-- Defoe, Journal of the Plague Year -->

<p>Clauses may be further divided into <gi>phr</gi> elements in the same
way. A text may be segmented directly into clauses, or into
phrases, with no need to include segmentation at a higher level as well.

<p>For verse texts, the overlapping of metrical and syntactic structure
requires that special care be given to representing both using the SGML
element hierarchy. One simple approach is to split the syntactic phrases
into fragments when they cross verse boundaries, reuniting them either
with the <att>part</att> attribute:

<eg>
<![ CDATA [
<div type=stanza>
<l><cl part=i>Tweedledum and Tweedledee</cl></l>
<l><cl part=f>Agreed to have a battle;</cl></l>
<l><cl part=i>For Tweedledum said
  <cl part=i>Tweedledee</cl></cl></l>
<l><cl part=f><cl part=f>Had spoiled his
  nice new rattle.</cl></cl></l>
<div type=stanza>
<l><cl part=i>Just then flew down a monstrous crow,</cl></l>
<l><cl part=f>As black as a tar barrel;</cl></l>
<l><cl part=i>Which frightened both the heroes so,</cl></l>
<l><cl part=f><cl>They quite forgot their quarrel.</cl></cl></l>
</div>
]]>
</eg>
<!-- Lewis Carroll, Through the Looking Glass, ch4 -->

Another approach is to use the <att>next</att> and <att>prev</att>
attributes defined in the additional tag set for linking (chapter <ptr
target=SA>):

<eg>
<![ CDATA [
<div type=stanza>
<l>...
<l><cl id=c3 next=c5 part=i>For Tweedledum said
  <cl id=c4 next=c6 part=i>Tweedledee</cl></cl></l>
<l><cl id=c5 prev=c3 part=f>
  <cl id=c6 prev=c4 part=f>
   Had spoiled his nice new rattle.</cl></cl></l>
</div>
]]>
</eg>

Other methods are also possible; for discussion, see chapter <ptr
target=NH>.

<p>The <att>type</att> attribute on linguistic segment categories can
be used to provide additional interpretative information about the
category. The <att>function</att> attribute on the <gi>cl</gi> and
<gi>phr</gi> elements can be used to provide additional information
about the function of the category. Legal values for these
two attributes are not defined by these Guidelines, but should be
documented in the <gi>segmentation</gi> element of the
<gi>encodingDesc</gi> element within the document's header.
A general approach to the encoding of linguistic categories assigned to
parts of a text is discussed in section <ptr target=AIla> below.

<p>Using traditional terminology, these attributes provide a convenient
way of specifying, for example, that the clause <mentioned>from whence it
came</mentioned> is a relative clause modifying another, or that  the
phrase <mentioned>by the U.S. Supreme Court</mentioned>  is a prepositional
post-modifier:


<eg>
<![ CDATA [
<cl>It mattered not
  <cl type='relative' function='clause modifier'>
   from whence it came;</cl></cl>

<phr type=NP>the year
  segregation</phr>
 <phr>was outlawed</phr>
 <phr type=PP function='postmodifier (agent)'>
  by the U.S. Supreme Court.</phr>
]]>
</eg>


<p>Segmentation into clauses and phrases can, of course, be combined.
To make such encodings easier to read,  the segmentation
tags can begin new lines, and be indented according to their degree of
nesting, thus:

<eg><![ CDATA [
<p>
<cl type='finite declarative' function='independent'>
 <phr type=NP function='subject'>Nineteen fifty-four,
  <cl type='finite relative declarative'
    function='appositive'>when
   <phr type=NP function='subject'>I</phr>
   <phr type=VP function='predicate'>was eighteen
                    years old</phr>
  </cl>,
 </phr>
 <phr type=VP function='predicate'>
  <phr type=V function='main verb'>is held</phr>
  <phr type=NP function='complement'> <!-- ? -->
   <cl type='nonfinite' function='predicate nom.'>
    <phr type=V function='copula'>to be</phr>
    <phr type=NP function='predicate nom.'>
     a crucial turning point
     <phr type=PP function='postmodifier'>in
      <phr type=NP function='prep.obj.'>
       the history
       <phr type=PP function='postmodifier'>
        of the Afro-American</phr>
      </phr>
     </phr>
     ---
     <phr type=PP
        function='appositive postmodifier'>for
      <phr type=NP function='prep.obj.'>the U.S.A.
       <phr type=PP function='postmodifier'>
        as a whole</phr>
      </phr>
     </phr>
    </phr>
    ---
    <phr type=NP function='appositive pred.nom.'>
     the year
     <cl type='finite relative'
       function='adjectival'>
      <phr type=NP function='subject'>
       segregation</phr>
      <phr type=VP function='predicate'>
       <phr type=V function='main verb'>
        was outlawed</phr>
       <phr type=PP function='postmodifier'>
        by the U.S. Supreme Court</phr>
      </phr>
     </cl>
    </phr>
   </cl>
  </phr>
 </phr>
  .
</cl>
<cl type='finite declarative' function='independent'>
 <phr type=NP function='subject'>It</phr>
 <phr type=VP function='predicate'>
  <phr type=V function='main verb'>was</phr>
  also
  <phr type=NP function='predicate nom.'>
   a crucial year for me</phr>
 </phr>
 <cl type='finite declarative'
   function='dependent causative'>because
  <phr type=PP function='sentence adverb'>
   on June 18, 1954</phr>,
  <phr type=NP function='subject'>I</phr>
  <phr type=VP function='predicate'>
   <phr type=V function='main verb'>began serving</phr>
   <phr type=NP function='complement'>
    a sentence in state prison
    <phr type=PP function='complement'>
     for possession of marijuana
    </phr>
   </phr>
  </phr>
 </cl>
</cl>
.
]]>
</eg>

<p>This style of markup, however, introduces spurious new lines and
blanks into the text, which could make restoring the text to its
original layout problematic. If the original layout is important, the
original line breaks and font shifts should be recorded using
<gi>lb</gi> elements, the global <att>rend</att> attribute, etc.

<!-- I think this still needs further work: it's hard to see why -->
<!-- we dont merge all this with AIla, and provide more discussion -->
<!-- e.g. problems in segmenting English; examples in other langs -->
<!-- Save for P4.....                        (LB)   -->

<p>The <gi>w</gi>, <gi>m</gi> and <gi>c</gi> elements are also
identical in meaning to the <gi>seg</gi> element with a <att>type</att>
attribute of <q>w</q>, <q>m</q>, or <q>c</q>, and may occur wherever
<gi>seg</gi> is permitted to occur. However, they have more  restricted
content models than does <gi>seg</gi>: for example, the <gi>w</gi>
element can only contain <gi>w</gi>, <gi>m</gi> and <gi>c</gi>
elements, and parsed character data; the <gi>m</gi> element can only
contain <gi>c</gi> elements and parsed character data; the <gi>c</gi>
element can only contain parsed character data, and should in fact only
contain a single character. Consequently, while <gi>m</gi> et al. can
be translated directly into typed <gi>seg</gi> elements, the reverse is
not necessarily the case.

<p>The restriction on the content of the <gi>w</gi> attribute in
particular requires that a certain care must be exercised when using it,
especially in relation to the use of other tags that one may think of as
<term>word level</term>, but which are in fact defined as <term>phrase
level</term>. Consider the problem of segmenting an occurrence of the
<gi>mentioned</gi> element as a word.

<eg><![ CDATA [
<mentioned>grandiloquent</mentioned>
]]>
</eg>

The first of the following two encodings is legitimate; the second is
not, since the <gi>mentioned</gi> element is not part of the content
model of the <gi>w</gi> element:

<eg><![ CDATA [
<!-- This is all right. -->
<mentioned><w>grandiloquent</w></mentioned>

<!-- This is NOT all right! -->
<w><mentioned>grandiloquent</mentioned></w>
]]>
</eg>

<p>On the other hand, both of the following encodings <emph>are</emph>
legitimate:

<eg><![ CDATA [
<mentioned><phr>grandiloquent speech</phr></mentioned>

<phr><mentioned>grandiloquent speech</mentioned></phr>
]]>
</eg>

The first encoding describes the citing of a phrase. The second
describes a phrase which consists of something mentioned.

<!-- added following brief plug for otherwise  unsung attributes -->

<p>The <gi>w</gi> and <gi>m</gi> attributes carry additional attributes
which may be of use in many indexing or analytic applications. The
<att>lemma</att> attribute may be used to specify  the
<term>lemma</term>, that is the head- or base- form of an
inflected verb or noun, for example:

<eg>
<![ CDATA [
<s lang=LA>
  <w lemma=timeo>timeo</w>
  <w lemma=danaii>Danaos</w>
  <w lemma=et>et</w>
  <w lemma=donum>dona</w>
  <w lemma=fero>ferentes</w>
</s>
]]>
</eg>

Similarly, the <att>baseform</att> attribute may be specified for the
<gi>m</gi> element, to indicate the <soCalled>base form</soCalled> of
a transformed morpheme:
<eg>
<![ CDATA [
<w type=adjective>
  <m type=prefix baseform=con>com</m>
  <m type=root>fort</m>
  <m type=suffix>able</m>
</w>
]]>
</eg>

<p>The <gi>w</gi>, <gi>m</gi> and <gi>c</gi> elements can be used
together to give a fairly detailed low-level grammatical analysis of
text. For example, consider the following segmentation of the English
S-unit <mentioned>I didn't do it</mentioned>.

<eg><![ CDATA [
<w>I</w>
<w>
 <w>did</w>
 <m>n't</m>
 </w>
<w>do</w>
<w>it</w>
<c>.</c>
]]>
</eg>

<p>This segmentation, crude as it is, succeeds in representing the idea
that <mentioned>did</mentioned> occurs as a word inside the word
<mentioned>didn't</mentioned>. A further advantage of segmenting the text down
to this level is that it becomes relatively simple to associate each
such segment with a more detailed formal analysis.

<!-- previous sentence is my rewording of the following wh confused me -->

<!-- In addition, by supplying the words, certain significant -->
<!-- morphemes (such as <mentioned>n't</mentioned> above), and special -->
<!-- characters (such as punctuation marks) with <att>id</att> -->
<!-- attributes, one is able to link these elements to other -->
<!-- elements which represent their analyses and interpretations -->
<!-- in systematic ways.  -->

This matter is taken up in detail in section <ptr target=AIla>.

<p>The <gi>s</gi>, <gi>cl</gi>, <gi>phr</gi>, <gi>w</gi>, <gi>m</gi>,
and <gi>c</gi> elements are formally declared as follows:

<eg id=dailc>
<![ CDATA [
<!-- 15.1:  Linguistic Segment Categories                     -->
<!ELEMENT s             - -  (%phrase.seq)        -(s)          >
<!ATTLIST s                  %a.global;
                             %a.seg;                            >
<!ELEMENT cl            - -  (%phrase.seq)                      >
<!ATTLIST cl                 %a.global;
                             %a.seg;                            >
<!ELEMENT phr           - -  (%phrase.seq)                      >
<!ATTLIST phr                %a.global;
                             %a.seg;                            >
<!ELEMENT w             - -  ((#PCDATA | seg | w | m | c)*)     >
<!ATTLIST w                  %a.global;
                             %a.seg;
          lemma              CDATA               #IMPLIED       >
<!ELEMENT m             - -  ((#PCDATA | seg | c)*)             >
<!ATTLIST m                  %a.global;
                             %a.seg;
          baseform           CDATA               #IMPLIED       >
<!ELEMENT c             - -  (#PCDATA)                          >
<!ATTLIST c                  %a.global;
                             %a.seg;                            >
<!-- This fragment is used in sec. 15                         -->
]]>
</eg>














<!--* $Id: p2aisp.odd,v 1.8 1999/05/18 10:40:42 tei Exp $ *-->
<!--*
    **
    * $Log: p2aisp.odd,v $
    * Revision 1.8  1999/05/18 10:40:42  tei
    * mixed content gotcha in icelandic eg
    *
    * Revision 1.7  1998/02/01 17:45:38  tei
    * *** empty log message ***
    *
    * Revision 1.6  98/01/28  11:44:14  cmsmcq
    * LB changes of Jan 1998 and RCS keywords added.
    *
    *-->
<!-- Revisions:                                               -->
<!-- 5 Jan 98 : LB : fix 2 typos in egs -->
<!-- 26 feb: move description of ANA here -->
<!-- 93-11-26 : MSM : cosmetic and typos                      -->
<!-- 93-11-23 : MSM : provide correct pointer to saag for JOIN -->
<!-- 93-07-04 :  DTL :  Renumber to AIsp.  Change < fvp >     -->
<!--   to < span > and < fvpGrp > to < spanGrp >. Add         -->
<!--   < interp > and < interpGrp > tags, the first defined   -->
<!--   by omitting from= and to= from < span >, the second    -->
<!--   the corresponding grouping tag.  Change title to       -->
<!--   "Spans and Interpretations".  < span > has been        -->
<!--   removed from COnono section. Remove < analysis >       -->
<!--   tags.  Add Lessing example.                            -->
<!-- 30 Mar 93 :  LB renumber to AIfvp                        -->
<!-- 18 Jul 92 :  DTL :  Renumber from p2.444 to p2.445.      -->
<!-- 15 Jul 92 :  DTL :  Add < analysis > tags.               -->
<!-- 13 Jul 92 :  DTL :  Correct ODD tagging.                 -->
<!-- 01 Jul 92 :  DTL :  Define grouping tag < fvpGrp >.      -->
<!--   Assign section number p2.444.                          -->
<!-- 30 Jun 92 :  DTL :  Complete draft, modifying text from  -->
<!--   old section P2.234 on < span >. Change the Sigmund     -->
<!--   example to eliminate most anchors.  Make other changes -->
<!--   in the definition of < span > in accordance with an    -->
<!--   exchange between DTL and CMSMcQ on TEI-TECH in early   -->
<!--   June.  However, make from= required and to= optional,  -->
<!--   in conformity with their use in other pointing tags.   -->
<!--   Change name of tag to < fvp >. Rename type= as         -->
<!--   feature=.  Write TAGDOC.                               -->

<div2 id=AIatts><head>Global Attributes for Simple Analyses</head>

<p>When the tag set described by this chapter is selected, an
additional attribute is defined for all elements:

<list type=gloss>
<label><att>ana</att></label>
<item>indicates one or more elements containing interpretations 
of the element on which the <att>ana</att> attribute 
appears.</item>
</list>

The <att>ana</att> attribute may be specified for  any SGML element.
Its effect is to  associate the element with one or more others
representing an analysis or interpretation of it. Its target should be
one of the elements described in the section <ptr target=AIsp> below,
or some other interpretative element such as <gi>note</gi>, on which
see section <ptr target=COno> or <gi>fs</gi>, on which see chapter
<ptr target=FS>.


<!-- interp class should be a subclass of metadata maybe, except -->
<!-- that if interp includes note and fs their positions in tree -->
<!-- are constrained -->

<!-- Fixed problem raised by following comment. LB -->

<!-- Oh, damn.  Just realized this obvious constraint means   -->
<!-- that INST probably should not be a global attribute at   -->
<!-- all, but instead a class with members SPAN, SPANGRP,     -->
<!-- INTERP, INTERPGRP, FS.  Hmm.  If you want to change it   -->
<!-- now, I'll agree; otherwise, let it wait for P4.  Or      -->
<!-- maybe we can provide a rationale / rationalization:      -->
<!-- (msm)                                                    -->

<!-- deleted following para pending clarification -->

<!-- <p>When used on elements other than the overtly -->
<!-- interpretive <gi>span</gi>, <gi>interp</gi>, etc., the -->
<!-- <att>inst</att> attribute serves both to indicate that the -->
<!-- element bearing it is to be regarded in some sense as an -->
<!-- interpretive one, as well as serving to provide a link to -->
<!-- the text being interpreted.  It ought not, however, to be -->
<!-- used as a substitute for the <att>target</att> attributes -->
<!-- of <gi>note</gi> and other elements. -->

<!-- why do we need INST  attribute anyway? I'd kill it if I hadnt -->
<!-- just spent an hour defining it, dammitall: whats the diff  -->
<!-- between inst and the various target attributes? I now suspect -->
<!-- it makes sense *only* as a global - and not much then! -->


<p>The <att>ana</att> attribute is formally declared as follows:

<eg id=daiga>
<![ CDATA [
<!-- 15.2:  Global attribute for analysis                     -->
<!ENTITY % a.analysis '
          ana                IDREFS              #IMPLIED'      >
<!-- This fragment is used in sec. 15                         -->
]]>
</eg>


<div2 id=AIsp><head>Spans and Interpretations</head>

<p>The simplest mechanisms for attaching analytic notes in some
structured vocabulary to particular passages of text are provided by the
empty <gi>span</gi> and <gi>interp</gi> elements, and their associated
grouping elements <gi>spanGrp</gi> and <gi>interpGrp</gi>.

<list type=gloss>
<label><gi>span</gi></label>
<item>associates an interpretative annotation directly with a 
span of
text.
Attributes include:
<list type=gloss>
<label><att>value</att></label>
<item>identifies the specific phenomenon being annotated.</item>
<label><att>from</att></label>
<item>specifies the beginning of the passage being annotated; if 
not accompanied by a <att>to</att> attribute, then 
specifies the entire passage.</item>
<label><att>to</att></label>
<item>specifies the end of the passage being annotated.</item>
</list>
</item>
<label><gi>spanGrp</gi></label>
<item>collects together <gi>span</gi> tags.</item>
<label><gi>interp</gi></label>
<item>provides for an interpretative annotation which can be

linked to a span of text.
Attributes include:
<list type=gloss>
<label><att>value</att></label>
<item>identifies the specific phenomenon being annotated.</item>
</list>
</item>
<label><gi>interpGrp</gi></label>
<item>collects together <gi>interp</gi> tags.</item>
</list>


<p>These elements are all members of the class <ident
type=class>interpret</ident>, and thus share the following attributes:

<list type=gloss>
<label><att>resp</att></label>
<item>indicates who is responsible for the interpretation.</item>
<label><att>type</att></label>
<item>indicates what kind of phenomenon is being noted in the 
passage.
Sample values include:
<list type=gloss>
<label><term>theme</term></label>
<item>identifies a theme in the passage.</item>
<label><term>allusion</term></label>
<item>identifies an allusion to another text.</item>
<label><term>character</term></label>
<item>identifies a character associated with the passage.</item>
<label><term>(discourse type)</term></label>
<item>specifies that the passage is of a particular discourse 
type.</item>
<label><term>image</term></label>
<item>identifies an image in the passage.</item>
</list></item>
<label><att>inst</att></label>
<item>points to instances of the analysis or interpretation 
represented by the current element.</item>
</list>

<p>The <att>type</att> and <att>value</att> attributes of the
<gi>span</gi> and <gi>interp</gi> elements may be used to associate an
interpretive name, type, and
value with a specific stretch (or <term>span</term>) of
text.  In the case of the <gi>span</gi> element, the span of text being
annotated is indicated by values of the <att>from</att> and
<att>to</att> attributes, the value of each being a pointer.  If
the optional <att>to</att> attribute is omitted, the span consists just
of the element pointed at by the obligatory <att>from</att> attribute.
In the case of <gi>interp</gi> (see below), the span is indicated by a
pointer from a <gi>link</gi> element or some similar mechanism.  Here is
an example of the <gi>span</gi> element.

<eg><![ CDATA [
<p id=MQp1s2p114>
<s id=MQp1s2p114s1>There was certainly a definite point
at which the thing began.</s>

<s id=MQp1s2p114s2>It was not; then it was suddenly
inescapable, and nothing could have frightened it
away.</s>

<s id=MQp1s2p114s3>There was a slow integration,
during which she, and the little animals, and the moving
grasses, and the sun-warmed trees, and the slopes of
shivering silvery mealies, and the great dome of blue
light overhead, and the stones of earth under her feet,
became one, shuddering together in a dissolution
of dancing atoms.</s>

<s id=MQp1s2p114s4>She felt the rivers under the ground
forcing themselves pain&shy;fully along her veins,
swelling them out in an unbearable pressure; her flesh
was the earth, and suffered growth like a ferment; and
her eyes stared, fixed like the eye of the sun.</s>

<s id=MQp1s2p114s5>Not for one second longer (if the
terms for time apply) could she have borne it; but then,
with a sudden movement forwards and out, the whole
process stopped; and <emph rend=italic>that</emph> was
<soCalled rend=dquo>the moment</soCalled> which it was
impossible to remember afterwards.</s>

<span resp=DTL
      value='the moment'
      from=MQp1s2p114s3
      to=MQp1s2p114s5>

<s id=MQp1s2p114s6>For during that space of time (which
was timeless) she understood quite finally her
smallness, the unimportance of humanity.</s>

<!-- ... -->
</p>
]]>
</eg>
<!-- Doris Lessing, Martha Quest, 1952, p52-53  -->

<p>The <gi>span</gi> element may, as in this example, be placed in the
text near the textual span it is associated with, or it may be placed
outside the text enclosed within a <gi>spanGrp</gi> element as follows.

<eg><![ CDATA [
<spanGrp resp=DTL>
  <span value='the moment' from=MQp1s2p114s3 to=MQp1s2p114s5>
</spanGrp>
]]>
</eg>

As may be seen, the <att>type</att> attribute may be omitted in order to
associate a span of text simply with a descriptive name.

<p>Spans may also be used to represent the structural divisions assigned
to the narrative by an interpreter.  Consider the following narrative:

<q rend=display><p>Sigmund, the son of Volsung, was a king in
Frankish country. Sinfiotli was the eldest of his sons, the second
was Helgi, the third Hamund.
Borghild, Sigmund's wife, had a brother named ----
But Sinfiotli, her stepson, and ---- both wooed the same woman
and Sinfiotli killed him over it.<note place=foot>The rule marks spaces
left for the missing name in the manuscript.</note>
And when he came home, Borghild asked him to go away,
but Sigmund offered her weregild, and she was obliged to accept it.
At the funeral feast Borghild was serving beer.  She took poison, a big
drinking horn full, and brought it to Sinfiotli.  When Sinfiotli looked
into the horn, he saw that poison was in it, and said to Sigmund <q>This
drink is cloudy, old man.</q> Sigmund took the horn and drank it off.
It is said that Sigmund was hardy and that poison did him no harm,
inside or out.  And all his sons could tolerate poison on their skin.
Borghild brought another horn to Sinfiotli, and asked him to drink, and
everything happened as before.  And a third time she brought him a horn,
and reproachful words as well, if he didn't drink from it.  He spoke
again to Sigmund as before.  He said <q>Filter it through your mustache,
son!</q> Sinfiotli drank it off and at once fell dead.

<p>Sigmund carried him a long way in his arms and came to a long,
narrow fjord, and there was a small boat there and a man in it.  He
offered to ferry Sigmund over the fjord.  But when Sigmund carried the
body out to the boat, it was fully laden.  The man said Sigmund should
go around the fjord inland.  The man pushed the boat out and then
suddenly vanished.

<p>King Sigmund lived a long time in Denmark in the kingdom of
Borghild, after he married her.  Then he went south to Frankish lands,
to the kingdom he had there.  Then he married Hiordis, the daughter of
King Eylimi.  Their son was Sigurd.  King Sigmund fell in a battle with
the sons of Hunding.  And then Hiordis married Alf, the son of King
Hialprec.  Sigurd grew up there as a boy.

<p>Sigmund and all his sons were tall and outstanding in their
strength, their growth, their intelligence, and their accomplishments.
But Sigurd was the most outstanding of all, and everyone who knows about
the old days says he was the most outstanding of men and the noblest of
all the warrior kings.
</q>
<!-- "Fr&aacute; dau&eth;a Sinfi&otail;tla," in Edda:  Die    -->
<!-- Lieder des Codex Regius nebst verwandten                 -->
<!-- Denkm&auml;lern, ed.  Gustav Neckel, Vol.  I, Text, 4th  -->
<!-- ed. revised by Hans Kuhn (Heidelberg:  Carl Winter,      -->
<!-- 1962), pp. 162-3.  Tr. CMSMcQ                            -->

<p>A structural analysis of this text, dividing it into narrative units
in a pattern shared with other texts from the same literature, might
look like this:

<eg>
<![ CDATA [
<p id=P1>
<s id=S1>Sigmund ... was a king in Frankish country.</s>
<s id=S2>Sinfiotli was the eldest of his sons.</s>
<s id=S3>Borghild, Sigmund's wife, had a brother ... </s>
<s id=S4a>But Sinfiotli ... wooed the same woman</s>
<s id=S4b>and Sinfiotli killed him over it.</s>
<s id=S5>And when he came home, ... she was obliged to accept it.</s>
<s id=S6>At the funeral feast Borghild was serving beer.</s>
<s id=S7>She took poison ... and brought it to Sinfiotli.</s>
<!-- ... -->
<s id=S17>Sinfiotli drank it off and at once fell dead.</s>
<anchor id=nil1>
<p id=P2>Sigmund carried him a long way in his arms ... </p>
<p id=P3>King Sigmund lived a long time in Denmark ... </p>
<p id=P4>Sigmund and all his sons were tall ... </p>

<!-- ... -->

<span resp=TMA type='structural unit' value='introduction'
      from=S1 to=S3                                             >
<span resp=TMA type='structural unit' value='conflict'
      from=S4a                                                  >
<span resp=TMA type='structural unit' value='climax'
      from=S4b                                                  >
<span resp=TMA type='structural unit' value='revenge'
      from=S5 to=S17                                            >
<span resp=TMA type='structural unit' value='reconciliation'
      from=nil1                                                 >
<span resp=TMA type='structural unit' value='aftermath'
      from=P2 to=P4                                             >
]]>
</eg>

Note the use of an empty <gi>anchor</gi> element to provide a target for
the <soCalled>reconciliation</soCalled> unit which is normally part of
the narrative pattern but which is not realized in the text shown.

<p>If groups of <gi>span</gi> elements with the same <att>resp</att> or
<att>type</att> are used, as in this example, they may be grouped
together inside a <gi>spanGrp</gi> element, with the values of the
common attribute(s) inherited from the higher element, as follows.

<eg>
<![ CDATA [
<spanGrp resp=TMA type='structural unit'>
 <span value='introduction'   from=S1   to=S3 >
 <span value='conflict'       from=S4a        >
 <span value='climax'         from=S4b        >
 <span value='revenge'        from=S5   to=S17>
 <span value='reconciliation' from=nil1       >
 <span value='aftermath'      from=P2   to=P4 >
 </spanGrp>
]]>
</eg>

<p>The same analysis may be expressed with the <gi>interp</gi> element
instead of the <gi>span</gi> element; this element provide attributes
for recording an interpretive category and its value, as well as the
identity of the interpreter, but does not itself indicate which passage
of text is being interpreted; the same interpretive structures can thus
be associated with many passages of the text.  The association between
text passages and <gi>interp</gi> elements must be made either by
pointing from the text to the <gi>interp</gi> element with the
<att>ana</att> attribute defined in section <ptr target=AIatts>, or by
pointing at both text and interpretation from a <gi>link</gi> element,
as described in chapter <ptr type=div1 target=SA>.

<p>To encode the first example above using <gi>interp</gi>, it is
necessary to create a text element which contains --- or corresponds to
--- the the third, fourth, and fifth orthographic sentences (S-units) in
the paragraph.  This can be done either with the <att>seg</att> element,
described in <ptr type=div2 target=SAse>, or the <att>join</att>
element, described in <ptr type=div2 target=SAag>.  The resulting
element can then be associated with the <gi>interp</gi> element using the
<att>ana</att> attribute described in section <ptr type=div1
target=AIatts>.  We illustrate using the <gi>seg</gi> element.

<eg><![ CDATA [
<p id=MQp1s2p114>
<s id=MQp1s2p114s1>There was certainly a definite point ... </s>
<s id=MQp1s2p114s2>It was not; then it was suddenly inescapable ... </s>
<seg id=MQp1s2p114s3-5 ana=moment>
<s id=MQp1s2p114s3>There was a slow integration ... </s>
<s id=MQp1s2p114s4>She felt the rivers under the ground ... </s>
<s id=MQp1s2p114s5>Not for one second longer ... </s>
</seg>
<s id=MQp1s2p114s6>For during that space of time ... </s>
<!-- ... -->
</p>
<!-- ... -->
<interp id=moment resp=DTL value='the moment'>
]]>
</eg>

<p>The second example above can be recoded using <gi>interp</gi> and
<gi>interpGrp</gi> tags in a similar manner.  The interpretation
itself can be expressed in an <gi>interpGrp</gi> element, which would
replace the <gi>spanGrp</gi> in the example shown above:

<eg>
<![ CDATA [
<interpGrp resp=TMA type='structural unit'>
 <interp id=intro    value='introduction'   >
 <interp id=conflict value='conflict'       >
 <interp id=climax   value='climax'         >
 <interp id=revenge  value='revenge'        >
 <interp id=reconcil value='reconciliation' >
 <interp id=afterm   value='aftermath'      >
</interpGrp>
]]>
</eg>

<p>This <gi>interpGrp</gi> element would be linked to the text either
by means of the <att>ana</att> attribute, or by means of <gi>link</gi>
elements.  Using the <att>ana</att> attribute (on <gi>seg</gi> elements
introduced specifically for this purpose), the text would be encoded as
follows:

<eg>
<![ CDATA [

<p id=P1>
<seg id=S1-S3 ana=intro>
<s id=S1>Sigmund ... was a king in Frankish country.</s>
<s id=S2>Sinfiotli was the eldest of his sons.</s>
<s id=S3>Borghild, Sigmund's wife, had a brother ... </s>
</seg>
<s id=S4a ana=conflict>But Sinfiotli ... wooed the same woman</s>
<s id=S4b ana=climax>and Sinfiotli killed him over it.</s>
<seg id=S5-S17 ana=revenge>
<s id=S5>And when he came home, ... she was obliged to accept it.</s>
<s id=S6>At the funeral feast Borghild was serving beer.</s>
<!-- ... -->
<s id=S17>Sinfiotli drank it off and at once fell dead.</s>
</seg>
<anchor id=nil1 ana=reconcil>
<p id=P2>Sigmund carried him a long way in his arms ... </p>
<p id=P3>King Sigmund lived a long time in Denmark ... </p>
<p id=P4>Sigmund and all his sons were tall ... </p>
<!-- ... -->
<join id=P2-P4 targets='P2 P3 P4' ana=afterm>
]]>
</eg>

<p>The linkage may also be accomplished using a <gi>linkGrp</gi> element,
whose content is a set of <gi>link</gi> elements which point to each
interpretive element and its corresponding text unit.  This method does
not require the use of the <att>ana</att> attribute on the text
units.

<eg>
<![ CDATA [
<linkGrp resp=TMA targFunc='text interpretation'>
  <link targets='intro    S1-S3'>
  <link targets='conflict S4a'>
  <link targets='climax   S4b'>
  <link targets='revenge  S5-S17'>
  <link targets='reconcil nil1'>
  <link targets='afterm   P2-P4'>
</linkGrp>
]]>
</eg>

<p>One obvious advantage of using <gi>interp</gi> rather than
<gi>span</gi> elements for the Sigmund text is that the <gi>interp</gi>
elements can be reused for marking up other texts in the same document,
whereas the <gi>span</gi> elements cannot.  Another is that the
<gi>interp</gi> element can be used to provide interpretations for
discontinuous text elements (represented by <gi>join</gi> elements).  On
the other hand, the use of <gi>interp</gi> elements may require the
creation of special text elements not otherwise needed (e.g. the
<gi>seg</gi> and the <gi>join</gi> in the revised encoding of the text),
whereas the the use of <gi>span</gi> elements does not.

<p>The formal declarations for the <gi>span</gi>, <gi>spanGrp</gi>,
<gi>interp</gi> and <gi>interpGrp</gi> elements are:

<eg id=daisp>
<![ CDATA [
<!-- 15.3:  Spans                                             -->
<!ELEMENT span          - O  EMPTY                              >
<!ATTLIST span               %a.global;
                             %a.interpret;
          to                 IDREF               #IMPLIED
          value              CDATA               #REQUIRED
          from               IDREF               #REQUIRED      >
<!ELEMENT spanGrp       - -  ((span)*)                          >
<!ATTLIST spanGrp            %a.global;
                             %a.interpret;                      >
<!ELEMENT interp        - O  EMPTY                              >
<!ATTLIST interp             %a.global;
                             %a.interpret;
          value              CDATA               #REQUIRED      >
<!ELEMENT interpGrp     - -  ((interp)*)                        >
<!ATTLIST interpGrp          %a.global;
                             %a.interpret;                      >
<!-- This fragment is used in sec. 15                         -->
]]>
</eg>


<!-- Revisions:  -->
<!-- 9 jan 94: LB: analysis is now called interpretation -->
<!-- 93-07-05 : DTL : renamed AIla, moved from CC per Eynsham -->
<!-- decision.  Redone to reconcile with rest of AI chapter.  -->
<!-- Some details and examples deleted.                       -->
<!-- 93-03-11 : MSM : delete indented version of CLAWS output -->
<!-- 93-03-10 : MSM : correct constit. analysis               -->
<!-- 93-03-10 : MSM : bowdlerize bibl citation                -->
<!-- 93-03-10 : MSM : revise for publication:                 -->
<!--                  change stenstrom:  oelig or oslash ?    -->
<!-- 93-03-08 : MSM : put sgml comments around ellipses       -->
<!-- 93-03-08 : MSM : put citn DATE into IMPRINT              -->
<!-- Date: Sat, 06 Mar 1993 22:01:14 +0000                    -->
<!-- From: Lou Burnard < lou@vax.ox.ac.uk >                   -->
<!-- To: U35395@UICVM.UIC.EDU                                 -->
<!-- CC: lou@vax.ox.ac.uk                                     -->
<!-- Subject: CCan.odd (6 of 10)                              -->

<div2 id=aila><head>Linguistic Annotation</head>

<p>By <term>linguistic annotation</term> we mean here any annotation
determined by an analysis of linguistic features of the text, excluding
as borderline cases both the formal structural properties of the text
(e.g. its division into chapters or paragraphs) and descriptive
information about its context (the circumstances of its production, its
genre or medium).  The structural properties of any TEI-conformant text
should be represented using the structural elements discussed elsewhere
in this chapter and in chapters <ptr target=CO>, <ptr target=DS>, and
the various chapters of Part III (on base tag sets).  The contextual
properties of a TEI text are fully documented in the TEI Header, which
is discussed in chapter <ptr target=HD>, and in section <ptr
target=CCah>.

<p>Other forms of linguistic annotation may be applied at a number of
levels in a text.  A code (such as a word-class or part-of-speech
code) may be associated with each word or token, or with groups of such
tokens, which may be continuous, discontinuous or nested.  A code may
also be associated with relationships (such as cohesion) perceived as
existing between distinct parts of a text.  The codes themselves may
stand for discrete non-decomposable categories, or they may represent
highly articulated bundles of textual features.  Their function may be
to place the annotated part of the text somewhere within a narrowly
linguistic or discoursal domain of analysis, or within a more general
semantic field, or any combination drawn from these and other domains.

<p>The manner by which such annotations are generated and attached to
the text may be entirely automatic, entirely manual or a mixture.  The
ease and accuracy with which analysis may be automated may vary with the
level at which the annotation is attached.  The method employed should
be documented in the <gi>interpretation</gi> element within the encoding
description of the TEI Header, as described in section <ptr
target=HD53>.
<!-- To EDITORS from DTL:  Retain the next sentence here, or  -->
<!-- move it to CC chapter?                                   -->
<!-- Seems all right here, as a reminder.  (msm)              -->
Where different parts of a language corpus have used
different annotation methods, the <att>decls</att>
attribute may be used to indicate the fact, as further
discussed in section <ptr target=CCas>.

<!-- < div3 id=CCan2 >< head >An Extended Example< / head> -->
<p>As one example of such types of analysis, consider the following
sentence, taken from the Lancaster/IBM Treebank Project.<note>

See <bibl> <author>G.  N. Leech and R. G. Garside,</author>
<title>Running a Grammar Factory,</title> in
<title>English Computer Corpora:
Selected Papers and Research Guide,</title>
ed. <editor>S. Johansson and A.-B. Stenstr&oslash;m</editor>
(Berlin: de Gruyter; New York:  Mouton, 1991),
pp. 15-32.
</bibl>

This sentence and its analysis are reproduced by kind permission of the
University of Lancaster's Unit for Computer Research on the English
Language.

<!-- Stenstrom's name changed from oelig, on theory that      -->
<!-- he's Scandinavian not French.  Pls check.  -MSM          -->

<!-- she's Swedish. Please restore her o-slash (LB) -->
</note>

<!-- [N [G The_AT victim_NN1 's_$ G] friends_NN2 N] [V told_VVD  -->
<!-- [N police_NN2 N] [Fn that_CST [N Krueger_NP1 N] [V [V&   -->
<!-- drove_VVD [P into_II [N the_AT quarry_NN1 N]P]V&]        -->
<!-- and_CC [V+ never_RR surfaced_VVD V+]V]Fn]V] ._.          -->

<q rend=display>
The victim's friends told police that Kruger drove into the quarry
and never surfaced.
</q>

<p>Our discussion focuses on the way that this sentence might be
analysed using the Claws system developed at the University of
Lancaster, but exactly the same principles may be applied to a wide
variety of other systems.

<note>For the word-class tagging method used by Claws see

<bibl>
<author>I. Marshall</author>,
<title>Choice of Grammatical Word Class without Global Syntactic
Analysis:  Tagging Words in the LOB Corpus,</title>
in
<title>Computers and the Humanities</title>
17 (1983): 139-50..
</bibl>

For an overview of the system see

<bibl>
<author>R. G. Garside, G. N. Leech, and G. R. Sampson,</author>
<title>The Computational Analysis of English: a Corpus-Based
Approach</title>
(Oxford:  Oxford University Press, 1991).
</bibl>
</note>

Output from the system consists of a segmented and tokenized version of
the text, in which word class codes have been associated with each
token.  For our example sentence, we might conveniently represent these
codes using entity references:

<note place=foot>We have replaced the Claws code <code>&dollar;</code>
for the <mentioned>'s</mentioned> morpheme by <code>GEN</code>, as in the tag
set used by the British National Corpus (see <ptr target=FSil>), and
the code <code>.</code> for the final full stop by
<code>PUN</code>.</note>

<eg><![ CDATA [
<s>The&AT victim&NN1;'s&GEN friends&NN2 told&VVD police&NN2
that&CST Krueger&NP1  drove&VVD into&II the&AT
quarry&NN1  and&CC  never&RR surfaced&VVD;.&PUN
</s>
]]>
</eg>

The names used for these entity references have some significance for
the human reader (<code>AT</code> for <term>article</term>,
<code>NN1</code> for <term>singular noun</term>, <code>NN2</code> for
<term>plural noun</term>, etc.), but their representation in the
output from an SGML system processing the document may be adjusted, by
varying the entity declarations, to suit the convenience of whatever
analytic software is to be used.  For example, if the SGML parser
operating on this sentence uses a set of entity declarations in the
following form, then the word class tags will simply disappear from
the output.

<eg><![ CDATA [
<!ENTITY AT "">
<!ENTITY NN1 "">
<!ENTITY GEN "">
<!-- ... -->
]]>
</eg>

Alternatively, suppose the entity set in use follows the following
pattern:

<eg><![ CDATA [
<!ENTITY AT  "[definite article]">
<!ENTITY NN1 "[singular noun]">
<!ENTITY GEN "[genitive suffix]">
<!-- ... -->
]]>
</eg>

Then the sample sentence will be processed by an SGML-aware processor as
if it began:

<eg><![ CDATA [
The[definite article] victim[singular noun]'s[genitive suffix] ...
]]>
</eg>

<p>It would be more useful if the replacement texts for each entity
were a code of some significance to a particular analysis program.  If
the codes are considered to be <term>atomic</term>, then one of the
mechanisms based on the <gi>interp</gi> element described in section
<ptr target=Aisp> is sufficient.  If the codes are considered to be
compositional (for example that <code>NN1</code> and <code>NN2</code>
have something in common, namely their <term>noun-ness</term>, which
they do not share with, say, <code>VVD</code>), then this
compositionality may be most clearly expressed using a mechanism based
on the <gi>fs</gi> element defined in chapter <ptr target=FS>.  For a
detailed example, see <ptr target=FSil>.

<p>One such replacement for the word-class entity references above
is a set of empty <gi>ptr</gi> elements bearing <att>target</att>
attributes as described in section <ptr target=COxr>.  The required
entity definitions would look as follows.

<eg><![ CDATA [
<!ENTITY   AT   "<ptr target=AT>" >
<!ENTITY   NN1  "<ptr target=NN1>">
<!ENTITY   GEN  "<ptr target=GEN>">
<!-- ... -->
]]>
</eg>

Then the text would be expanded to read:

<eg><![ CDATA [
<s>The<ptr target=AT> victim<ptr target=NN1>'s<ptr target=GEN>
friends<ptr target=NN2> told<ptr target=VVD> police
<ptr target=NN2> that<ptr target=CST> Krueger<ptr target=NP1>
drove<ptr target=VVD> into<ptr target=II> the<ptr target=AT>
quarry<ptr target=NN1 and<ptr target=CC> never<ptr target=RR>
surfaced<ptr target=VVD>.<ptr target=PUN>
</s>
]]>
</eg>

<p>The <gi>ptr</gi> elements are designed to point to elements with
unique identifiers.  But we have yet to specify what those elements are.
Suppose we say that they are <gi>interp</gi> elements whose values are the
same as their identifiers.  That is, we provide an <gi>interpGrp</gi>
element as follows:

<eg><![ CDATA [
<interpGrp type='word classes'>
  <interp id=AT  value=AT>
  <interp id=NN1 value=NN1>
  <interp id=GEN value=GEN>
  <!-- ... -->
</interpGrp>
]]>
</eg>

<p>Although common practice, this (or any similar) method of relating
text to interpretation is seriously flawed.  The interpretations are
related not to text elements, but to points in the text, namely those
that are occupied by the <gi>ptr</gi> elements.  In order to relate the
interpretation to the appropriate text units, a uniform convention needs
to be applied; for example, that an interpretation relates to all the
text material preceding the <gi>ptr</gi> element that points to it up to
the immediately preceding <gi>ptr</gi>, or up to the <gi>s</gi> that
delimits the S-unit containing that <gi>ptr</gi> element, whichever is
nearer.  While this convention works with texts that are marked up
solely with <gi>ptr</gi> elements that point to interpretation elements,
it does not work with texts with additional markup, for example
<gi>ptr</gi> elements that are used for some other purpose.  In addition,
the convention fails for any markup in which interpretations are
intended to be associated with nested text elements.

<p>None of these difficulties arise if the text is fully segmented, using
the linguistic segment elements described in section <ptr target=AIlc>,
and the <att>ana</att> attribute to point to the interpretations
that are associated with each such segment, as follows:

<eg><![ CDATA [
<s type=sentence>
<w ana=AT >The</w>
<w ana=NN1>victim</w>
<m ana=GEN>'s</m>
<w ana=NN2>friends</w>
<w ana=VVD>told</w>
<w ana=NN2>police</w>
<w ana=CST>that</w>
<w ana=NP1>Krueger</w>
<w ana=VVD>drove</w>
<w ana=II >into</w>
<w ana=AT >the</w>
<w ana=NN1>quarry</w>
<w ana=CC >and</w>
<w ana=RR >never</w>
<w ana=VVD>surfaced</w>
<c ana=PUN>.</c>
</s>
]]>
</eg>

<p>Analysis into phrase and clause elements can be superimposed on the
word and morpheme tagging in the preceding illustration. For example,
Claws provides the following constituent analysis of the sample sentence
(the word class codes have been deleted):

<q rend=display>
[N [G The victim's G] friends N] [V told [N police N] [Fn that [N
Krueger N] [V [V& drove [P into [N the quarry N]P]V&]
and [V+ never surfaced V+]V]Fn]V]
</q>

<p>Treating the labels on the brackets as phrase or clause
interpretations, this analysis of the structure of the example sentence
can be combined with the word class analysis and represented as follows
(the symbol <code>V&</code> representing the first part of a coordinate
phrase, has been replaced by <code>V1</code>, and <code>V+</code>, representing the
second part, has been replaced by <code>V2</code>).

<eg><![ CDATA [
<s type=sentence>
<phr ana=N>
  <phr ana=G>
    <w ana=AT>The</w>
    <w ana=NN1>victim</w>
    <m ana=GEN>'s</m>
    </phr>
  <w ana=NN2>friends</w>
  </phr>
<phr ana=V>
  <w ana=VVD>told</w>
  <phr ana=N><w ana=NN2>police</w></phr>
  <cl ana=Fn>
    <w ana=CST>that</w>
    <phr ana=N><w ana=NP1>Krueger</w></phr>
    <phr ana=V>
      <phr ana=V1>
        <w ana=VVD>drove</w>
        <phr ana=P>
          <w ana=II>into</w>
          <phr ana=N>
            <w ana=AT>the</w>
            <w ana=NN1>quarry</w>
            </phr>
          </phr>
        </phr>
      <w ana=CC>and</w>
      <phr ana=V2>
        <w ana=RR>never</w>
        <w ana=VVD>surfaced</w>
        </phr>
      </phr>
    </cl>
  </phr>
<c ana=PUN>.</c>
</s>
]]>
</eg>

<p>A representation using the <gi>linkGrp</gi> element can be obtained by
supplying each linguistic segment with its own <att>id</att> attribute,
removing its <att>ana</att> attribute, and putting each
segment-interpretation pair into a <gi>link</gi> element inside the
<gi>linkGrp</gi> element.

<!-- < div3 id=CCan3>< head>Non-nesting Structures< / head> -->
<p>Each linguistic segment so far discussed has been well-behaved with
respect to the basic document hierarchy, having only a single parent.
Moreover, the segmentation has been complete, in that each part of the
text is accounted for by some segment at each level of analysis, without
discontinuities or overlap.  This state of affairs does not of
course apply in all types of analysis, and these Guidelines provide a
number of mechanisms to support the representation of discontinuities or
multiple analyses.  A brief overview of these facilities is provided in
chapter <ptr target=NH>; also see <ptr target=SA>.  These mechanisms
all depend to a greater or lesser degree on the ability to associate a
unique identifier with any element in a TEI-conformant text, and then to
specify that identifier as the target of a pointing element of some kind.

<!-- < div3 id=CCan4>< head>Further Examples< / head> -->
<p>The mechanisms proposed in this chapter may also be used to encode
analyses of an entirely different kind, for example discourse function.
Here is an application of the span technique to record details of a sales
transaction in a spoken text.

<eg>
<![ CDATA [
<u who=P1 id=U1>Can I have ten oranges and a kilo of
    bananas please?</u>
<u who=P2 id=U2>Yes, anything else?</u>
<u who=P1 id=U3>No thanks.</u>
<u who=P2 id=U4>That'll be dollar forty.</u>
<u who=P1 id=U5>Two dollars</u>
<u who=P1 id=U6>Sixty, eighty, two dollars. Thank you.</u>

<spanGrp type=transactions>
  <span from=U1 value='sale request'>
  <span from=U2 to=U3 value='sale compliance'>
  <span from=U4 value='sale'>
  <span from=U5 value='purchase'>
  <span from=U6 value='purchase closure'>
  </spanGrp>
]]>
</eg><!-- R. Hasan, Language, context, and text... OUP1989, p 59 -->

For further discussion of the <gi>u</gi> (utterance) element and other
elements recommended for transcriptions of spoken language, see chapter
<ptr target=TS>.

</p></div1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-default-dtd-file:"~/lib/psgml/p2odd.ced"
sgml-parent-document:("/home/tei/P3/Master/Odds/p2.odd" "TEI.1" "TEXT" "BODY" "DIV1")
sgml-omittag:t
sgml-shorttag:t
End:
-->
             <!-- 15 Analysis -->
