<?tei:SOF p2sasy.odd ?>
<!-- $Id: p2sasy.odd,v 1.7 1998/02/05 17:14:35 tei Exp $ -->
<!--*
    * $Log: p2sasy.odd,v $
    * Revision 1.7  1998/02/05 17:14:35  tei
    * make examples parse
    *
    * Revision 1.6  94/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:                                               -->
<!-- 94-03-27 : MSM : corrections from SJ                     -->
<!-- 94-03-26 : MSM : disambiguate TERM, Q (> code, ident...) -->
<!-- 7 feb: tidy up bnc example a bit; combine with sasymp   -->
<!-- 19 dec 93 : LB change name of classdoc ANA -> cllink -->
<!-- 93-09-15 : MSM : simple SGML cleanup                     -->
<!-- 93-07-22 : DTL : exceedingly minor changes               -->
<!-- 93-07-21 : DTL : change argTypes= to targFunc= passim    -->
<!--                  supply missing xref to TS chapter       -->
<!-- 93-07-13 : DTL : complete draft, use ex from LB's        -->
<!--                  TEI-TECH posting of a BNC spoken text   -->
<!--            define synch= for temporal correspondence     -->
<!--            use LINK and LINKGRP for temporal alignment   -->
<!--            recast old LOC and ALIGN tags as WHEN and     -->
<!--            WHENGRP tags, but remove pointing ability from -->
<!--            WHEN.  WHEN tags can only be pointed at or    -->
<!--            linked.  Mildly revise attributes from the    -->
<!--            ones given for LOC and ALIGN in TS chapter.   -->
<!--            See TAGDOC for details.                       -->
 
<div2 id=SASY><head>Synchronization</head>
 
<p>In the previous section we discussed two particular kinds of
alignment:  alignment of parallel texts in different languages; and
alignment of texts and portions of an image.  In this section we address
another specialized form of alignment:  synchronization.  The need to
mark the relative positions of text components with respect to time
arises most naturally and frequently in transcribed spoken texts, but it
may arise in any text in which quoted speech occurs, or events are
described within a time frame.  The methods described here are also
generalizable for other kinds of alignment (for example, alignment of
text elements with respect to space), and may thus be regarded as
providing a simplified version of the HyTime system of <term>finite
space co-ordinates</term>.
 
<div3 id=SASYNC><head>Aligning Synchronous Events
 
<p>To mark synchronous elements, the <att>synch</att> attribute, which
is one of the linking attributes that are available for all text
elements, may be used.
 
<adList classDoc=CLLINK atts='synch'>
 
Alternatively, the <gi>link</gi> and <gi>linkGrp</gi> elements may be
used to make explicit the fact that the synchronous elements are
aligned.
 
<p>To illustrate the use of these mechanisms for marking synchrony,
consider the following representation of a spoken text:
 
<!-- From BNC, via LB, retranscribed without SGML markup -->
<eg><![ CDATA [
B:   The first time in twenty five years, we've cooked Christmas
     (unclear) for a blooming great load of people.
A: So you're [1] (unclear) [2]
B: [1] It will be [2] nice in a way, but, [3] be strange. [4]
A: [3] Yeah [4], yeah, cos it, it's [5] the [6]
B: [5] not [6]
]]> </eg>
 
<p>This representation uses numbers in brackets to mark the points at
which speakers overlap each other.  For example, the <cited>[1]</cited>
in A's first speech is to be understood as coinciding with the
<cited>[1]</cited> in B's second speech.<note>This sample is taken from
a conversation collected and transcribed for the British National
Corpus.</note>
 
<p>To encode this we use the base tag set for spoken texts, described in
chapter <xref target=TS>, together with the additional tag set described
in the present chapter.  First, we transcribe this text, marking the
synchronous points with <gi>anchor</gi> elements, and providing a
<att>synch</att> attribute on one of each of the pairs of synchronous
anchors.  As noted in the example given above (section <xref
target=SACSAL>), correspondence, and hence synchrony, is a symmetric
relation; therefore the attribute need only be specified on one of the
pairs of synchronous anchors.
 
<eg><![ CDATA [
<text><body>
<div id=D1>
<!-- ... -->
<u id=U3A who=A>So you're <anchor id=T1A synch=t1b><unclear>
          <anchor id=T2A synch=t2b></u>
<u id=U3B who=B> <anchor id=T1B>It will be <anchor id=T2B>
          nice in a way, but, <anchor id=T3B>
          be strange.<anchor id=T4B></u>
<u id=U4A who=A>
          <anchor id=T3A synch=t3b>Yeah
          <anchor id=T4A synch=t4b>, yeah, cos it, its
          <anchor id=T5A synch=t5b>the
          <anchor id=T6A synch=t6b></u>
<u id=U4B who=B>
          <anchor id=T5B>not<anchor id=T6B>
</u>
</body></text>]]>
</eg>
 
<p>Next, we encode the same example using <gi>link</gi> and
<gi>linkGrp</gi> elements to make the temporal alignment explicit; the
<att>id</att> attributes are provided for the <gi>link</gi> and
<gi>linkGrp</gi> elements for a reason that is given in the next
section, <xref target=SASYMP>. In this example, a <gi>back</gi>
element has been used to enclose the <gi>linkGrp</gi> element, but the links
may be located anywhere the encoder finds convenient.
 
<eg><![ CDATA [
<text><body><div id=D1>
<u id=U2B who=B>The first time in twenty five years,
  we've cooked Christmas <unclear> for a blooming great
  load of people.</u>
<u id=U3A who=A>So you're
  <anchor id=T1A><unclear><anchor id=T2A></u>
<u id=U3B who=B>
  <anchor id=T1B>It will be <anchor id=T2B>nice in a way,
  but, <anchor id=T3B>be strange <anchor id=T4B></u>
<u id=U4A who=A>
  <anchor id=T3A>Yeah<anchor id=T4A>, yeah, cos it, it's
<anchor id=T5A>the<anchor id=T6A></u>
<u id=U4B who=B><anchor id=T5B>not<anchor id=T6B></u>
</div>
<!-- ... -->
</body><back>
<linkGrp id=LG1 type='synchronous alignment'
         domains='d1 d1'
         targFunc='speaker.A speaker.B'>
  <link id=L1 targets='t1a t1b'>
  <link id=L2 targets='t2a t2b'>
  <link id=L3 targets='t3a t3b'>
  <link id=L4 targets='t4a t4b'>
  <link id=L5 targets='t5a t5b'>
  <link id=L6 targets='t6a t6b'>
</linkGrp>
</back></text>]]>
</eg>
 
<p>As with other forms of alignment, synchronization may be expressed
between stretches of speech as well as between points.  When complete
utterances are synchronous, for example, if one person says
<cited>What?</cited> and another <cited>No!</cited> at the same time,
that can be represented without <gi>anchor</gi> elements as follows.
 
<eg><![ CDATA [
<u id=U1 who=A synch=u2>What?</u>
<u id=U2 who=B>No!</u>
]]>
</eg>
 
<p>A simple way of expressing <term>overlap</term> (where one speaker
starts speaking before another has finished) is thus to use the
<gi>seg</gi> element to encode the overlapping portions of speech.  For
example,
 
<eg><![ CDATA [
<u who=A> So you're <unclear synch=B1></u>
<u who=B><seg id=B1> It will be </seg> nice in a way, but,
         <seg synch=A3> be strange. </seg></u>
<u who=A><seg id=A3> Yeah </seg>, yeah, cos it,
         its <seg synch=B2> the </seg></u>
<u who=B id=B2> not </u>
]]>
</eg>
 
Note in this encoding how synchronization has been effected between an
empty <gi>unclear</gi> element and a <gi>seg</gi>, and between an entire
<gi>u</gi> element and another <gi>seg</gi>, using the <att>synch</att>
attribute.  Alternatively, a <gi>linkGrp</gi> could be used in the same
way as above.
 
<div3 id=SASYMP><head>Placing Synchronous Events in Time</head>
 
<p>A synchronous alignment specifies which points in a spoken text occur
at the same time, and the order in which they occur, but does not say at
what time those points actually occur.  If that information is available
to the encoder it can be represented by means of the <gi>when</gi> and
<gi>timeLine</gi> elements, whose description and attributes are the
following:
 
<!-- WHEN = old LOC (but made empty, hence stripped of the    -->
<!-- ability to point; these elements only available to be    -->
<!-- pointed at or linked) TIMELINE = old ALIGN               -->
 
<tagList>
<tagDesc tagDoc=WHEN atts='absolute interval unit since id'>
<tagDesc tagDoc=TIMELINE atts='origin interval unit'>
</tagList>
 
<p>Each <gi>when</gi> element indicates a point in time, either directly
by means of the <att>absolute</att> attribute, whose value is a string
which specifies a particular time, or indirectly by means of the
<att>since</att> attribute, which points to another <gi>when</gi>.  If
the <att>since</att> is used, then the <att>interval</att> and
<att>unit</att> attributes should also be used to indicate the amount of
time that has elapsed since the time specified by the element pointed to
by the <att>since</att> attribute; the value <code type=val>-1</code>
can be given to indicate that the interval is unknown.
 
<p>If the <gi>when</gi> elements are uniformly spaced in time, then the
<att>interval</att> and <att>unit</att> values need be given once in the
<gi>timeLine</gi>, and not repeated in any of the <gi>when</gi>
elements.  If the intervals vary, but the units are all the same, then
the <att>unit</att> attribute alone can be given in the
<gi>timeLine</gi> element, and the <att>interval</att> attribute given
in the <gi>when</gi> element.
 
<p>The <att>origin</att> attribute in the <gi>timeLine</gi> element
points to a <gi>when</gi> element which specifies the reference or
origin for the timings within the <gi>timeLine</gi>; this must, of
course, specify its position in time absolutely.
 
<p>The following <gi>timeLine</gi> might be used to accompany the marked
up conversation shown in the preceding section:
 
<eg><![ CDATA [
<timeLine id=TL1 origin=w0 unit=centisecond>
  <when id=W0 absolute='sometime Monday morning before Christmas'
  <when id=W1 since=w0 interval="-1">
  <when id=W2 since=w1 interval="10">
  <when id=W3 since=w2 interval="20">
  <when id=W4 since=w3 interval="15">
  <when id=W5 since=w4 interval="25">
  <when id=W6 since=w5 interval="10">
  </timeLine>
]]>
</eg>
 
The information in this <gi>timeLine</gi> could now be linked to the
information in the <gi>linkGrp</gi> which provides the temporal
alignment (synchronization) for the text, as follows:
 
<eg><![ CDATA [
<linkGrp type='temporal specification'
         targType='link when'
         targFunc='synch.points when'
         domains='lg1 tl1'>
  <link targets='l1 w1'>
  <link targets='l2 w2'>
  <link targets='l3 w3'>
  <link targets='l4 w4'>
  <link targets='l5 w5'>
  <link targets='l6 w6'>
  </linkGrp>
]]>
</eg>
 
<p>To avoid the need for two distinct link groups (one marking the
synchronization of anchors with each other, and the other marking their
alignment with points on the time line) it would be better to link the
<gi>when</gi> elements with the synchronous points directly:
 
<eg><![ CDATA [
<linkGrp type='temporal specification'
         targType='anchor anchor when'
         targFunc='speaker.A speaker.B when'
         domains='d1 d1 tl1'>
  <link targets='t1a t1b w1'>
  <link targets='t2a t2b w2'>
  <link targets='t3a t3b w3'>
  <link targets='t4a t4b w4'>
  <link targets='t5a t5b w5'>
  <link targets='t6a t6b w6'>
  </linkGrp>
]]>
</eg>
 
<p>Finally, suppose that a digitized audio recording is also available.
The extended pointer syntax described in section <xref target=SAXR>
could be used to address positions on or portions of this recording
directly.  Assuming that <gi>xptr</gi> elements with identifiers <code
type=val>X1</code>, <code type=val>X2</code>, etc., have been defined to
do this, these identifiers could also be included as a fourth component
in each of the above <gi>link</gi> elements, thus providing a
synchronized audio track to complement the transcribed text.
 
<!-- but this is left to the reader as an exercise because I'm -->
<!-- getting bored with this example -->
 
<p>For further discussion of this and related aspects of encoding
transcribed speech, refer to chapter <xref target=TS>.
 
<!-- The <gi>when</gi> elements can also be pointed at by the -->
<!-- <att>start</att> and <att>end</att> attributes of the <term>timed -->
<!-- elements</term> described in section <xref target=TSBATI>. -->
 
<p>The <gi>when</gi> and <gi>timeLine</gi> elements are defined as
follows:
 
<dtdFrag id=DSASYMP n='Temporal specification'>
<tagDecl tagDoc=WHEN>
<tagDecl tagDoc=TIMELINE>
</dtdFrag>
<?tei:EOF p2sasy.odd ?>
