<!-- $Id: p2fs.odd,v 1.7 1998/01/31 19:50:52 tei Exp $ -->
<!--*
    * $Log: p2fs.odd,v $
    * Revision 1.7  1998/01/31 19:50:52  tei
    * Change system 'tei2.dtd' to public identifier
    * fix log keyword (if not already fixed)
    * normalize the sgml
    *
    * Revision 1.6  94/03/27  16:29:54  lou
    * semifinal check
    *
    * Revision 1.3  1994/01/04  01:39:13  msmcq
    * revision for P3
    * -->

<!-- Chapter FS : Feature Structures                          -->
<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : Added RCS id                            -->
<!-- 93-06-28 : DTL : second round of post-Eynsham changes.   -->
<!-- Add < msr > and < rate > tags with special attributes to -->
<!-- express measurement and rate values; include in section  -->
<!-- on symbolic, numeric and string values.  Add valueTo=    -->
<!-- attribute to < nbr >, < msr > and < rate > tags to       -->
<!-- express range of numerical values.  Revise examples.     -->
<!-- Revise other sections, changing examples, etc. Eliminate -->
<!-- < vTerm > and < fTerm > tags; use < alt > tag to express -->
<!-- systematic alternation, and alternation of groups of     -->
<!-- features and values.  Change description of effect of not-->
<!-- specifying optional features (equivalent to treating them-->
<!-- as having < uncertain > rather than < default > values). -->
<!-- Revise treatment of rel=ne regarding presence of < none >-->
<!-- in equivalent alternation. Remove rel= from < vAlt >,    -->
<!-- < any >, < none >, < plus >, < minus >. < default >.     -->
<!-- Remove rel=sb and rel=ns from < sym >, < nbr >.          -->
<!-- Justify using rel=sb and rel=ns with different           -->
<!-- interpretations for < str >, < fs > and < f >.           -->
<!-- Delete section on echoes and remove < echo > from content-->
<!-- models for feature structure elements.                   -->
<!-- Make name= attribute required for < f >.                 -->
<!-- Revise DTD and entity definitions for value tags.        -->
<!-- See file FS3.dtd                                         -->
<!-- Add illustration of phobic dog text from the BNC via DD. -->
<!-- Order of sections:                                       -->
<!-- FSin Introduction                                        -->
<!-- FSbi Elementary Feature Structures: Features with Binary -->
<!--      Values                                              -->
<!-- FSfl Feature, Feature Structure and Feature Value        -->
<!--      Libraries                                           -->
<!-- FSsy Symbolic, Numeric, Measurement, Rate and String     -->
<!--      Values                                              -->
<!-- FSst Structured Values                                   -->
<!-- FSss Singleton, Set, Bag and List Collections of Values  -->
<!-- FSal Alternative Features and Feature Values             -->
<!-- FSbo Boolean, Default and Uncertain Values               -->
<!-- FSrl Indirect Specification of Values using the REL      -->
<!--      Attribute                                           -->
<!-- FSil An Extended Illustration                            -->
<!-- 93-05-25 : DTL : first round of post-Eynsham changes.    -->
<!-- Add < fvLib > ("feature-value library")                  -->
<!-- and fVal= attribute on < f >.  Revise BNC classification -->
<!-- example based on corrections from DD.  Eliminate fsVal=  -->
<!-- attribute on < f >; use fVal= instead.  Add footnote     -->
<!-- for attribution of work on chapter.                      -->
<!-- Add section FSfl, add < fLib > ("feature library") tag;  -->
<!-- add feats= attribute on < fs >.  Revise examples and add -->
<!-- examples suggested by DD and DG at Eynsham.  Add omitted -->
<!-- end tags in examples.                                    -->
<!-- 93-04-12 : MSM : add N values to dtdfrags                -->
<!-- 93-04-09 : MSM : change div levels                       -->
<!-- 93-04-08 : MSM : change idrefs to new values             -->
<!-- 92-12-18 : MSM : correct some simple tagging problems    -->
<!-- 92-12-16 : MSM : fixes to tagdocs                        -->
<!-- 92-12-16 : MSM : muck with comments at top               -->
<!-- 92-12-10 : DTL : Make minor corrections to previous      -->
<!-- revisions.  Change title of p2.4468 to "Subsumed and     -->
<!-- Negated Values".  Change title of p2.4464 (FSss) to      -->
<!-- "Singleton, Set, Bag and List Values".  Change           -->
<!-- org=unit to org=single (for "singleton"), per GS.  Add   -->
<!-- rel=sb and rel=ns to remaining value elements for        -->
<!-- which rel= is defined.  For those elements, rel=eq and   -->
<!-- rel=sb are equivalent.  rel=ne and rel=sb are also       -->
<!-- equivalent for < any > and < none >; they differ for     -->
<!-- the other tags in this domain in that rel=sb does not    -->
<!-- include the possibility of < none >, whereas rel=ne      -->
<!-- does.                                                    -->
<!-- 92-12-06 : DTL :  Exchange order of sections p2.4464     -->
<!-- (FSss) and p2.4465 (FSal).  Rename new section p2.4464   -->
<!-- (FSss) as "Unit, Set, Bag and List Values".  Rename new  -->
<!-- section p2.4465 (FSal) as "Alternative Values".          -->
<!-- Exchange order of sections p2.4466 (FSag) and p2.4467.   -->
<!-- Rename new section p2.4466 (FSag) as "Alternative        -->
<!-- Feature Groups".  Add =bag to value list for org=;       -->
<!-- change =atom to =unit as a possible value for org=.      -->
<!-- Default value for org= is #IMPLIED, so that it can be    -->
<!-- set in the < fDecl > in the FSD.  Change the content     -->
<!-- model for < f > to permit any number of occurrences of   -->
<!-- values.  However, < f org=unit > with more than one      -->
<!-- value is understood as only having its first value.      -->
<!-- Allow rel= on < f > to permit subsumption of sets, bags  -->
<!-- and lists (e.g., < f org=set rel=sb >< v1 >< v2 >...<    -->
<!-- vn > is understood as any subset of the values < v1 >,   -->
<!-- < v2 >,...< vn >).                                       -->
<!-- Eliminate < valGrp > and add the tags < vAlt >, < fAlt   -->
<!-- >, < vTerm > and < fTerm > on the grounds that the       -->
<!-- only boolean operator that needs to be separately        -->
<!-- tagged is alternation (disjunction).  However,           -->
<!-- alternation of values < vAlt > (discussed in p2.4465 (FSal))    -->
<!-- needs to be distinguished from alternation of features   -->
<!-- (discussed in p2.4466).  Moreover, values and features   -->
<!-- may have to be grouped within these tags, for which <    -->
<!-- vTerm > and < fTerm > are used.  Exclusive and           -->
<!-- inclusive alternation can be distinguished               -->
<!-- contextually, so the distinction does not have to be     -->
<!-- explicitly indicated.  Restore rel=sb and rel=ns to <    -->
<!-- fs >, and revise section p2.4468 accordingly.            -->
<!-- Redefine %fFamily; parameter entity as follows:          -->
<!-- < !ENTITY % fFamily      " f | fAlt " >                  -->
<!-- Eliminate %allVal1; and %allVal2; parameter              -->
<!-- entities, and define %singVal; and %multVal; parameter   -->
<!-- entities as follows:                                     -->
<!--   < !ENTITY % singVal      "                             -->
<!--     %booleanVal; | null | default |                      -->
<!--     uncertain " >                                        -->
<!--   < !ENTITY % multVal      "                             -->
<!--     %binaryVal; | sym | nbr |                            -->
<!--     str | fs | vAlt " >                                  -->
<!--                                                          -->
<!-- 02 Aug 92 : DTL : Add new section p2.4465 on the org=    -->
<!-- attribute for < f > defined as taking the values         -->
<!-- =atom, =set and =list.  Add < null > tag to represent    -->
<!-- the null set and the null list.  Change the content      -->
<!-- model for < f > to allow for multiple occurrences of <   -->
<!-- fs >, < sym >, < nbr > and < str >, understood as        -->
<!-- grouped by < valGrp type=conj >; decision stimulated     -->
<!-- by GS's desire to be able to leave off top level of      -->
<!-- such grouping tags in recasting old < unit > and <       -->
<!-- level > material in terms of < fs > and < f >.           -->
<!-- Renumber all subsequent sections accordingly.            -->
<!-- Extensively rewrite material in section p2.4466 on       -->
<!-- boolean values, reintroduce "underspecification", and    -->
<!-- mention "subsumption" in that section per GS.  Add       -->
<!-- discussion of obligatory, optional and obligatorily      -->
<!-- absent features in feature structures in that section.   -->
<!-- Eliminate =sb and =ns as possible values of rel= on <    -->
<!-- fs >, restoring original default =eq, and rewrite        -->
<!-- material in section p2.4468 on < fs rel=ne >.            -->
<!-- Eliminate =le, etc. as possible values of rel= on <      -->
<!-- sym >.  Rename =integer as =int.  Rewrite TAGDOCS and    -->
<!-- redo parameter entity definitions yet again, as          -->
<!-- follows.                                                 -->
<!--  < !ENTITY % booleanVal   " any | none " >               -->
<!--  < !ENTITY % binaryVal    " plus | minus " >             -->
<!--  < !ENTITY % simpleVal    " %booleanVal; |               -->
<!--    %binaryVal; | default | null " >                      -->
<!--  < !ENTITY % emptyVal     " %simpleVal; | uncertain |    -->
<!--    sym | nbr "    >                                      -->
<!--  < !ENTITY % allVal1      " %emptyVal;                   -->
<!--    | str | fs | valGrp "         >                       -->
<!--  < !ENTITY % allVal2 " %simpleVal; | uncertain | valGrp | -->
<!--    (sym)+ | (nbr)+ | (str)+ | (fs)+ "       >            -->
<!--  < !ENTITY % fFamily      " f | fGrp " >                 -->
<!-- 26 Jul 92 : DTL : Rename "boolean" as "binary", rename   -->
<!-- "underspecification" as "boolean".  Add discussion of    -->
<!-- the difference between the boolean and the binary        -->
<!-- elements.  Add rel=sb and rel=ns to < fs > per GS, and   -->
<!-- provide examples and analyses.                           -->
<!-- 24 Jul 92 : DTL : Renumber section to p2.446.  Expand    -->
<!-- on description of < fs rel=ne >.  Redo the section on    -->
<!-- underspecification and uncertainty, after further        -->
<!-- discussion with GS.  Make other minor changes.           -->
<!-- 21 Jul 92 : DTL : Define < uncertain > as < valGrp       -->
<!-- type=excl > < any >< none >< /valGrp >, per GS.          -->
<!-- Change description of distribution of rel=ne             -->
<!-- specification on < fs >, based on comments from GS.      -->
<!-- Make additional corrections and changes.                 -->
<!-- 18 Jul 92 : DTL : Change cross-references to other       -->
<!-- sections of part p2.44.  Allow < uncertain > within <    -->
<!-- valGrp >, per GS.  Refer to < fDecl > rather than to <   -->
<!-- fDeclarations >, per GS.  Drop use of "simple" and       -->
<!-- "primitive" as descriptions of certain groups of value   -->
<!-- tags, per GS.  Correct result of "distributing" rel=ne   -->
<!-- within < fs >, per GS.  Note (here) that GS suggests     -->
<!-- using a cert= attribute on value tags to indicate        -->
<!-- degree of certainty.  This seems like a good idea but    -->
<!-- perhaps best to defer.                                   -->
<!-- 16 Jul 92 : DTL : Change < link > to < echo >.  Divide   -->
<!-- old section p2.4472 into two parts, put material on      -->
<!-- rel= into separate section and renumber accordingly.     -->
<!-- Distribute < tagDecl >s among the various sections.      -->
<!-- Rename some sections.  Change content model of < f >     -->
<!-- to allow no content.  Add fsVal= attribute to < f >      -->
<!-- defined as IDREF for pointing at < fs > or < valGrp >    -->
<!-- made up exclusively of < fs >s.  Add sections on use     -->
<!-- of < echo > and disambiguation using widely available    -->
<!-- select= attribute.  Add footnote for references.         -->
<!-- 14 Jul 92 : DTL : Additional minor changes, including    -->
<!-- specifying attribute names in example tags even when     -->
<!-- they can be omitted, e.g. rel=.  Correct the markup of   -->
<!-- "sinks" example.                                         -->
<!--                                                          -->
<!-- 12 Jul 92 : DTL : Change domain= to rel=, and            -->
<!-- grouping= to type= on < valGrp > and < fGrp > in         -->
<!-- response to comments from LB.  Change =self to =eq and   -->
<!-- =cmp to =ne.  Allow values =lt, =le, =ge and =gt for     -->
<!-- rel= on < sym > and < str >, in addition to < nbr >.     -->
<!-- Divide into subsections and promote original             -->
<!-- subsection p2.4471 to new section p2.448, per LB.  Add   -->
<!-- new examples and discussion.                             -->
<!-- 08 Jul 92 : DTL : Make additional minor changes.         -->
<!-- 07 Jul 92 :  LB : Correct ODD tagging.                   -->
<!-- 07 Jul 92 : DTL : Make minor changes.  Complete draft    -->
<!-- of section 2.4471.                                       -->
<!-- 06 Jul 92 : DTL : Disallow < uncertain > in content      -->
<!-- model of < valGrp > as not meaningful.  Remove < fsGrp   -->
<!-- > as unnecessary, given < valGrp >.  Redefine            -->
<!-- parameter entities as follows:                           -->
<!--  < !ENTITY % boolean.val                                 -->
<!--  " plus | minus "     >                                  -->
<!--  < !ENTITY % primitive.val                               -->
<!--  " any | none | default | %boolean.val; "  >             -->
<!--  < !ENTITY % simple.val                                  -->
<!--  " sym | nbr | str | %primitive.val; " >                 -->
<!--  < !ENTITY % definite.val                                -->
<!--  " valGrp | fs | %simple.val; " >                        -->
<!--  < !ENTITY % all.val                                     -->
<!--  " uncertain | %definite.val; " >                        -->
<!--  < !ENTITY % f.family                                    -->
<!--  " f | f.grp " >                                         -->
<!-- 05 Jul 92 : DTL : Remove < some > and < all >.           -->
<!-- Replace < unknown > and < noclaim > by < uncertain >,    -->
<!-- latter not specified for domain=.  Revise text in        -->
<!-- accordance with these changes.  Change content model     -->
<!-- of < valGrp > to be any combination of values,           -->
<!-- including combinations of structured and simple          -->
<!-- values, per GS.  Change content model of < str > to      -->
<!-- #PCDATA, per LB.  Change content model of < fsLib > to   -->
<!-- ((fs | link)*), per GS.  Change default of name= of      -->
<!-- < f > to #IMPLIED.  Change type of name= of < f > to     -->
<!-- NMTOKEN.  Add fsType=, with type of CDATA, and fNames=   -->
<!-- with type of NMTOKENS, to < fsLib >, to provide for      -->
<!-- inheritance by contained < fs >s of type=, and by        -->
<!-- their top-level features of name=.  Make other           -->
<!-- editorial changes.  Write TAGDOCs.  Begin subsection     -->
<!-- p2.4471 on relating analyses and instances.              -->
<!-- 03 Jul 92 : DTL : Complete first draft.  Changes from    -->
<!-- ver 1.14 of LING DTD: < *.grp > become < *Grp > for *    -->
<!-- = {f, fs, val}; < fs.lib > becomes < fsLib >;            -->
<!-- < no.claim > becomes < noclaim >.                        -->

<div1 id="FS" n="16" type="Faisal"><head>Feature Structures</head>

<div2 id="FSin" type="Incunabula"><head>Introduction</head>

<p>A <term>feature structure</term> is a general purpose data structure,
which identifies and groups together individual <term>features</term>,
each of which associates a name with one or more
values.

<!-- <note place=foot>The fundamental ideas expressed in this -->
<!-- chapter were formulated by Mitch Marcus and Beatrice -->
<!-- Santorini of the Analysis and Interpretation committee of -->
<!-- the Text Encoding Initiative at a meeting of the committee -->
<!-- at The University of Arizona in March 1990.  Following their -->
<!-- publication in the first version of the Guidelines, they -->
<!-- were put into their present form by D. Terence Langendoen, -->
<!-- with extensive help from Steven Zepp and Gary Simons. -->
<!-- Dominic Dunlop provided the BNC classification example and, -->
<!-- together with Daniel Greenstein, inspired the encoding of -->
<!-- the phobic dog example.</note> -->

Because of the generality of feature structures, they can be used to
represent many different kinds of information, and interrelations among
various pieces of information, and their instantiation in SGML in these
guidelines provides a <term>metalanguage</term> for representing text
analysis and interpretation.  Moreover, this instantiation allows
feature values to be of various <term>types</term>, and for restrictions
to be placed on the values for particular features, by means of
<term>feature system declarations</term>, which are discussed in chapter
<ptr target="FD">.  These restrictions provide the basis for at least
partial validation of the feature-structure encodings that are used.
<!--  Following note deleted at DTB's suggestions: "I've said -->
<!-- before that this seems a very strange reference. I think -->
<!-- this note should be deleted. We don't cite sources of other -->
<!-- ideas in these Guidelines." -->

<!-- <note place=foot>The fundamental properties of feature -->
<!-- structures are discussed by Donald Knuth in <title>The Art -->
<!-- of Computer Programming, Vol.  I: Fundamental -->
<!-- Algorithms</title>, 1968, who used the term -->
<!-- <term>node</term> for feature structure and the term -->
<!-- <term>field</term> for feature.  More recent treatments in -->
<!-- the linguistics literature include Stuart Shieber, <title>An -->
<!-- Introduction to Unification-based Approaches to -->
<!-- Grammar</title>, 1986, and Fernando Pereira, <title>Grammars -->
<!-- and Logics of Partial Information</title>, 1987.  For -->
<!-- justification of the way in which feature structure systems -->
<!-- have been represented here in these guidelines, see -->
<!-- D. Terence Langendoen and Gary F. Simons, <title>A -->
<!-- Rationale for the TEI Recommendations for Feature-Structure -->
<!-- Markup</title>, to appear in <title>Computers in the -->
<!-- Humanities</title>.</note> --></p>

<p>This chapter is organized as follows.  Following this introduction,
section <ptr target="FSbi"> introduces the <term>binary</term> feature
values, and shows how elementary feature structures using features with
those values may be constructed.  Section <ptr target="FSfl"> introduces
the tags that represent <term>libraries</term> of features, feature

<!-- DTB suggests that fLib and fsLib should be renamed fGrp and -->
<!-- fsGrp for consistency with other aggregates; I agree (LB) -->

structures and feature values, along with methods for pointing at
features, feature structures and feature values in these libraries.
Section <ptr target="FSsy">, presents the tags for <term>symbolic</term>,
<term>numeric</term>, <term>measurement</term>, <term>rate</term>, and
<term>string</term> values.  Section <ptr target="FSst">, shows how to
use feature-structures themselves as values, thus enabling feature
structures to be recursively defined.  Section <ptr target="FSss">
demonstrates the use of multiple values for features, for encoding
<term>set</term>, <term>bag</term>, and <term>list</term> collections of
values.  Section <ptr target="FSal"> presents various methods for
representing alternations (disjunctions) of features and feature values.
Section <ptr target="FSbo">, presents tags for <term>boolean</term>,
<term>default</term>, and <term>uncertain</term> values, along with
methods for <term>underspecifying</term> feature values.  Section
<ptr target="FSrl"> shows how to specify various logical relations, such as
negation and subsumption, between the expressed values for a feature and
its actual values.  Finally, section <ptr target="FSil">, illustrates how
feature structures may be linked to to text elements.</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
<ident type="pe">TEI.fs</ident>, or an equivalent one:

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

The entire document type declaration for a document using this
additional tag set together with 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.fs  'INCLUDE' >
 ]>
]]>
</eg></p>


<p>The overall document type declaration for this additional tag set
has the following structure:

<eg id=dfs>
<![ CDATA [
<!-- 16.1:  Feature Structures                                -->
<!-- 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.         -->

<!-- ... declarations from section 16.2                       -->
<!--     (Feature structures, binary values)                  -->
<!--     go here ...                                          -->
<!-- ... declarations from section 16.3                       -->
<!--     (Feature libraries)                                  -->
<!--     go here ...                                          -->
<!-- ... declarations from section 16.4                       -->
<!--     (Symbolic, etc. values)                              -->
<!--     go here ...                                          -->
<!-- ... declarations from section 16.6                       -->
<!--     (Null values)                                        -->
<!--     go here ...                                          -->
<!-- ... declarations from section 16.7                       -->
<!--     (Alternative features and feature values)            -->
<!--     go here ...                                          -->
<!-- ... declarations from section 16.8                       -->
<!--     (Boolean, default, uncertainty values)               -->
<!--     go here ...                                          -->
]]>
</eg>

</p>
</div2>
<!-- $Id: p2fsbi.odd,v 1.3 1994/04/08 18:54:36 msmcq Exp $ -->
<!-- $Log: p2fsbi.odd,v $
# Revision 1.3  1994/04/08  18:54:36  msmcq
# Last-second fixes for P3
#
# Revision 1.2  1994/01/04  01:39:13  msmcq
# revision for P3
# -->
<!-- Revisions:                                               -->
<!-- 94-04-07 : MSM : cosmetic change to heading              -->
<!-- 94-03-30 : MSM : strip FILE att from dtdfrag             -->
<!-- 94-01-03 : MSM : Added RCS id                            -->

<div2 id=FSbi>
<head>Elementary Feature Structures:  Features with Binary Values</head>

<p>The fundamental elements of a feature structure system are <gi>f</gi>
(for <term>feature</term>) and <gi>fs</gi> (for <term>feature
structure</term>).  The <gi>fs</gi> element has a <att>type</att>
attribute for indicating what type of feature structure it represents,
and may contain any number of <gi>f</gi> elements.  An <gi>f</gi>
element, in turn, has a required <att>name</att> attribute and any
number of associated <term>values</term>.  Feature values may be binary,
numeric, symbolic (i.e. taken from a restricted set of legal values), or
string-valued, or may consist of sets, lists, or bags of binary,
numeric, symbolic, or string values.  Specialized values may also be
given which allow partial underspecification of the feature.  These
possible types of values are described in more detail in this and the
following sections.

<p>This section considers
the special case of feature structures that contain features whose
single value is one of the <term>binary values</term> represented by the
empty elements <gi>plus</gi> and <gi>minus</gi>.  The elements which are
used for representing feature structures, features and the binary
values, along with their descriptions and attributes, are the following.

<list type=gloss>
<label><gi>fs</gi></label>
<item>analyzes a collection of features and feature alternations 
as a
structural unit.
Attributes include:
<list type=gloss>
<label><att>type</att></label>
<item>provides a type for a feature structure.</item>
<label><att>feats</att></label>
<item>pointer to features.</item>
<label><att>rel</att></label>
<item>indicates the relation of the given content to the actual 
content or value of the feature structure.
Legal values are:
<list type=gloss>
<label><term>ne</term></label>
<item>indicates that the actual content is not that given.</item>
<label><term>sb</term></label>
<item>indicates that the actual content is subsumed by the given 
content.</item>
<label><term>eq</term></label>
<item>indicates that the actual content is that given.</item>
<label><term>ns</term></label>
<item>indicates that the actual content is not subsumed by the 
given content.</item>
</list></item>
</list>
</item>
<label><gi>f</gi></label>
<item>associates a name with a value of any of several different 
types.
Attributes include:
<list type=gloss>
<label><att>name</att></label>
<item>provides a name for a feature.</item>
<label><att>org</att></label>
<item>indicates organization of given value or values as 
singleton, set, bag or list.
Legal values are:
<list type=gloss>
<label><term>set</term></label>
<item>indicates that the given values are organized as a set.</item>
<label><term>single</term></label>
<item>indicates that the given value is a singleton.</item>
<label><term>list</term></label>
<item>indicates that the given values are organized as a list.</item>
<label><term>bag</term></label>
<item>indicates that the given values are organized as a bag 
(multiset).</item>
</list></item>
<label><att>fVal</att></label>
<item>points to the <att>id</att> attributes of feature values.</item>
<label><att>rel</att></label>
<item>indicates the relation between the values that are given as 
the content of the feature or pointed at by the 
<att>fVal</att> attribute and the actual values of the 
feature.
Legal values are:
<list type=gloss>
<label><term>ne</term></label>
<item>indicates that the given values are not the actual values.</item>
<label><term>sb</term></label>
<item>indicates that the given values are a subset, subbag or 
sublist of the actual values.</item>
<label><term>eq</term></label>
<item>indicates that the given values are the actual values.</item>
<label><term>ns</term></label>
<item>indicates that the given values are not a subset, subbag or 
sublist of the actual values.</item>
</list></item>
</list>
</item>
<label><gi>plus</gi></label>
<item>provides binary plus value for a feature.</item>
<label><gi>minus</gi></label>
<item>provides binary minus value for a feature.</item>
</list>


The attributes not discussed in this section are discussed in following
sections as follows: the <att>feats</att> and the <att>fVal</att>
attributes in section <ptr target=FSfl>, the <att>rel</att> attribute
in section <ptr target=FSrl>, and the <att>org</att> attribute in
section <ptr target=FSss>.

<p>An <gi>fs</gi> element containing <gi>f</gi> elements with binary
values can be straightforwardly used to encode the <term>matrices</term>
of feature-value specifications for phonetic segments, such as the
following for the English segment [s].

<!-- Adapted from Noam Chomsky and Morris Halle, The Sound    -->
<!-- Pattern of English.  New York:  Harper & Row, 1968, p.   -->
<!-- 415.                                                     -->

<eg>
<![ CDATA [
+---          ---+
| + consonantal  |
| - vocalic      |
| - voiced       |
| + anterior     |
| + coronal      |
| + continuant   |
| + strident     |
+---          ---+
]]>
</eg>

<p>Using the additional tag set for feature structures, this might be
encoded as follows.  Note that <gi>fs</gi> elements may have a
<att>type</att> attribute indicating the kind of feature structure in
question.

<eg>
<![ CDATA [
<fs type='phonological segment'>
  <f name=consonantal><plus></f>
  <f name=vocalic>    <minus></f>
  <f name=voiced>     <minus></f>
  <f name=anterior>   <plus></f>
  <f name=coronal>    <plus></f>
  <f name=continuant> <plus></f>
  <f name=strident>   <plus></f>
  </fs>
]]>
</eg>

The restriction of specific features to specific types of values (e.g.
the restriction of the feature <mentioned>strident</mentioned> to the values
<tag>plus</tag> or <tag>minus</tag>) cannot be validated by an SGML
parser.  To enable an application program to check that only legal
values for particular features appear, one may write a
<term>feature-system declaration</term>; see chapter <ptr target=FD>.

<p>Here are the formal declarations of the <gi>fs</gi>, <gi>f</gi>,
<gi>plus</gi> and <gi>minus</gi> elements.

<eg id=dfsbi>
<![ CDATA [
<!-- 16.2:  Feature structures, binary values                 -->
<!ELEMENT fs            - -  ((f | fAlt | alt)*)                >
<!ATTLIST fs                 %a.global;
          feats              IDREFS              #IMPLIED
          rel                (eq | ne | sb | ns) sb
          type               CDATA               #IMPLIED       >
<!ELEMENT f             - O  (null | (plus | minus | any | none 
                             | dft | uncertain | sym | nbr | 
                             msr | rate | str | vAlt | alt | 
                             fs)*)                              >
<!ATTLIST f                  %a.global;
          name               NMTOKEN             #REQUIRED
          fVal               IDREFS              #IMPLIED
          rel                (eq | ne | sb | ns) eq
          org                (single | set | bag | list) 
                                                 #IMPLIED       >
<!ELEMENT plus          - O  EMPTY                              >
<!ATTLIST plus               %a.global;                         >
<!ELEMENT minus         - O  EMPTY                              >
<!ATTLIST minus              %a.global;                         >
<!-- This fragment is used in sec. 16.1                       -->
]]>
</eg>

<!-- $Id: p2fsfl.odd,v 1.4 1998/01/31 19:56:11 tei Exp $ -->
<!--*
    * $Log: p2fsfl.odd,v $
    * Revision 1.4  1998/01/31 19:56:11  tei
    * remove extendarg from eg
    *
    * Revision 1.3  94/03/21  14:12:04  lou
    * second mass typo clearup
    *
    * Revision 1.2  1994/01/04  01:39:13  msmcq
    * revision for P3
    * -->
<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : add BODY element to example             -->
<!-- 94-01-03 : MSM : Added RCS id                            -->
<!-- 93-12-23 : MSM : in example change ARGS att to targFunc  -->
<!-- 93-12-22 : MSM : fix a problem in an example             -->

<div2 id=FSfl>
<head>Feature, Feature-Structure and Feature-Value Libraries</head>

<p>As the example in the preceding section illustrates, the direct
encoding of features structures can be verbose.  Consequently, the effort
of encoding large numbers of feature structures in this manner could be
enormous, and could result in the creation of enormous files.  To reduce
the size and complexity of the task of encoding feature structures, one
may use the <att>feats</att> attribute of the <gi>fs</gi> element to point
to one or more of the features of that element.  This indirect method of
encoding feature structures presumes that the <gi>f</gi> elements are
assigned unique SGML <att>id</att> values, and are collected together in
<gi>fLib</gi> elements (<term>feature libraries</term>).  In turn, feature
structures can be collected together in <gi>fsLib</gi> elements
(<term>feature-structure libraries</term>).  Finally, one may use the
<att>fVal</att> attribute of the <gi>f</gi> element to point to its
values.  This indirect method of encoding feature values presumes that
the value elements are assigned <att>id</att> specifications, and are
collected together in <gi>fvLib</gi> elements (<term>feature-value
libraries</term>).  The elements which are used for representing feature,
feature-structure and feature-value libraries, along with their
descriptions and attributes, are the following.

<list type=gloss>
<label><gi>fLib</gi></label>
<item>assembles library of feature elements.
Attributes include:
<list type=gloss>
<label><att>type</att></label>
<item>indicates type of feature library (i.e., what kind of 
features it contains).</item>
</list>
</item>
<label><gi>fsLib</gi></label>
<item>assembles library of feature structure elements.
Attributes include:
<list type=gloss>
<label><att>type</att></label>
<item>indicates type of feature-structure library (i.e., what 
type of feature structures it contains).</item>
</list>
</item>
<label><gi>fvLib</gi></label>
<item>assembles library of feature value elements.
Attributes include:
<list type=gloss>
<label><att>type</att></label>
<item>indicates type of feature-value library (i.e., what type of 
feature values it contains).</item>
</list>
</item>
</list>


<p>For example, suppose a feature library for phonological feature
specifications is set up as follows.

<eg>
<![ CDATA [
<fLib type='phonological features'>
  <f id=cns1 name=consonantal><plus> </f>
  <f id=cns0 name=consonantal><minus></f>
  <f id=voc1 name=vocalic>    <plus> </f>
  <f id=voc0 name=vocalic>    <minus></f>
  <f id=voi1 name=voiced>     <plus> </f>
  <f id=voi0 name=voiced>     <minus></f>
  <f id=ant1 name=anterior>   <plus> </f>
  <f id=ant0 name=anterior>   <minus></f>
  <f id=cor1 name=coronal>    <plus> </f>
  <f id=cor0 name=coronal>    <minus></f>
  <f id=cnt1 name=continuant> <plus> </f>
  <f id=cnt0 name=continuant> <minus></f>
  <f id=str1 name=strident>   <plus> </f>
  <f id=str0 name=strident>   <minus></f>
<!-- ... -->
  </fLib>
]]>
</eg>

<p>Then the feature structures that represent the analysis of the
phonological segments (phonemes) <code>/t/</code>, <code>/d/</code>,
<code>/s/</code> and <code>/z/</code> can be defined as follows.

<eg>
<![ CDATA [
<fs feats='cns1 voc0 voi0 ant1 cor1 cnt0 str0'></fs>
<fs feats='cns1 voc0 voi1 ant1 cor1 cnt0 str0'></fs>
<fs feats='cns1 voc0 voi0 ant1 cor1 cnt1 str1'></fs>
<fs feats='cns1 voc0 voi1 ant1 cor1 cnt1 str1'></fs>
]]>
</eg>

<p>The preceding are but four of the 128 logically possible fully
specified phonological segments using the seven binary features listed in
the feature library.  Presumably not all combinations of features
correspond to phonological segments (there are no strident vowels, for
example).  The legal combinations, however, can be collected together in a
<term>feature-structure library</term>, with each element being given a
unique <att>id</att> attribute, as in the following example.

<eg><![ CDATA [
<fsLib id=fsl1 type='phonological segment definitions'>
<!-- ... -->
  <fs id=t.df feats='cns1 voc0 voi0 ant1 cor1 cnt0 str0'></fs>
  <fs id=d.df feats='cns1 voc0 voi1 ant1 cor1 cnt0 str0'></fs>
  <fs id=s.df feats='cns1 voc0 voi0 ant1 cor1 cnt1 str1'></fs>
  <fs id=z.df feats='cns1 voc0 voi1 ant1 cor1 cnt1 str1'></fs>
<!-- ... -->
  </fsLib>
]]>
</eg>

<p>Text elements can be linked to these feature structures in any of the
ways described in section <ptr type=div2 target=AIatts>.  In the
following example, a <gi>linkGrp</gi> element is used to link selected
characters in the text <mentioned>Caesar seized control</mentioned> to their
phonological representations.

<eg><![ CDATA [
<text id=txt1> <!-- ... -->
<body> <!-- ... -->
<ab id=s1>
  <w id=s1w1>
    <c id=s1w1c1>C</c>ae<c id=s1w1c2>s</c>ar</w>
  <w id=s1w2>
    <c id=s1w2c1>s</c>ei<c id=s1w2c2>z</c>e<c id=s1w2c3>d</c></w>
  <w id=s1w3>
    con<c id=s1w3c1>t</c>rol</w>.
</ab>
<!-- ... -->
</body></text>

<fsLib id=fsl1 type='phonological segment definitions'>
<!-- as in previous example -->
  </fsLib>

<linkGrp type='phonological identification of characters'
    domains='fsl1 txt1'
    targFunc='phonological.segment character' >
<!-- ... -->
  <link id=lt targets='s.df s1w3c1'>
  <link id=ld targets='z.df s1w2c3'>
  <link id=ls targets='s.df s1w1c1'>
  <link id=ls targets='s.df s1w2c1'>
  <link id=lz targets='z.df s1w1c2'>
  <link id=lz targets='z.df s1w2c2'>

<!-- ... -->
  </linkGrp>
]]>
</eg>

<p>Because of the simplicity of the binary feature values, there is no
particular gain in pointing at those values rather than specifying them
directly.  However, the mechanism of using the <att>fVal</att> attribute
on <gi>f</gi> elements is useful for representing more complex feature
values, and can be illustrated using binary values.  Suppose the
<gi>plus</gi> and <gi>minus</gi> elements are collected together in a
<gi>fvLib</gi>, as follows.

<eg><![ CDATA [
<fvLib type='binary values'>
  <plus  id=b1>
  <minus id=b0>
  </fvLib>
]]>
</eg>

Then the feature library presented at the beginning of this section can be
represented as follows.

<eg>
<![ CDATA [
<fLib type='phonological features'>
  <f id=cns1 name=consonantal fVal=b1></f>
  <f id=cns0 name=consonantal fVal=b0></f>
  <f id=voc1 name=vocalic     fVal=b1></f>
  <f id=voc0 name=vocalic     fVal=b0></f>
  <f id=voi1 name=voiced      fVal=b1></f>
  <f id=voi0 name=voiced      fVal=b0></f>
  <f id=ant1 name=anterior    fVal=b1></f>
  <f id=ant0 name=anterior    fVal=b0></f>
  <f id=cor1 name=coronal     fVal=b1></f>
  <f id=cor0 name=coronal     fVal=b0></f>
  <f id=cnt1 name=continuant  fVal=b1></f>
  <f id=cnt0 name=continuant  fVal=b0></f>
  <f id=str1 name=strident    fVal=b1></f>
  <f id=str0 name=strident    fVal=b0></f>
<!-- ... -->
  </fLib>
]]>
</eg>

<p>Although <gi>fs</gi> elements are legitimate feature values (see
section <ptr target=FSst>), they are not allowed within <gi>fvLib</gi>
elements.  They should be placed in <gi>fsLib</gi> elements.

<p>Here are the formal declarations of the <gi>fLib</gi>, <gi>fsLib</gi>
and <gi>fvLib</gi> elements.

<eg id=dfsfl>
<![ CDATA [
<!-- 16.3:  Feature libraries                                 -->
<!ELEMENT fLib          - -  ((f | fAlt)*)                      >
<!ATTLIST fLib               %a.global;
          type               CDATA               #IMPLIED       >
<!ELEMENT fsLib         - -  ((fs | vAlt)*)                     >
<!ATTLIST fsLib              %a.global;
          type               CDATA               #IMPLIED       >
<!ELEMENT fvLib         - -  ((plus | minus | any | none | dft 
                             | uncertain | null | sym | nbr | 
                             msr | rate | str | vAlt)*)         >
<!ATTLIST fvLib              %a.global;
          type               CDATA               #IMPLIED       >
<!-- This fragment is used in sec. 16.1                       -->
]]>
</eg>

<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : Added RCS id                            -->
<!-- $Id: p2fssy.odd,v 1.3 1994/03/21 14:12:06 lou Exp $ -->
<!-- $Log: p2fssy.odd,v $
# Revision 1.3  1994/03/21  14:12:06  lou
# second mass typo clearup
#
# Revision 1.2  1994/01/04  01:39:13  msmcq
# revision for P3
# -->

<div2 id=FSsy>
<head>Symbolic, Numeric, Measurement, Rate and String Values</head>

<p>By separating out feature values as content of <gi>f</gi> elements, we
are able to classify those values into <term>types</term>.  In section
<ptr type=div2 target=FSbi>, the two empty elements which represent
binary values are defined.  In this section, we define five more
feature-value elements:  the empty elements <gi>sym</gi> for expressing
<term>symbolic values</term>, <gi>nbr</gi> for expressing <term>numeric
values</term>, <gi>msr</gi> for expressing <term>measurement
values</term>, and <gi>rate</gi> for expressing <term>rate values</term>;
and the element <gi>str</gi> for expressing <term>string values</term>.
These elements, along with their descriptions and attributes, are the
following.

<list type=gloss>
<label><gi>sym</gi></label>
<item>provides symbolic values for features.
Attributes include:
<list type=gloss>
<label><att>value</att></label>
<item>provides a symbolic value for a feature, one of a finite 
list that may be specified in a feature declaration.</item>
<label><att>rel</att></label>
<item>indicates the relation of the given value to the actual 
value.
Legal values are:
<list type=gloss>
<label><term>ne</term></label>
<item>indicates that the actual value is not that given.</item>
<label><term>eq</term></label>
<item>indicates that the actual value is that given.</item>
</list></item>
</list>
</item>
<label><gi>nbr</gi></label>
<item>provides a numeric value or range of values for a feature.
Attributes include:
<list type=gloss>
<label><att>value</att></label>
<item>provides a numeric value.</item>
<label><att>valueTo</att></label>
<item>together with <att>value</att> attribute, provides a range 
of numeric values.</item>
<label><att>type</att></label>
<item>indicates whether value or range is to be understood as 
real or integer.
Legal values are:
<list type=gloss>
<label><term>int</term></label>
<item>specifies that value is an integer; if noninteger is given 
as value of <att>value</att>, then only integer part is 
used.</item>
<label><term>real</term></label>
<item>specifies that value is a real number.</item>
</list></item>
<label><att>rel</att></label>
<item>indicates the relation of the given value or range to the 
actual value or range.
Legal values are:
<list type=gloss>
<label><term>le</term></label>
<item>indicates that the actual value or range is less than or 
equal to the given value or range.</item>
<label><term>gt</term></label>
<item>indicates that the actual value or range is greater than 
the given value or range.</item>
<label><term>ne</term></label>
<item>indicates that the actual value or range is not the value 
or range given.</item>
<label><term>ge</term></label>
<item>indicates that the actual value or range is greater than or 
equal to the given value or range.</item>
<label><term>eq</term></label>
<item>indicates that the actual value or range is that given.</item>
<label><term>lt</term></label>
<item>indicates that the actual value or range is less than the 
given value or range.</item>
</list></item>
</list>
</item>
<label><gi>msr</gi></label>
<item>provides a measure value or range of values for a feature.
Attributes include:
<list type=gloss>
<label><att>unit</att></label>
<item>provides a unit for a measure feature, one of a finite list 
that may be specified in a feature declaration.</item>
<label><att>value</att></label>
<item>provides a numeric value.</item>
<label><att>valueTo</att></label>
<item>together with <att>value</att> attribute, provides a range 
of numeric values.</item>
<label><att>type</att></label>
<item>indicates whether value or range is to be understood as 
real or integer.
Legal values are:
<list type=gloss>
<label><term>int</term></label>
<item>specifies that value is an integer; if noninteger is given 
as value of <att>value</att>, then only integer part is 
used.</item>
<label><term>real</term></label>
<item>specifies that value is a real number.</item>
</list></item>
<label><att>rel</att></label>
<item>indicates the relation of the given value or range to the 
actual value or range.
Legal values are:
<list type=gloss>
<label><term>le</term></label>
<item>indicates that the actual value or range is less than or 
equal to the given value or range.</item>
<label><term>gt</term></label>
<item>indicates that the actual value or range is greater than 
the given value or range.</item>
<label><term>ne</term></label>
<item>indicates that the actual value or range is not the value 
or range given.</item>
<label><term>ge</term></label>
<item>indicates that the actual value or range is greater than or 
equal to the given value or range.</item>
<label><term>eq</term></label>
<item>indicates that the actual value or range is that given.</item>
<label><term>lt</term></label>
<item>indicates that the actual value or range is less than the 
given value or range.</item>
</list></item>
</list>
</item>
<label><gi>rate</gi></label>
<item>provides a rate value or range of values for a feature.
Attributes include:
<list type=gloss>
<label><att>unit</att></label>
<item>provides a unit for a rate feature, one of a finite list 
that may be specified in a feature declaration.</item>
<label><att>per</att></label>
<item>provides an interval for a rate feature, one of a finite 
list that may be specified in a feature declaration.</item>
<label><att>value</att></label>
<item>provides a numeric value.</item>
<label><att>valueTo</att></label>
<item>together with <att>value</att> attribute, provides a 
numeric range of values.</item>
<label><att>type</att></label>
<item>indicates whether value is to be understood as real or 
integer.
Legal values are:
<list type=gloss>
<label><term>int</term></label>
<item>specifies that value is an integer; if noninteger is given 
as value of <att>value</att>, then only integer part is 
used.</item>
<label><term>real</term></label>
<item>specifies that value is that of a real number.</item>
</list></item>
<label><att>rel</att></label>
<item>indicates the relation of the given value or range to the 
actual value or range.
Legal values are:
<list type=gloss>
<label><term>le</term></label>
<item>indicates that the actual value or range is less than or 
equal to the given value or range.</item>
<label><term>gt</term></label>
<item>indicates that the actual value or range is greater than 
the given value or range.</item>
<label><term>ne</term></label>
<item>indicates that the actual value or range is not the value 
or range given by the element.</item>
<label><term>ge</term></label>
<item>indicates that the actual value or range is greater than or 
equal to the given value or range.</item>
<label><term>eq</term></label>
<item>indicates that the actual value or range is that given.</item>
<label><term>lt</term></label>
<item>indicates that the actual value or range is less than the 
given value or range.</item>
</list></item>
</list>
</item>
<label><gi>str</gi></label>
<item>provides a string value for a feature.
Attributes include:
<list type=gloss>
<label><att>rel</att></label>
<item>indicates the relation of the given value to the actual 
value.
Legal values are:
<list type=gloss>
<label><term>le</term></label>
<item>indicates that the actual value is less than or equal to 
the given value.</item>
<label><term>gt</term></label>
<item>indicates that the actual value is greater than the given 
value.</item>
<label><term>ne</term></label>
<item>indicates that the actual value is not that given.</item>
<label><term>sb</term></label>
<item>indicates that the value given is a substring of the actual 
value.</item>
<label><term>ge</term></label>
<item>indicates that the actual value is greater than or equal to 
the given value.</item>
<label><term>eq</term></label>
<item>indicates that the actual value is that given.</item>
<label><term>ns</term></label>
<item>indicates that the value given is not a substring of the 
actual value.</item>
<label><term>lt</term></label>
<item>indicates that the actual value is less than the given 
value.</item>
</list></item>
</list>
</item>
</list>


<p>The <gi>sym</gi> element is to be used for the value of a feature when
that feature can have any of a small, finite set of possible values,
representable as character strings.  For example, consider the problem of
specifying the grammatical <term>case</term>, <term>gender</term> and
<term>number</term> features of classical Greek noun forms.  Assuming that
the case feature can take on any of the five values
<code>nominative</code>, <code>genitive</code>, <code>dative</code>,
<code>accusative</code> and <code>vocative</code>; that the gender feature
can take on any of the three values <code>feminine</code>,
<code>masculine</code>, and <code>neuter</code>; and that the number
feature can take on either of the values <code>singular</code> and
<code>plural</code>, then the following may be used to represent the claim
that noun form <mentioned>the&aacute;s</mentioned> <gloss>goddesses</gloss> has
accusative case, feminine gender and plural number.

<eg><![ CDATA [
<fs type='word structure'>
<!-- ... -->
  <f name=case><sym value=accusative></f>
  <f name=gender><sym value=feminine></f>
  <f name=number><sym value=plural></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>Note that instead of using a symbolic value for grammatical number, one
could have named the feature <term>singular</term> or <term>plural</term>
and given it an appropriate binary value, as in the following example.
Whether one uses a binary or symbolic value in situations like this is
largely a matter of taste.

<eg><![ CDATA [
<fs type='word structure'>
<!-- ... -->
  <f name=case><sym value=accusative></f>
  <f name=gender><sym value=feminine></f>
  <f name=singular><minus></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>An SGML validator by itself cannot determine that particular values do
or do not go with particular features; in particular, it cannot
distinguish between the presumably legal encodings in the preceding two
examples and the presumably illegal encoding in the following example.

<eg><![ CDATA [
<!-- *PRESUMABLY ILLEGAL* ... -->
<fs type='word structure'>
<!-- ... -->
  <f name=case><sym value=feminine></f>
  <f name=gender><sym value=accusative></f>
  <f name=number><minus></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>There are two ways of attempting to ensure that only legal combinations
of feature names and values are used.  First, if the total number of legal
combinations is relatively small, one can simply list all of those
combinations in <gi>fLib</gi> elements (together possibly with
<gi>fvLib</gi> elements), and point to them using the <att>feats</att>
attribute in the enclosing <gi>fs</gi> element.  This method is suitable in
the situation described above, since it requires specifying a total of
only ten (5 + 3 + 2) combinations of features and values.  Further, to
ensure that the features are themselves combined legally into feature
structures, one can put the legal feature structures inside
<gi>fsLib</gi> elements.  A total of 30 feature structures (5 x 3 x 2) is
required to enumerate all the legal combinations of individual case,
gender and number values in the preceding illustration.  Of course, the
legality of the markup requires that the <att>feat</att> attributes
actually point at legally defined features, which an SGML validator, by
itself, cannot guarantee.

<p>A more general method of attempting to ensure that only legal
combinations of feature names and values are used is to provide a
feature system declaration which includes a <gi>valRange</gi> element
for each feature one uses.  Here is a sample <gi>valRange</gi> element
for the <tag>f name=case</tag> element described above; for further
discussion of the <gi>valRange</gi> element, see chapter <ptr
target=FD>; the <gi>vAlt</gi> element is discussed in section <ptr
target=FSal>.

<eg><![ CDATA [
<!-- VALRANGE specification for CASE feature -->
<valRange>
  <vAlt>
    <sym value=nominative>
    <sym value=genitive>
    <sym value=dative>
    <sym value=accusative>
    <sym value=vocative>
    </vAlt>
  </valRange>
]]>
</eg>

<p>Similarly, to ensure that only legal combinations of features are used
as the content of feature structures, one should provide
<gi>fsConstraint</gi> elements for each of the types of feature structure
one employs.  For discussion of the <gi>fDecl</gi> and
<gi>fsConstraint</gi> elements, see <ptr target=FD>.  Validation of the
feature structures used in a document based on the feature-system
declaration, however, requires that there be an application program that
can use the information contained in the feature-system declaration.

<p>Features with <tag>sym</tag>, <tag>plus</tag>, and <tag>minus</tag>
values may be used to encode highly structured information such as may be
obtained from precoded survey instruments.  We illustrate by means of a
coding scheme based on the one that is used for classifying potential
printed entries in the British National Corpus.  The scheme uses the
following features and associated values.

<list type=gloss>
<label>medium
<item>books and magazines; miscellaneous; written to be spoken
<label>domain
<item>imaginative; applied science; arts; belief and thought;
commerce and finance; leisure; natural and pure science; social science;
world affairs
<label>level
<item>high; medium; low
<label>sampling range
<item>beginning; middle; end; whole; whole less ten percent
<label>date of origination
<item>1960-1975; 1975-1993
<label>published (miscellaneous items only)
<item>yes; no
<label>selection method (books and periodicals only)
<item>chosen on grounds of circulation or influence; chosen at random
</list>

<p>A comprehensive feature library for this scheme is the following; the
<att>id</att> specifications are those currently used in the BNC project.

<eg><![ CDATA [
<fLib type='BNC classification features'>
  <f id=CA002 name=medium><sym value=book.or.periodical></f>
  <f id=CA003 name=medium><sym value=miscellaneous></f>
  <f id=CA004 name=medium><sym value=written.to.be.spoken></f>
  <f id=CA005 name=domain><sym value=imaginative></f>
  <f id=CA006 name=domain><sym value=applied.science></f>
  <f id=CA007 name=domain><sym value=arts></f>
  <f id=CA008 name=domain><sym value=belief.and.thought></f>
  <f id=CA009 name=domain><sym value=commerce.and.finance></f>
  <f id=CA00A name=domain><sym value=leisure></f>
  <f id=CA00B name=domain><sym value=natural.and.pure.science></f>
  <f id=CA00C name=domain><sym value=social.science></f>
  <f id=CA00D name=domain><sym value=world.affairs></f>
  <f id=CA00E name=level><sym value=high></f>
  <f id=CA00F name=level><sym value=medium></f>
  <f id=CA00G name=level><sym value=low></f>
  <f id=CA00H name=sample.type><sym value=beginning></f>
  <f id=CA00J name=sample.type><sym value=middle></f>
  <f id=CA00K name=sample.type><sym value=end></f>
  <f id=CA00L name=sample.type><sym value=whole></f>
  <f id=CA00M name=sample.type><sym value=whole.less.ten.percent></f>
  <f id=CA00N name=published.between><sym value=1960.1975></f>
  <f id=CA00P name=published.between><sym value=1975.1993></f>
  <f id=CA00R name=published><plus></f>
  <f id=CA00S name=published><minus></f>
  <f id=CA00T name=selection.method><sym value=principled></f>
  <f id=CA00U name=selection.method><sym value=random></f>
  </fLib>
]]>
</eg>

<p>An entry which is a book or periodical on world affairs, medium level,
sampled from the middle, published between 1975 and 1993, and selected on
a principled basis could then be assigned the following feature-structure
code; this code could also be placed in a feature-structure library that
contains all the possible fully-specified BNC entry classifications.  This
library would have a total of 1620 (3 x 9 x 3 x 5 x 2 x 2) entries.

<eg><![ CDATA [
<fs type='BNC classification for written documents'
    id=CA2DFJPT
    feats='CA002 CA00D CA00F CA00J CA00P CA00T'></fs>
]]>
</eg>

<p>The <gi>nbr</gi> element is to be used when the value of a feature is a
number or a range of numbers.  For example, suppose one wishes to encode
information contained in classified advertisements for the sale or rental
of real estate, such as the number of bedrooms and bathrooms in a listed
property, and its advertised selling or rental price.  One way of
representing such information is as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <f name=number.of.bathrooms><nbr value=2></f>
  <f name=number.of.bedrooms><nbr value=3></f>
  <f name=monthly.rent><nbr value=625.00></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>The information that the number of bedrooms is in the range from 3 to 5
and the monthly rent is in the range from 625.00 to 950.00 may be
represented as follows, using the optional <att>valueTo</att> attribute.

<eg><![ CDATA [
  <f name=number.of.bedrooms><nbr value=3 valueTo=5></f>
  <f name=monthly.rent><nbr value=625.00 valueTo=950.00></f>
]]>
</eg>

<p>The <gi>nbr</gi> (and also the <gi>msr</gi> and <gi>rate</gi> elements
defined below) element also may have a <att>type</att> attribute to
specify whether the values of the <att>value</att> and <att>valueTo</att>
attributes are to be construed as integer or real numbers.

<p>The <gi>msr</gi> element to be used when the value of a feature is a
scalar quantity, essentially a combination of a numeric value and a
symbolic value for identifying the scale on which the numeric value
occurs.  For example, real estate listings often provide the area (in
square feet or meters) of a house or apartment and the area (in acres or
hectares) of land being sold or rented.  One way of representing
information about such areas is as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <f name=interior.area><msr unit=sq.ft value=2000></f>
  <f name=property.area><msr unit=acre value=0.5></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>The value of the <tag>f name=monthly.rent</tag> feature in the two
examples above might be more accurately analysed as a measurement rather
than as a numeric value, since the amount of the rent in question is to
be understood as payable in a particular currency, such as US or
Canadian dollars or Italian lire.  To make the currency scale explicit,
the first example of this feature might be re-encoded as follows.

<eg><![ CDATA [
  <f name=monthly.rent><msr unit=USD value=625.00></f>
]]>
</eg>

<p>The <att>unit</att> and <att>value</att> attributes of the
<gi>msr</gi> element are both required.  If the <att>unit</att>
attribute is not needed (for example, if no confusion would result if
the <att>unit</att> attribute is not specified), then the <gi>nbr</gi>
element may be used to express the feature value.

<p>The <gi>rate</gi> element is to be used when the value of a feature
is a rate.  This element has a required <att>per</att> attribute for
expressing the interval over which the rate is measured (typically, but
not necessarily, a temporal interval), and an optional <att>unit</att>
attribute for expressing the scalar unit.  For example, one can encode
the wage rate of USD $8.25 per hour as follows.

<eg><![ CDATA [
  <f name=wage.rate><rate value=8.25 unit=USD per=hour></f>
]]>
</eg>

Note that the <tag>f name=monthly.rent</tag> element illustrated above can be
re-encoded as having a rate value, with a <att>per=month</att> attribute,
as follows.

<eg><![ CDATA [
  <f name=rent><rate value=625.00 unit=USD per=month></f>
]]>
</eg>

<p>To encode interest, inflation or tax rates, the <att>unit</att>
attribute can be used to indicate that the <att>value</att> attribute is
to be understood as a percentage.  For example, an interest rate of 8.25%
per year can be encoded in either of the following two ways.

<eg><![ CDATA [
  <f name=interest><rate unit=percent value=8.25 per=year></f>

  <f name=interest><rate value=0.0825 per=year></f>
]]>
</eg>

<p>Finally, the <gi>str</gi> element is to be used for the value of a
feature when that value is a string drawn from a very large or potentially
unbounded set of possible strings of characters, so that it would be
impractical or impossible to use the <gi>sym</gi> element.  These values
are expressed not as the values of the <att>value</att> attribute, as in
the case of symbolic, numeric, measurement and rate values, but as the
content of the <gi>str</gi> element.  For example, one may encode the
street address of a property in a real estate listing, as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <f name=address><str>3418 East Third Street</str></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>Here are the formal declarations of the <gi>sym</gi>, <gi>nbr</gi>,
<gi>msr</gi>, <gi>rate</gi> and <gi>str</gi> elements.

<eg id=dfssy>
<![ CDATA [
<!-- 16.4:  Symbolic, etc. values                             -->
<!ELEMENT sym           - O  EMPTY                              >
<!ATTLIST sym                %a.global;
          value              CDATA               #REQUIRED
          rel                (eq | ne)           eq             >
<!ELEMENT nbr           - O  EMPTY                              >
<!ATTLIST nbr                %a.global;
          value              CDATA               #REQUIRED
          rel                (eq | ne | lt | le | gt | ge) 
                                                 eq
          type               (int | real)        #IMPLIED
          valueTo            CDATA               #IMPLIED       >
<!ELEMENT msr           - O  EMPTY                              >
<!ATTLIST msr                %a.global;
          value              CDATA               #REQUIRED
          rel                (eq | ne | lt | le | gt | ge) 
                                                 eq
          type               (int | real)        #IMPLIED
          valueTo            CDATA               #IMPLIED
          unit               CDATA               #REQUIRED      >
<!ELEMENT rate          - O  EMPTY                              >
<!ATTLIST rate               %a.global;
          per                CDATA               #REQUIRED
          value              CDATA               #REQUIRED
          rel                (eq | ne | gt | ge | lt | le) 
                                                 eq
          type               (int | real)        #IMPLIED
          valueTo            CDATA               #IMPLIED
          unit               CDATA               #IMPLIED       >
<!ELEMENT str           - -  (#PCDATA)                          >
<!ATTLIST str                %a.global;
          rel                (eq | ne | sb | ns | lt | le | gt 
                             | ge)               eq             >
<!-- This fragment is used in sec. 16.1                       -->
]]>
</eg>

<!--* $Id: *-->
<!--* $log: $
    *
    *-->
<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : correct exx:  join takes targets, not parts -->
<!-- 93-12-23 : MSM : in example change ARGS att to targFunc  -->

<div2 id=FSst><head>Structured Values</head>

<p>Features may have <term>structured values</term> as well; these
values are represented by either the <gi>fs</gi> element, or the
<att>fVal</att> attribute on the <gi>f</gi> element, which can point
to an <gi>fs</gi> element.  Since an <gi>fs</gi> or a pointer to an
<gi>fs</gi> is permitted to occur as a value of an <gi>f</gi>,
recursion is possible. For example, an <gi>fs</gi> element may contain
or point to an <gi>f</gi> element, which may contain or point to an
<gi>fs</gi> element, which may contain or point to an <gi>f</gi>
element, and so on.  To illustrate the use of structured values,
consider the following simple model of a personal record, consisting
of a person's name, date of birth, place of birth, and sex.  Each
personal record is a <tag>fs type='personal record'</tag> tag,
consisting of the corresponding four features, three of which take
structured values, as in the following example.

<eg><![ CDATA [
<fs type='personal record'>
  <f name=full.name>
    <fs type='name record'>
      <f name=first.name><str>Kathleen</str></f>
      <f name=middle.name><str>Anne</str></f>
      <f name=surname><str>Barnett</str></f>
      </fs>
    </f>
  <f name=date.of.birth>
    <fs type='date record'>
      <f name=year><nbr value=1968></f>
      <f name=month><nbr value=4></f>
      <f name=day><nbr value=17></f>
      </fs>
    </f>
  <f name=place.of.birth>
    <fs type='place record'>
      <f name=city><str>Austin</str></f>
      <f name=state><sym value=TX></f>
      </fs>
    </f>
  <f name=sex><sym value=female>
  </fs>
]]>
</eg>

<p>Now suppose that feature-structure libraries are maintained for name
records and place records, and that the name record in the previous
example is identified with the attribute <att>id=Nkab027</att> and the
place record is identified with the attribute <att>id=txaustin</att>.

<note place=foot>Feature-structure, rather than feature-value, libraries
should be used for housing collections of feature structures.</note>
<!-- EM says: why is this necessary? Search me, guv. -->

Then the preceding example could also be encoded as follows.  (An
identifier is also provided for the personal record.)

<eg><![ CDATA [
<fs id=Pkab027 type='personal record'>
  <f name=full.name fVal=Nkab027></f>
  <f name=date.of.birth>
    <fs type='date record'>
      <f name=year><nbr value=1968></f>
      <f name=month><nbr value=4></f>
      <f name=day><nbr value=17></f>
      </fs>
    </f>
  <f name=place.of.birth fVal=txaustin></f>
  <f name=sex><sym value=female>
  </fs>
]]>
</eg>

This representation could be simplified further if a feature library is
maintained for the year, month, day and sex features, so that the
<att>feats</att> attribute may be used as follows.

<eg><![ CDATA [
<fs id=Pkab027 type='personal record' feats='sxf'>
  <f name=full.name fVal=Nkab027></f>
  <f name=date.of.birth>
    <fs type='date record' feats='y1968 m04 d17'></fs>
    </f>
  <f name=place.of.birth fVal=txaustin></f>
  </fs>
]]>
</eg>

<p>Next, suppose that a feature-structure library is also maintained
for personal records, and that the library also contains records for
the parents of the individual identified in the previous example.  Suppose
that the father is identified as Pmfb009 and the mother as Parn002.  Then
the personal-record feature structure could be easily augmented to
include pointers to the parents, as follows.

<eg><![ CDATA [
<fs id=Pkab027 type='personal record' feats='sxf'>
  <f name=full.name fVal=Nkab027></f>
  <f name=date.of.birth>
    <fs type='date record' feats='y1968 m04 d17'></fs>
    </f>
  <f name=place.of.birth fVal=austinTX></f>
  <f name=mother fVal=Parn002>
  <f name=father fVal=Pmfb009>
  </fs>
]]>
</eg>

If the personal records identified as Parn002 and Pmfb009 also contain
information about the parents of those individuals, then from the present
record, one would have access to that individual's grandparents as well.

<p>Assuming that personal records of the sort described in this
section are being maintained in association with text files, the
records can be linked to those texts in any of the ways described in
chapter <ptr target=SA>, provided that identifiers are added for
appropriate features, as in the following illustration.

<eg><![ CDATA [
<text id=Bfile><body>
<!-- ... -->
<div id=Tkab027 type='birth certificate'>
<p><name type=person id=T1kab027>Kathleen Anne Barnett</name>
was born at <time id=T1t0659>6:59 a.m.</time> on
<date id=T1d680417>April 17, 1968</date> in
<name type=org id=T1setonhsp>Seton Hospital</name> in
<name type=place id=T1txaustin>Austin</name>
to <seg id=s1>Mr.</seg> and <seg id=s2>Mrs.</seg>
<name type=person id=T1mfb009>Michael F. Barnett</name> of
<name type=place id=T1sansabaTX>San Saba</name>.
<!-- ... -->
<join id=T1arn002 targets='s2 T1mfb009'>
<join id=T2mfb009 targets='s1 T1mfb009'>
<!-- ... -->
</body></text>

<fsLib id=Prec type='personal records'>
<!-- ... -->
<fs id=Pkab027 type='personal record' feats='sxf'>
  <f name=full.name fVal=Nkab027></f>
  <f id=Dkab027 name=date.of.birth>
    <fs type='date record' feats='y1968 m04 d17'></fs>
    </f>
  <f id=Bkab027 name=place.of.birth fVal=txaustin></f>
  <f id=Mkab027 name=mother fVal=Parn002></f>
  <f id=Fkab027 name=father fVal=Pmfb009></f>
  </fs>
<!-- ... -->
</fsLib>

<linkGrp  type='record verification'
          domains='Bfile Prec'
          targFunc='source goal'>
<!-- ... -->
  <link targets='T1kab027 Nkab027'>
  <link targets='T1d680417 Dkab027'>
  <link targets='T1txaustin Bkab027'>
  <link targets='T1arn002 Mkab027'>
  <link targets='T2mfb009 Fkab027'>
<!-- ... -->
  </linkGrp>
]]>
</eg>



<!-- $Id: p2fsss.odd,v 1.5 1998/02/01 17:45:38 tei Exp $ -->
<!--*
    * $Log: p2fsss.odd,v $
    * Revision 1.5  1998/02/01 17:45:38  tei
    * killing off extendargs
    *
    * Revision 1.4  94/03/21  14:12:05  lou
    * second mass typo clearup
    *
    * Revision 1.2  1994/01/04  01:39:13  msmcq
    * revision for P3
    * -->
<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : suppress unnamed F in example           -->
<!-- 94-01-03 : MSM : Added RCS id                            -->
<div2 id=FSss>
<head>Singleton, Set, Bag and List Collections of Values</head>

<p>In the discussion to this point, we have assumed that features have
exactly one simple value.  However, for many purposes, it is useful to be
able to consider the values of certain features to be organized in more
complex ways, for example as sets, bags (or multisets), or lists.
Accordingly, we provide for four different ways in which feature values
may be organized, namely as <term>singletons</term>, <term>sets</term>,
<term>bags</term> and <term>lists</term>.  We do so by means of an
<att>org</att> attribute on the <gi>f</gi> element, which takes on one of
the designated values <code>single</code>, <code>set</code>,
<code>bag</code>, and <code>list</code>.  A feature whose value is
organized as a singleton is understood as having exactly one simple value.
If more than one value is specified for it, we assume that only the first
one is considered to be its true value.  A feature whose value is
organized as a set, bag or list may have any positive number of values as
its content.  Sets and bags are distinguished from lists in that the order
in which the values are specified does not matter for the former, but does
matter for the latter.  Sets are distinguished from bags and lists in that
repetitions of values do not count for the former but do count for the
latter.  SGML does not provide a way of validating that values for
features organized as sets are not repeated; such validation would have to
be carried out by an application program.  Our method of representing set,
bag and list values also does not permit such values to be directly
embedded within one another.  In order to embed a set within a set, for
example, one must specify the embedded set as the value of a feature of a
feature-structure value of the including set.

<note place=foot>This is not as hard as it sounds.  The embedding of a
list within a list is illustrated in the second example below.</note>

<p>No default value for the <att>org</att> attribute is declared in the
DTD; however, a default value for that attribute can be declared for
particular features in the feature-system declaration; see <ptr
target=FD>.  Note that if only one value is specified for a given
<gi>f</gi> element, the set, bag and list values of the <att>org</att> are
all essentially equivalent to the singleton value, so the omission of the
<att>org</att> attribute for such a feature is not problematic.

<note place=foot>Unless the value is the <gi>null</gi> element; see
below.</note>

<p>To illustrate the use of the <att>org</att> attribute, suppose that
the illustration of personal records from the previous section is extended
to include pointers to an individual's siblings.  Suppose also that the
individual identified as <tag>fs id=Pkab027</tag> has siblings identified
as <tag>fs id=Panb005</tag>, <tag>fs id=Pmfb010</tag> and <tag>fs
id=Pzrb001</tag> in the personal records library.  Then we may extend the
personal record for <tag>fs id=Pkab027</tag> as follows.

<eg><![ CDATA [
<fs id=Pkab027 type='personal record' feats='sxf'>
  <f name=full.name fVal=Nkab027></f>
  <f name=date.of.birth>
    <fs type='date record' feats='y1988 m04 d17'></fs>
    </f>
  <f name=place.of.birth fVal=austinTX></f>
  <f name=mother fVal=Parn002>
  <f name=father fVal=Pmfb009>
  <f name=siblings org=set fVal='Panb005 Pmfb010 Pzrb001'>
  </fs>
]]>
</eg>

<p>A more elaborate illustration of the use of the <att>org</att>
attribute is the the following <tag>f name=career org=list</tag> element which
may be added to the personal records of an individual to record the job
career of that individual.  The feature structures which constitute the
value of this feature document the jobs which the individual has held in
the order in which they were held.  Note that a list has been embedded
within a list by means of intervening <tag>fs type='employment
record'</tag> and <tag>f name=promotion.history</tag> elements.

<eg><![ CDATA [
<f name=career org=list>
  <fs type='employment record'>
    <f name=employer><str>Safeway Stores</str></f>
    <f name=hiring.information>
      <fs type='hire structure'>
        <f name=hire.date>
          <fs type='date structure' feats='y1988 m06'></fs>
          </f>
        <f name=job.title><sym value=stocker></f>
        <f name=wage><rate value=6.00 per=hour></f>
        <f name=hours.worked><rate value=40 per=week></f>
        <f name=status.code fVal=sc4A></f>
        </fs>
      </f>
    <f name=promotion.history org=list>
      <fs type='promotion record'>
        <f name=date>
          <fs type='date structure' feats='y1988 m12'></fs>
            </f>
        <f name=job.title><sym value=cashier></f>
        <f name=wage><rate value=7.00 per=hour></f>
        <f name=hours.worked><rate value=40 per=week></f>
        <f name=status.code fVal=sc4A></f>
        </fs>
      <fs type='promotion record'>
        <f name=date>
          <fs type='date structure' feats='y1990 m02'></fs>
          </f>
        <f name=job.title><sym value=supervisor></f>
        <f name=salary><rate value=18000 per=year></f>
        <f name=status.code fVal=sc3C></f>
        </fs>
      </f>
    <f name=termination.information>
      <fs type='termination structure'>
        <f name=termination.date>
          <fs type='date structure' feats='y1991 m04'></fs>
            </f>
        <f name=status.code fVal=sc3C></f>
        <f name=reason.for.termination><sym value=laid.off></f>
        </fs>
      </f>
    </fs>
  <fs type='employment record'>
    <!-- ... -->
    </fs>
  <!-- ... -->
  </f>
]]>
</eg>

<p>The information contained in such features may be linked to textual
references in the usual way.  The <tag>f name=status.code</tag> feature
has been included to show how evaluative or interpretive information can
be included along with information gleaned from textual records.  The
example presumes that the status code values are maintained in a
designated <gi>fvLib</gi>.

<p>Features with values organized as sets, bags or lists can sometimes be
used instead of features organized as singletons, whose values are
individual feature structures.  For example, consider the following
encoding of the English verb form <mentioned>sinks</mentioned>, which contains a
<tag>f name=agreement</tag> element whose value is a feature structure which
contains <tag>f name=person</tag> and <tag>f name=number</tag> elements with
symbolic values.

<eg><![ CDATA [
<fs type='word structure'>
<!-- ... -->
  <f name=word.class><sym value=verb></f>
  <f name=tense><sym value=present></f>
  <f name=agreement>
    <fs type='agreement structure'>
      <f name=person><sym value=third></f>
      <f name=number><sym value=singular></f>
      </fs>
    </f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>If one does not care about the names of the features contained within
the <tag>fs type='agreement structure'</tag> element, the containing
<tag>f name=agreement</tag> element can be given an <att>org</att>
attribute with the value <code>set</code>, and the contained <gi>fs</gi>
element, together with the person and number feature elements it
contained, can be eliminated, as follows.

<eg><![ CDATA [
<fs type='word structure'>
<!-- ... -->
  <f name=word.class><sym value=verb></f>
  <f name=tense><sym value=present></f>
  <f name=agreement org=set><sym value=third><sym value=singular></f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>The encoding in the preceding example presumes that the
<gi>fDecl</gi> element for the <tag>f name=agreement</tag> element
would look something like the following; for further details, see <ptr
target=FD>.

<eg rend=aux><![ CDATA [
<fDecl name=agreement org=set>
<!-- ... -->
  <valRange>
    <vAlt>
      <sym value=first>
      <sym value=second>
      <sym value=third>
      </vAlt>
    <vAlt>
      <sym value=singular>
      <sym value=plural>
      </vAlt>
    </valRange>
<!-- ... -->
  </fDecl>
]]>
</eg>

<p>The set, bag or list which has no members is known as the null (or
empty) set, bag or list.  To refer to it, the <gi>null</gi> element is
provided; its description and attributes are as follows.

<list type=gloss>
<label><gi>null</gi></label>
<item>represents the null set if <att>org=set</att> is specified 
for the
feature of which it is the value; represents the 
null bag if
<att>org=bag</att> is specified for the 
feature of which it is the value;
represents the null list 
if <att>org=list</att> is specified for the
feature of 
which it is the value; has no interpretation if

<att>org=single</att> is specified for the feature of which 
it is the
value.</item>
</list>


<p>So, for example, to indicate that the individual identified above
by the <tag>fs id=Pkab027</tag> element has no siblings, we may specify the
<tag>f name=siblings</tag> element as follows.

<eg><![ CDATA [
   <f name=siblings org=set><null></f>
]]>
</eg>

<p>The <gi>null</gi> element when used with a feature organized as a
singleton is a semantic error; however, its appearance as a value for such
a feature cannot be flagged by SGML.  The <gi>null</gi> element, when it
appears as a feature value, must be the only value.

<p>Here is the formal declarations of the <gi>null</gi> element.

<eg id=dfsss>
<![ CDATA [
<!-- 16.6:  Null values                                       -->
<!ELEMENT null          - O  EMPTY                              >
<!ATTLIST null               %a.global;                         >
<!-- This fragment is used in sec. 16.1                       -->
]]>
</eg>









<!-- $Id: p2fsal.odd,v 1.4 1998/02/01 17:45:38 tei Exp $ -->
<!--*
    * $Log: p2fsal.odd,v $
    * Revision 1.4  1998/02/01 17:45:38  tei
    * killing off extendargs
    *
    * Revision 1.3  94/03/21  14:12:03  lou
    * second mass typo clearup
    *
    * Revision 1.2  1994/01/04  01:39:13  msmcq
    * revision for P3
    * -->
<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : change exx:  join, alt use TARGETS=     -->
<!-- 94-01-03 : MSM : Added RCS id                            -->
<!-- 93-12-20 : MSM : provide correct idrefs for chapter SA   -->
<div2 id=FSal type='Alfalfa'>
<head>Alternative Features and Feature Values</head>

<p>In this section, two methods of representing the alternation (ambiguity
or uncertainty) of features and feature values are presented.  The first
of these methods is to be used for nonsystematic or sporadic markup of
alternation of individual features or values; it makes use of the
special-purpose <gi>fAlt</gi> and <gi>vAlt</gi> elements.  The other is to
be used for systematic markup of alternation and for the alternation of
groups of features or values; it makes use of the general-purpose
<gi>alt</gi> element introduced in section <ptr type=div2 target=SAat>.
The <gi>fAlt</gi> and <gi>vAlt</gi> elements have the following
description and attributes.

<list type=gloss>
<label><gi>fAlt</gi></label>
<item>provides alternative features for a feature structure or 
other
feature alternation.
Attributes include:
<list type=gloss>
<label><att>mutExcl</att></label>
<item>indicates whether values are mutually exclusive.
Legal values are:
<list type=gloss>
<label><term>Y</term></label>
<item>indicates that the values are mutually exclusive.</item>
<label><term>N</term></label>
<item>indicates that the values are not mutually exclusive.</item>
</list></item>
</list>
</item>
<label><gi>vAlt</gi></label>
<item>provides alternative (disjunctive) values for a feature.
Attributes include:
<list type=gloss>
<label><att>mutExcl</att></label>
<item>indicates whether values are mutually exclusive.
Legal values are:
<list type=gloss>
<label><term>Y</term></label>
<item>indicates that the values are mutually exclusive.</item>
<label><term>N</term></label>
<item>indicates that the values are not mutually exclusive.</item>
</list></item>
</list>
</item>
</list>


<p>To illustrate the use of the <gi>fAlt</gi> element to represent the
alternation of features, suppose one is uncertain whether a particular
real estate advertisement describes a house with two bedrooms or with two
bathrooms.  This uncertainty can be represented as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <fAlt>
    <f name=number.of.bathrooms><nbr value=2></f>
    <f name=number.of.bedrooms><nbr value=2></f>
    </fAlt>
<!-- ... -->
  </fs>
]]>
</eg>

<p>This representation leaves unspecified whether or not the alternation
is <term>mutually exclusive</term> (i.e. whether having two bathrooms
excludes the possibility of having two bedrooms and vice versa).  To make
this aspect of the alternation explicit, one can specify a value for the
<att>mutExcl</att> attribute, as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <fAlt mutExcl=N>
    <f name=number.of.bathrooms><nbr value=2></f>
    <f name=number.of.bedrooms><nbr value=2></f>
    </fAlt>
<!-- ... -->
  </fs>
]]>
</eg>

<p>The <gi>fAlt</gi> element can also be used to represent uncertainty
about whether the number of bathrooms is two or three, as follows; note
that the attribute value <att>mutExcl=Y</att> can be inferred for the
<gi>fAlt</gi> element in this example.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <fAlt>
    <f name=number.of.bathrooms><nbr value=2></f>
    <f name=number.of.bathrooms><nbr value=3></f>
    </fAlt>
<!-- ... -->
  </fs>
]]>
</eg>

<p>However, the <tag>f name=number.of.bathrooms</tag> element in this example
can be factored out of the alternation, and a <gi>vAlt</gi> element used
instead to represent the alternation of just the feature values, as
follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <f name=number.of.bathrooms>
    <vAlt><nbr value=2><nbr value=3></vAlt>
    </f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>The <gi>fAlt</gi> and <gi>vAlt</gi> elements can also be used to
indicate certain alternations among values of features organized as sets,
bags or lists.  For example, suppose one uses a <tag>f name=extras
org=set</tag> element in feature structures for real estate listings to
represent items that are mentioned to enhance a property's sales
value, such as whether it has a pool or a good view.  Now suppose for a
particular listing, the extras include an alarm system and a fenced-in
yard, and either a pool or a jacuzzi (but not both).  This situation could
be represented, using the <gi>vAlt</gi> element, as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <f name=extras org=set>
    <str>alarm system</str>
    <str>fenced-in yard</str>
    <vAlt mutExcl=Y>
      <str>pool</str>
      <str>jacuzzi</str>
      </vAlt>
    </f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>Now suppose the situation is like the preceding except that one is
also uncertain whether the property has an alarm system or a fenced-in
yard, or possibly both.  This can be represented as follows.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <f name=extras org=set>
    <vAlt mutExcl=N>
      <str>alarm system</str>
      <str>fenced-in yard</str>
      </vAlt>
    <vAlt mutExcl=Y>
      <str>pool</str>
      <str>jacuzzi</str>
      </vAlt>
    </f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>Finally, suppose that the listing specifies that the property has a
finished basement, and that it also has either an alarm system and a
pool or a fenced-in yard and a jacuzzi.  This situation cannot be
represented using the <gi>vAlt</gi> element, because the alternation
holds between subsets of two values each.  It can, however, be
represented using the <gi>fAlt</gi> element, as follows; note that the
<gi>str</gi> element with the value <code>finished basement</code>
element must be repeated.

<eg><![ CDATA [
<fs type='real estate listing'>
<!-- ... -->
  <fAlt mutExcl=Y>
    <f name=extras org=set>
      <str>finished basement</str>
      <str>alarm system</str>
      <str>pool</str>
      </f>
    <f name=extras org=set>
      <str>finished basement</str>
      <str>fenced-in yard</str>
      <str>jacuzzi</str>
      </f>
    </fAlt>
<!-- ... -->
  </fs>
]]>
</eg>

<p>If a large number of ambiguities or uncertainties involving a
relatively small number of features and values need to be represented,
it is recommended that the general-purpose <gi>alt</gi> element
discussed in section <ptr target=SAat> be used, rather than
the special-purpose <gi>fAlt</gi> and <gi>vAlt</gi> elements.  The use of
the <gi>alt</gi> element avoids the need to explictly represent the
alternating elements more than once.

<p>For example, suppose one has set up a <gi>fsLib</gi> element
containing feature structures representing the morphological
structures of classical Greek inflected words, along with collections
of individual features and feature values, encoded by <gi>fLib</gi>
and <gi>fvLib</gi> elements as appropriate.  The following example
shows how one might then represent the morphological structure of a
feminine gender, accusative case, plural number noun form in classical
Greek, such as <mentioned>the&aacute;s</mentioned> <gloss>goddesses</gloss>
discussed in section <ptr target=FSsy>:

<eg>
<![ CDATA [
<fsLib type='noun structures'>
  <!-- ... -->
  <!-- plural accusative feminine noun -->
  <fs id=WnGfKaNp type='noun structure' feats='Wn Gf Ka Np'></fs>
  <!-- ... -->
  </fsLib>

<fLib type='morphological features'>
  <f id=Wn  name=word.class fVal=nn></f>
  <!-- ... -->
  <f id=Gf  name=gender fVal=fe></f>
  <!-- ... -->
  <f id=Ka  name=case fVal=ac></f>
  <!-- ... -->
  <f id=Np  name=number fVal=pl></f>
  <!-- ... -->
  </fLib>

<fvLib type='morphological feature values'>
  <!-- ... -->
  <sym id=nn value=noun>
  <!-- ... -->
  <sym id=fe value=feminine>
  <!-- ... -->
  <sym id=ac value=accusative>
  <!-- ... -->
  <sym id=pl value=plural>
  <!-- ... -->
  </fvLib>
]]>
</eg>

<p>Now consider the noun form <mentioned>thea&iacute;</mentioned>
<gloss>goddesses</gloss>, which is analyzable as a feminine plural
noun form in either the nominative or the vocative case.  We may represent
this ambiguity by adding the following entries to the <gi>fsLib</gi>,
<gi>fLib</gi>, and <gi>fvLib</gi> elements in the preceding example;
assume that appropriate entries for unambiguous nominative and vocative
case forms have already been entered.

<eg><![ CDATA [
<!-- Add the following to the feature-structure library (FSLIB) -->
  <!-- plural nominative-or-vocative feminine noun -->
  <fs id=WnGfKnvNp type='noun structure' feats='Wn Gf Knv Np'></fs>

<!-- Add the following to the feature library (FLIB) -->
  <!-- CASE=nominative or vocative -->
  <f id=Knv name=case fVal=novo></f>

<!-- Add the following to the feature value library (FVLIB) -->
  <!-- nominative or vocative -->
  <alt id=novo targets='no vo'>
]]>
</eg>

<p>If the <gi>fvLib</gi> element is not used, and specifications for
particular feature values are entered as content of the <tag>f
name=...</tag> elements in the <gi>fLib</gi> element, then the ambiguity
can be represented as follows.

<eg>
<![ CDATA [
<fsLib type='noun structures'>
  <!-- ... -->
  <!-- plural nominative-or-vocative feminine noun -->
  <fs id=WnGfKnvNp type='noun structure' feats='Wn Gf Knv Np'></fs>
  <!-- ... -->
  </fsLib>

<fLib type='morphological features'>
  <!-- ... -->
  <f id=Kn name=case><sym value=nominative>
  <!-- ... -->
  <f id=Kv name=case><sym value=vocative>
  <!-- ... -->
  <alt id=Knv targets='Kn Kv'>
  <!-- ... -->
  </fLib>
]]>
</eg>

<p>The <gi>alt</gi> element together with the <gi>join</gi> element can,
unlike the <gi>fAlt</gi> and <gi>vAlt</gi> elements, be used to express
alternations between sets of features.  An example of such an
alternation is found in certain feminine gender Greek noun forms ending
in <mentioned>-as</mentioned>, such as <mentioned>pe&iacute;ras</mentioned>
<gloss>attempt(s)</gloss>, which may be analyzed as having either
genitive case and singular number features or accusative case and plural
number features, as follows (again, assuming the existence of other
elements and identifier attributes for simple features and values).

<eg><![ CDATA [
<!-- Add the following to the FSLIB element -->
  <!-- feminine noun, either genitive singular or accusative plural -->
  <fs id=WnGfKg.NsKa.Np type='noun structure' feats='Wn Gf Kg.NsKa.Np'>
    </fs>

<!-- Add the following to the FLIB element  -->
  <join id=Kg.Ns targets='Kg Ns'> <!-- genitive singular -->
  <join id=Ka.Np targets='Ka Np'> <!-- accusative plural -->

  <!-- alternation:  gen. sg. or acc. plural -->
  <alt id=Kg.NsKa.Np targets='Kg.Ns KaNp'>
]]>
</eg>

<p>Here are the formal declarations of the <gi>fAlt</gi> and
<gi>vAlt</gi> elements.

<eg id=dfsal>
<![ CDATA [
<!-- 16.7:  Alternative features and feature values           -->
<!ELEMENT fAlt          - -  ((f | fs | fAlt), (f | fs | 
                             fAlt)+)                            >
<!ATTLIST fAlt               %a.global;
          mutExcl            (Y | N)             #IMPLIED       >
<!ELEMENT vAlt          - -  ((plus | minus | any | none | dft 
                             | uncertain | null | sym | nbr | 
                             msr | rate | str | vAlt | fs), 
                             (plus | minus | any | none | dft | 
                             uncertain | null | sym | nbr | msr 
                             | rate | str | vAlt | fs)+)        >
<!ATTLIST vAlt               %a.global;
          mutExcl            (Y | N)             #IMPLIED       >
<!-- This fragment is used in sec. 16.1                       -->
]]>
</eg>

<!-- $Id: p2fsbo.odd,v 1.4 1994/03/21 14:12:03 lou Exp $ -->
<!-- $Log: p2fsbo.odd,v $
# Revision 1.4  1994/03/21  14:12:03  lou
# second mass typo clearup
#
# Revision 1.3  1994/01/04  01:39:13  msmcq
# revision for P3
#
# Revision 1.2  1993/09/23  16:36:32  msmcq
# change DEFAULT to DFT (name clash with TD)
# -->
<!-- Revisions:                                               -->
<!-- 93-09-22 : MSM : change default to dft                   -->

<div2 id=FSbo>
<head>Boolean, Default and Uncertain Values</head>

<p>In this section we define four special empty elements used as feature
values:  the <term>boolean value</term> elements <gi>any</gi> and
<gi>none</gi>, the <gi>dft</gi> element, and the <gi>uncertain</gi>
element.

<p>The boolean value elements are used to indicate whether the features
they are associated with have values.  The element <gi>any</gi>
corresponds to the boolean value <code>true</code> (i.e., that the
feature it is associated with has a value --- not the same as the binary
value <code>plus</code>), and the element <gi>none</gi> corresponds to
the boolean value <code>false</code> (i.e., that the feature it is
associated with has no value).  The <gi>dft</gi> element is used to
indicate that the feature it is associated with has its default value in
the feature structure in which it appears.  Finally, the
<gi>uncertain</gi> element may be used to indicate uncertainty about
what value, if any, its associated feature has; it is equivalent to the
alternation of the <gi>any</gi> and <gi>none</gi> elements.  To indicate
uncertainty about which of the possible legal values a particular
feature has, one should use the <gi>any</gi> element.

<p>The descriptions and attributes of these elements are as follows.

<list type=gloss>
<label><gi>any</gi></label>
<item>represents boolean <term>true</term> value variable.</item>
<label><gi>none</gi></label>
<item>represents boolean <term>false</term> value variable.</item>
<label><gi>dft</gi></label>
<item>provides default value for a feature.</item>
<label><gi>uncertain</gi></label>
<item>provides uncertainty value for a feature.</item>
</list>


<p>The values <gi>null</gi> and <gi>none</gi> are distinct.  The former is
to be used with a feature organized as a set, bag, or list to indicate
that its value is the null set, bag, or list in a particular feature
structure.
The latter is to be used with such a feature to indicate that it has no
value in a particular feature structure.

<p>The <emph>boolean</emph> values <gi>any</gi> and <gi>none</gi> are
also distinct from the <emph>binary</emph> values <gi>plus</gi> and
<gi>minus</gi>.  The latter pair are specific possible values for
features, whereas the former pair represent <emph>ranges</emph> of
possible values, not specific possible values, for features.  For
example, suppose that the <gi>valRange</gi> element for the <tag>f
name=auxiliary</tag> element is declared as follows in the feature structure
declaration, so that either boolean value is legal.

<eg><![ CDATA [
<!-- VALRANGE tag for the AUXILIARY feature -->
<valRange><vAlt><plus><minus></vAlt></valRange>
]]>
</eg>

Then the following two pairs of specifications are distinct.

<eg><![ CDATA [
<f name=auxiliary><plus></f>  =/= <f name=auxiliary><any></f>

<f name=auxiliary><minus></f> =/= <f name=auxiliary><none></f>
]]>
</eg>

In this situation, the <gi>any</gi> element is equivalent to the
alternation of the <gi>plus</gi> and <gi>minus</gi> elements, and the
<gi>none</gi> element is equivalent to the negation of that alternation.

<p>However, if the auxiliary feature is declared to take only the
<gi>plus</gi> value, then the first pair of the specifications below
are equivalent, but the second is not; in fact, the first member of the
second pair is invalid.

<eg><![ CDATA [
<f name=auxiliary><plus></f>  ==  <f name=auxiliary><any></f>

<f name=auxiliary><minus></f> =/= <f name=auxiliary><none></f>
]]>
</eg>

<p>It is even possible to declare that a particular feature can never
have values, as follows for the feature <tag>f name=impossible</tag>.

<eg><![ CDATA [
<!-- VALRANGE tag for the IMPOSSIBLE feature -->
<valRange></valRange>
]]>
</eg>

In this case, the following specifications are equivalent.

<eg><![ CDATA [
<f name=impossible><any></f>  == <f name=impossible><none></f>
]]>
</eg>

<p>The elements <gi>any</gi> and <gi>dft</gi> are also designed to be
used in conjunction with the <gi>fDecl</gi> and <gi>valDefault</gi>
elements in the feature system declaration discussed in section <ptr
target=FD>.  First, consider the <gi>any</gi> element, and suppose that
the <gi>valRange</gi> element in the <gi>fDecl</gi> element for the <tag>f
name=gender</tag> element is specified as follows.

<eg><![ CDATA [
<!-- VALRANGE for the GENDER feature -->
<valRange>
  <vAlt>
    <sym value=feminine>
    <sym value=masculine>
    <sym value=neuter>
    </vAlt>
  </valRange>
]]>
</eg>

Then the following two representations are equivalent.

<eg><![ CDATA [
<f name=gender><any></f>

<f name=gender>
  <vAlt>
    <sym value=feminine>
    <sym value=masculine>
    <sym value=neuter>
    </vAlt>
  </f>
]]>
</eg>

<p>Second, consider the <gi>dft</gi> element, and suppose that the
default value for the <tag>f name=gender</tag> element is specified in the
<gi>valDefault</gi> element of its <gi>fDecl</gi> element as having the value
<tag>sym value=feminine</tag>.  Then the following three representations
are equivalent; note that if a <tag>f name=...</tag> element appears without
content and without a valid <att>fVal</att> attribute, then it is
equivalent to the same element with the <gi>dft</gi> element as its content.

<eg><![ CDATA [
<f name=gender></f>

<f name=gender><dft></f>

<f name=gender><sym value=feminine></f>
]]>
</eg>

<p>Using the <gi>any</gi> and <gi>dft</gi> elements, together with an
<gi>fDecl</gi> element for the corresponding feature in the feature system
declaration, provides a method for <term>underspecifying</term> the
value of that feature.  The <gi>any</gi> element means that the
associated feature has a legal value but what value it has is not
specified.  The <gi>dft</gi> element means that the associated feature
has the value which the encoder has declared is the normal value of the
feature.

<p>The boolean elements <gi>any</gi> and <gi>none</gi> also have
specific uses within <gi>fsConstraints</gi> and <gi>fDecl</gi> elements
in feature system declarations, as described in
chapter <ptr target=FD>.  For example, the element <gi>any</gi> can
appear as the value of a feature contained within an <gi>fs</gi> of a
particular type which appears in the <gi>cond</gi> element of an
<gi>fsConstraints</gi> element, to indicate that the feature must appear
in feature structures of the designated type (i.e., that it is
obligatory) and that when it does appear, it may appear with any of its
legal values.  Similarly, <gi>none</gi> can appear in this way to
specify that the feature cannot be present in feature structures of the
indicated type (i.e., that it is obligatorily absent from such feature
structures).  All other features that are declared to have values are
understood to be optional in such feature structures.

<p>For example, the following may appear as part of the
<gi>fsConstraints</gi> of a feature system declaration to indicate
that a <tag>fs type='agreement structure'</tag> must contain a legal
instance of the <tag>f name=number</tag> element but must not contain a
legal instance of the <tag>f name=category</tag> element.

<eg><![ CDATA [
<cond><fs type='agreement structure'></fs>
<then><fs>
         <f name=number><any></f>
         <f name=category><none></f>
         </fs>
]]>
</eg>

<p>Further constraints can be imposed on a feature structure of a
particular type in the <gi>valRange</gi> elements of features which take
feature structures of that type as values.  For example, suppose that verb
and adjective agreement in German are represented by feature structures of
the following sorts, in which verb forms agree in person and number with
their subjects and adjective forms agree in gender, case, and number
with
their subjects.

<eg><![ CDATA [
<fs type='verb structure'>
<!-- ... -->
  <f name=verbAgreement>
    <fs type='agreement structure'>
      <f name=person><sym value=first></f>
      <f name=number><sym value=plural></f>
      </fs>
    </f>
<!-- ... -->
  </fs>

<fs type='adjective structure'>
<!-- ... -->
  <f name=adjAgreement>
    <fs type='agreement structure'>
      <f name=gender><sym value=feminine></f>
      <f name=case><sym value=accusative></f>
      <f name=number><sym value=plural></f>
      </fs>
    </f>
<!-- ... -->
  </fs>
]]>
</eg>

<p>In order to ensure that a <tag>fs type='agreement structure'</tag>
tag which appears as the value of a <tag>f name=verbAgreement</tag> element
may be specified for any person and number feature, but for no gender
and case feature, we may provide a <gi>valRange</gi> element for the
<code>verbAgreement</code> feature as follows.

<eg><![ CDATA [
<!--VALRANGE specification for the VERBAGREEMENT feature -->
<valRange>
  <fs type='agreement structure'>
    <f name=person><any></f>
    <f name=case><none></f>
    <f name=gender><none></f>
    <f name=number><any></f>
    </fs>
  </valRange>
]]>
</eg>

Similarly, to ensure that a <tag>fs type='agreement structure'</tag> element
which appears as the value of a <tag>f name=adjAgreement</tag> element may
be specified for any case, gender, and number feature, but for no person
feature, we may provide a <gi>valRange</gi> element for the
<code>adjAgreement</code> feature as follows.

<eg><![ CDATA [
<valRange>
  <fs type='agreement structure'>
    <f name=person><none>
    <f name=case><any>
    <f name=gender><any>
    <f name=number><any>
    </fs>
  </valRange>
]]>
</eg>

<p>The combination of declarations like these and the principle of
<term>subsumption</term> discussed in <ptr target=FSrl>, allows feature
structures to be underspecified in text markup.  For example, to
indicate that a given adjective inflection feature (tagged <tag>f
name=adjInflection</tag>) is a feature structure (tagged <tag>fs
type='inflection structure'</tag>) specifying plural number and any
gender and case, we can omit the elements for gender and case on the
<gi>fs</gi> element, as follows.

<eg><![ CDATA [
<f name=adjInflection>
  <fs type='inflection structure'>
    <f name=number><sym value=plural></f>
    </fs>
  </f>
]]>
</eg>

When supplied as the value of a verb inflection feature (tagged <tag>f
name=verbInflection</tag>), the same feature structure would be
interpreted as an inflection structure specifying plural number and any
person.

<p>If an optional feature is not specified in a feature-structure value,
then it is assumed to occur with the <gi>uncertain</gi> value.  For
further discussion, see section <ptr target=FSrl>.

<p>Here are the formal declarations of the <gi>any</gi>, <gi>none</gi>,
<gi>dft</gi>, and <gi>uncertain</gi> elements.

<eg id=dfsbo>
<![ CDATA [
<!-- 16.8:  Boolean, default, uncertainty values              -->
<!ELEMENT any           - O  EMPTY                              >
<!ATTLIST any                %a.global;                         >
<!ELEMENT none          - O  EMPTY                              >
<!ATTLIST none               %a.global;                         >
<!ELEMENT dft           - O  EMPTY                              >
<!ATTLIST dft                %a.global;                         >
<!ELEMENT uncertain     - O  EMPTY                              >
<!ATTLIST uncertain          %a.global;                         >
<!-- This fragment is used in sec. 16.1                       -->
]]>
</eg>















<!-- $Id: p2fsrl.odd,v 1.4 1994/03/21 14:12:05 lou Exp $ -->
<!-- $Log: p2fsrl.odd,v $
# Revision 1.4  1994/03/21  14:12:05  lou
# second mass typo clearup
#
# Revision 1.2  1994/01/04  01:39:13  msmcq
# revision for P3
# -->
<!-- Revisions:                                               -->
<!-- 94-01-03 : MSM : correct end-tag valt in an ex           -->
<!-- 94-01-03 : MSM : Added RCS id                            -->

<div2 id=FSrl><head>Indirect Specification of Values Using the
<att>rel</att> Attribute</head>

<p>The <att>rel</att> attribute is provided for the feature value
elements <gi>sym</gi>, <gi>nbr</gi>, <gi>msr</gi>, <gi>rate</gi>,
<gi>str</gi>, <gi>fs</gi>, and <gi>default</gi> (but not <gi>plus</gi>,
<gi>minus</gi>, <gi>null</gi>, <gi>vAlt</gi>, <gi>any</gi>,
<gi>none</gi>, and <gi>uncertain</gi>).  This attribute may be used for
specifying which of various logical relations the given value has to the
actual value of the feature.  For all value elements for which the
<att>rel</att> attribute is defined, except for <gi>fs</gi>, the default
value for that attribute is <code>eq</code>, which means that the actual
value is equal (or identical) to the given value.  Accordingly, the
following representations are both interpreted to mean that the value of
the <tag>f name=case</tag> element is the <tag>sym value=genitive</tag> element.

<eg><![ CDATA [
<f name=case><sym value=genitive></f>

<f name=case><sym rel=eq value=genitive></f>
]]>
</eg>

<div3><head>The Not-Equals Relation</head>

<p>The <att>rel</att> attribute can also be specified as having the
value <code>ne</code>, which means that the associated feature has a
value which is not equal to the given value.  For example, the value
<tag>nbr rel=ne value=1</tag> in the following example denotes any legal
numeric value for the element <tag>f name=number.of.bathrooms</tag> other
than <code>1</code>.

<eg><![ CDATA [
<f name=number.of.bathrooms><nbr rel=ne value=1></f>
]]>
</eg>

<p>If an <gi>fDecl</gi> element has been provided which defines the
legal values for the associated feature, then the value <code>ne</code> can be
given a positive interpretation.  For example, suppose that the
<gi>valRange</gi> element is declared in the <gi>fDecl</gi> element
for the <gi>f name=case</gi> element as follows.

<eg><![ CDATA [
<!-- VALRANGE specification in FDECL for CASE feature -->
<valRange>
  <vAlt>
    <sym value=nominative>
    <sym value=genitive>
    <sym value=dative>
    <sym value=accusative>
    <sym value=vocative>
    </vAlt>
  </valRange>
]]>
</eg>

<p>Suppose also that the <tag>f name=case</tag> element is declared as
obligatory in a particular feature structure.  Then the following
specifications are equivalent in that structure.

<eg><![ CDATA [
<f name=case><sym rel=ne value=genitive></f>

<f name=case>
  <vAlt>
    <sym value=nominative>
    <sym value=dative>
    <sym value=accusative>
    <sym value=vocative>
    </vAlt>
  </f>
]]>
</eg>

That is, when the <att>rel</att> attribute occurs with the value
<code>ne</code> in the value of an obligatory feature in a feature structure,
the actual value of that feature may be any of its legal values
<emph>other than</emph> the specified value.

<p>On the other hand, if the <tag>f name=case</tag> feature is declared
as optional in a particular feature structure, then the following
specifications are equivalent in that structure.

<eg><![ CDATA [
<f name=case><sym rel=ne value=genitive></f>

<f name=case>
  <vAlt>
    <sym value=nominative>
    <sym value=dative>
    <sym value=accusative>
    <sym value=vocative>
    <none>
    </vAlt>
  </f>
]]>
</eg>

That is, when the <att>rel</att> attribute has the value
<code>ne</code> in the value of an optional feature in a feature structure,
the actual value of that feature may be any of its legal values other
than the specified value, or <gi>none</gi>.

<p>If the <att>rel</att> attribute is specified with the value
<code>ne</code> for a <gi>nbr</gi>, <gi>msr</gi>, or <gi>rate</gi>
element for which the <att>valueTo</att> attribute is also specified,
then the actual range may be any range distinct from that given.  For
example, the following means that the number of bathrooms is a range
distinct from 3 to 5 (e.g., 3 to 4, 3 to 6, 4 to 5, 4 to 6, 0 to 2,
etc.).

<eg><![ CDATA [
<f name=number.of.bathrooms><nbr rel=ne value=3 valueTo=5></f>
]]>
</eg>

<!-- To express the notion that the number of bedrooms is     -->
<!-- completely outside the range specified (i.e. less than   -->
<!-- three or more than five), ... how?                       -->

<div3><head>Other Inequality Relations</head>

<p>For the elements <gi>nbr</gi>, <gi>msr</gi>, <gi>rate</gi>, and
<gi>str</gi>, the <att>rel</att> attribute may also take on the
following values; the use of these values for the <gi>str</gi> element
presumes that a particular character and string ordering (or
<term>sorting</term>) convention is understood.

<!-- From DTL to EDITORS: Where can this convention be referred to?  -->
<!-- I don't know. (msm)                                      -->

<list type=gloss>

<label>lt <item>The actual value or range is any legal value or range
less than the specified value or range.

<label>le <item>The actual value or range is any legal value or range
less than or equal to the specified value or range.

<label>gt <item>The actual value or range is any legal value or range
greater than the specified value or range.

<label>ge <item>The actual value or range is any legal value or range
greater than or equal to the specified value or range.

</list>

<p>These attribute values may be used as shown in the following
examples.  The first states that the number of bedrooms is less than 5;
the second that an illegal speed is any speed greater than 65 miles per
hour; the third that a lot size is in a range which is less than or
equal to the range of from 5 to 10 acres;

<note place=foot>We say that one range is less than or equal to another
if both the <att>value</att> and <att>valueTo</att> attributes of the
first are less than or equal to the corresponding attributes of the
second.</note>

the fourth that the last name is any string greater than the empty
string (i.e., any nonempty string, given normal string-ordering
conventions); and the fifth that for a feature whose value is a list of
two strings, the first precedes the string <mentioned>M</mentioned> and the
second is the string <mentioned>M</mentioned>, or any string following it.

<eg><![ CDATA [
<f name=number.of.bedrooms><nbr rel=lt value=5></f>

<f name=illegal.speed><rate rel=gt value=65 unit=miles per=hour></f>

<f name=lot.size><msr rel=le value=5 valueTo=10 unit=acre></f>

<f name=last.name><str rel=gt></str></f>

<f name=pairs org=list><str rel=lt>M</str><str rel=ge>M</str></f>
]]>
</eg>

<div3><head>Subsumption and Non-subsumption Relations</head>

<p>When the <att>rel</att> attribute is given the values <code>sb</code> or
<code>ns</code>, the markup expresses the claim that the value given
subsumes, or does not subsume, the actual value for the feature in
question.

<p>On the <gi>str</gi> element, these values are used to specify that
the string value given in the <gi>str</gi> element is or is not a
<term>substring</term> of the actual value of the feature.  The first
example below specifies that the actual feature value may be any string
at all (since the empty string is a substring of every string), the
second that it might be any string in which the string
<mentioned>the</mentioned> occurs as a substring, and the third that it might be
any string in which the string <mentioned>the</mentioned> does not occur as a
substring.

<eg><![ CDATA [
<str rel=sb></str>
<str rel=sb>the</str>
<str rel=ns>the</str>
]]>
</eg>

<p>On the <gi>fs</gi> element, the attribute values <code>sb</code> and
<code>ns</code> indicate that the given feature structure does or does not
legally <term>subsume</term> the actual feature structure.  By
definition, one feature structure subsumes another if the second feature
structure is identical to the first or contains more information than
the first.  The default value for the <att>rel</att> attribute of the
<gi>fs</gi> element is <code>sb</code>.  The subsumption of feature
structures is illustrated by the following four examples; suppose that
the <tag>f name=person</tag> and <tag>f name=number</tag> elements are
either optional or obligatory in these <tag>fs type='agreement
structure'</tag> example elements.

<eg><![ CDATA [
<fs id=p3ns type='agreement structure'>
  <f name=person><sym value=third></f>
  <f name=number><sym value=singular></f>
  </fs> <!-- 3d person singular -->

<fs id=p3nx type='agreement structure'>
  <f name=person><sym value=third></f>
  </fs> <!-- 3d person -->

<fs id=pxns type='agreement structure'>
  <f name=number><sym value=singular></f>
  </fs> <!-- singular -->

<fs id=pxnx type='agreement structure'>
  </fs> <!-- -->
]]>
</eg>

<p>The fourth example, <q>pxnx</q>, subsumes all four of the examples,
since each contains at least as much information as does feature
structure <q>pxnx</q>.  Conversely, the first example, <q>p3ns</q>,
subsumes only itself.  Finally, the second and third examples,
identified as <q>p3nx</q> and <q>pxns</q> attributes, subsume themselves
and the first feature structure, but not each other.

<p>If both person and number are obligatory features of agreement
structure elements, then the last three elements in the preceding list
have the same interpretation as their counterparts in the following
list.

<eg><![ CDATA [
<fs id=p3na type='agreement structure'>
  <f name=person><sym value=third></f>
  <f name=number><any></f>
  </fs> <!-- 3d person -->

<fs id=pans type='agreement structure'>
  <f name=person><any></f>
  <f name=number><sym value=singular></f>
  </fs> <!-- singular -->

<fs id=pana type='agreement structure'>
  <f name=person><any></f>
  <f name=number><any></f>
  </fs> <!-- -->
]]>
</eg>

<p>On the other hand, if both person and number are optional features of
agreement structures, then those three elements have the same
interpretation as their counterparts in the following list.

<eg><![ CDATA [
<fs id=p3nu type='agreement structure'>
  <f name=person><sym value=third></f>
  <f name=number><uncertain></f>
  </fs> <!-- 3d person -->

<fs id=puns type='agreement structure'>
  <f name=person><uncertain></f>
  <f name=number><sym value=singular></f>
  </fs> <!-- singular -->

<fs id=punu type='agreement structure'>
  <f name=person><uncertain></f>
  <f name=number><uncertain></f>
  </fs> <!-- -->
]]>
</eg>

That is, if an optional feature is omitted from a feature-structure
representation, then that feature may have any of its legal values or
the value <gi>uncertain</gi>.

<p>The value <code>sb</code> is chosen as the default value for the
<att>rel</att> attribute of the <gi>fs</gi> element, because it provides
for the most economical means for underspecifying them.  One situation
in which it may be preferable to specify <tag>fs rel=eq</tag> is when
the feature structure has many optional features and it is known that
none of them occur.

<p>The specification <tag>fs rel=ns</tag> is used to denote the feature
structures that the specified feature structure does not subsume.  This
provides a handy way of saying that a certain combination of features is
not present, for example the combination of third person and singular
number, as in the agreement structure of the English verb form
<mentioned>sink</mentioned>, understood as a present tense verb form.  The
following example expresses the claim that third-person and
singular-number features are not both present in the agreement feature,
but makes no further claim about what is present.

<eg><![ CDATA [
<f name=agreement>
  <fs id=Np3ns rel=ns type='agreement structure'>
    <f name=person><sym value=third></f>
    <f name=number><sym value=singular></f>
    </fs>
  </f>
]]>
</eg>

<p>In most real situations, of course, one can infer, from the range of
possible values for person and number, what the remaining possibilities
are.  Suppose, for example, that in the relevant feature system
declaration, the features <mentioned>person</mentioned> and
<mentioned>number</mentioned> are given the following <gi>valRange</gi>
elements:

<eg><![ CDATA [
<!-- VALRANGE for the PERSON feature  -->
<valRange>
  <vAlt>
    <sym value=first>
    <sym value=second>
    <sym value=third>
    </vAlt>
  </valRange>

<!-- VALRANGE for the NUMBER feature  -->
<valRange>
  <vAlt>
    <sym value=singular>
    <sym value=plural>
    </vAlt>
  </valRange>
]]>
</eg>

<p>Suppose, further, that the person and number features are obligatory
in feature structures of the type <q>agreement structure</q>.  Then the
element <tag>fs id=Np3ns</tag> above is equivalent to the following
alternation; the features whose value is <gi>any</gi> may be omitted,
since they are implied by the default value of <code>sb</code> for the
<att>rel</att> attribute in the enclosing <gi>fs</gi> elements.

<eg><![ CDATA [
<vAlt id=p12na-panp>
  <fs id=p12na type='agreement structure'>
    <f name=person>
      <vAlt><sym value=first><sym value=second></vAlt></f>
    <f name=number><any></f>
    </fs>
  <fs id=panp type='agreement structure'>
    <f name=person><any></f>
    <f name=number><sym value=plural></f>
    </fs>
  </vAlt>
]]>
</eg>

<p>If, on the other hand, the person and number features were optional
in feature structures of type <q>agreement structure</q>, then the
interpretation of an underspecified feature structure will change.  The
element <tag>fs id=Np3ns</tag> given above is then equivalent to the
following alternation; the features whose value is <gi>uncertain</gi>
may be omitted as they are implied by the default subsumption relation
holding between the structure given and the actual structure.

<eg><![ CDATA [
<vAlt id=p120nu-punp0>
  <fs id=p120nu type='agreement structure'>
    <f name=person>
      <vAlt><sym value=first><sym value=second><none></vAlt>
      </f>
    <f name=number><uncertain>
    </fs>
  <fs id=punp0 type='agreement structure'>
    <f name=person><uncertain>
    <f name=number>
      <vAlt><sym value=plural><none></vAlt>
      </f>
    </fs>
  </vAlt>
]]>
</eg>

<div3><head>Relations Holding with Sets, Bags, and Lists</head>

<p>The <att>rel</att> attribute is also provided for the <gi>f</gi>
element, but is designed to be used with that element only when its
<att>org</att> attribute (see section <ptr target=FSss>) is set to
<code>set</code>, <code>bag</code>, or <code>list</code>.  When
associated with the <gi>f</gi> element, the <att>rel</att> attribute may
take on any of the following four values:  <code>eq</code>,
<code>ne</code>, <code>sb</code>, and <code>ns</code>.  The default
value is <code>eq</code>.  Consider first the use of the <att>rel</att>
attribute with the <gi>f</gi> element when the given value of the
feature is <gi>null</gi>.

<eg><![ CDATA [
<f name=extras org=set><null></f>

<f name=extras org=set rel=ne><null></f>

<f name=extras org=set rel=sb><null></f>

<f name=extras org=set rel=ns><null></f>
]]>
</eg>

<p>The first example states that the <mentioned>extras</mentioned> feature has
the null set as its value.  The second example states that the
<mentioned>extras</mentioned> feature is a set which is not equal to the null
set.  That is, its actual value might be any non-null set.  The third
example states that the <mentioned>extras</mentioned> feature has as its value a
set of which the null set is a subset; that is to say, any set at all,
including the null set.  Note that this is not equivalent to the
following, which states that the extras feature has as its value a
single element which is any legal value for the <mentioned>extras</mentioned>
feature, including for example a <gi>str</gi> element containing the
value <code>pool</code>.

<eg><![ CDATA [
<f name=extras org=set><any></f>
]]>
</eg>

<p>Finally, the fourth example states that the <mentioned>extras</mentioned>
feature has as its value a set of which the null set is not a subset.
Since the null set is a subset of every set, the fourth example in
effect claims that the <mentioned>extras</mentioned> feature has no legal value;
it is thus equivalent to the following, which states directly that the
<mentioned>extras</mentioned> feature has no value.

<eg><![ CDATA [
<f name=extras org=set><none></f>
]]>
</eg>

<p>Consider next the use of the <att>rel</att> attribute with the
<gi>f</gi> element when the given value of the feature is a single
<gi>str</gi> element with the content <code>pool</code>:

<eg><![ CDATA [
<f name=extras org=set><str>pool</str></f>

<f name=extras org=set rel=ne><str>pool</str></f>

<f name=extras org=set rel=sb><str>pool</str></f>

<f name=extras org=set rel=ns><str>pool</str></f>
]]>
</eg>

<p>The first example states that the value of the
<mentioned>extras</mentioned> feature is a set consisting of a single member,
namely a <gi>str</gi> element containing the value <code>pool</code>.
The second example states that the <mentioned>extras</mentioned> feature has
as its value a set which is not equal to the set consisting of this
particular member. It could, however, be a two-membered set, one of
whose members is some other value. This example is thus not equivalent
to the following, which states that the <mentioned>extras</mentioned> feature
has as its value a set comprising a single member other than a
<gi>str</gi> element with the content <code>pool</code>:


<eg><![ CDATA [
<f name=extras org=set><str rel=ne>pool</str></f>
]]>
</eg>

<p>The third example states that the <mentioned>extras</mentioned> feature has
as its value any set of which the set consisting of the single member
specified is a subset (i.e., any set which contains the element
<gi>str</gi> with the value <code>pool</code>, and possibly
others). Finally, the fourth example states that the
<mentioned>extras</mentioned> feature has as its value any set which does not
contain this element as a member.

<div3><head>Varieties of Subsumption and Non-subsumption</head>

<p>The <att>rel</att> values <code>sb</code> and <code>ns</code> have different
meanings depending on whether they occur within a <gi>str</gi>,
<gi>fs</gi> or <gi>f</gi> element.  However, the use of a common name
for the value reflects a fundamental similarity in those meanings.  For
example, the value <code>sb</code> can be used in all three elements to
indicate that the actual value is any string, any feature structure, or
any set, bag or list, as follows. In the second example below, the
<att>rel</att> attribute has not been specified, since it has the value
<code>sb</code> by default on <gi>fs</gi> elements.

<eg><![ CDATA [
<str rel=sb></str>

<fs></fs>

<f name=... org=set rel=sb><null></f>

<f name=... org=bag rel=sb><null></f>

<f name=... org=list rel=sb><null></f>
]]>
</eg>

<p>Because the value <code>sb</code> is not defined for the attribute
<att>rel</att> on the <gi>nbr</gi>, <gi>msr</gi> and <gi>rate</gi>
elements, the indication that a value may be any number, measure or rate
is sometimes not quite as simple.  Here is one way of specifying any
positive or negative integer numeric value.

<note place=foot>Typically, there will be no need to use an encoding
like this one as the value of a feature, since the <gi>any</gi> element
is available for that purpose.  However, in setting up the feature
declaration for that feature, it may be necessary to use such an
encoding, precisely so as to provide an interpretation for the use of
the <gi>any</gi> element as the value of that feature.</note>

<eg><![ CDATA [
<vAlt>
  <nbr type=int rel=gt value=0>
  <nbr type=int rel=le value=0>
  </vAlt>
]]>
</eg>

<p>The value <code>ns</code> also is understood in similar ways in the
different elements in which it may occur.  Above in this section, the
equivalence of the following representations under certain conditions
was shown (the <att>id</att> attributes and the redundant features with
<tag>any</tag> values have been omitted).

<eg><![ CDATA [
<f name=agreement>
  <fs rel=ns type='agreement structure'>
    <f name=person><sym value=third></f>
    <f name=number><sym value=singular></f>
    </fs>
  </f>

<f name=agreement>
  <vAlt>
    <fs type='agreement structure'>
      <f name=person>
        <vAlt><sym value=first><sym value=second></vAlt>
        </f>
      </fs>
    <fs type='agreement structure'>
      <f name=number><sym value=plural></f>
      </fs>
    </vAlt>
  </f>
]]>
</eg>

<p>The value <code>ns</code> has an analogous meaning when the value in
question is a set rather than a feature structure.  Recast in such
terms, the equivalence above still holds good:

<!-- paragraph above substituted by msm for the following.    -->
<!-- I *think* they mean the same thing!                      -->

<!-- < p>If we replace the first of these representations by  -->
<!-- a comparable one in which a set of symbolic values       -->
<!-- occurs as the value of the < tag>f name=agreement <      -->
<!-- /tag> element (see section < xref target=FSss>), and     -->
<!-- assign the value < q>ns < /q> for the < att>rel < /att>  -->
<!-- attribute on that element, then the following            -->
<!-- equivalence can be shown under comparable conditions,    -->
<!-- thus revealing the underlying similarity of the value <  -->
<!-- q>ns < /q> in the two situations.                        -->

<eg><![ CDATA [
<f name=agreement org=set rel=ns>
  <sym value=third><sym value=singular>
  </f>

<f name=agreement org=set rel=sb>
  <vAlt>
    <vAlt><sym value=first><sym value=second></vAlt>
    <sym value=plural>
    </vAlt>
  </f>
]]>
</eg>




<!-- $Id: p2fsil.odd,v 1.7 1998/02/01 17:45:38 tei Exp $ -->
<!--*
    * $Log: p2fsil.odd,v $
    * Revision 1.7  1998/02/01 17:45:38  tei
    * killing off extendargs
    *
    * Revision 1.6  94/03/27  16:30:05  lou
    * semifinal check
    *
    * Revision 1.3  1994/01/04  01:39:13  msmcq
    * revision for P3
    *
    * Revision 1.2  1993/09/23  16:36:48  msmcq
    * fix end of example
    * -->
<!-- Revisions:                                               -->
<!-- 19 mar: shortened dogs today a bit, but not enough -->
<!-- 94-01-03 : MSM : changes to examples for parseability    -->
<!-- 93-12-20 : MSM : provide correct idrefs for chapter SA   -->
<!-- 93-09-22 : MSM : fix an end of eg                        -->

<div2 id=FSil type='Ilocano'><head>Two Illustrations</head>

<p>In this section, we present two illustrations based on one text of
how to associate feature structures and their components with textual
elements.  Our example text is the article <title>Memoirs of a Dog
Shrink</title> that appeared in the popular magazine <title>Dogs
Today</title> in August 1991.  This text has been selected for
inclusion in the British National Corpus.  The first illustration
associates the text with a structure that represents a significant
portion of the information contained in the text.  The second marks up
the grammatical structure of the orthographic words and certain other
comparable units in the text.  Here is the text, with markup provided
down to the level of <gi>s</gi> elements.  The <att>n</att> attribute
values are taken from the BNC markup; the <att>id</att> attribute
values have been added for purposes of these illustrations.

<eg><![ CDATA [
<div1 id=DT91mds type='article'>
<head rend=italic>
<s id=mds01 n=00732>Memoirs of a Dog Shrink</s></head>
 <head type=sub rend=italic>
<s id=mds04 n=00735>Cartoonist Russell Jones
takes a ramble through Peter Neville's files</s></head>
<list>
<item><s id=mds05 n=00736>Case number: 72</s></item>
<item><s id=mds06 n=00737>Name: Jessie</s></item>
<item><s id=mds07 n=00738>Breed: Collie</s></item>
<item><s id=mds08 n=00739>Problem: Light bulb phobia</s></item>
</list>

<p><s id=mds09 n=00740>Jess the collie was a laid-back
sort of hound who spent most of his life stretched out
on a fireside rug in his large Surrey home.</s></p>
<p><s id=mds10 n=00741>The closest he came to exercise
was to open one eye every so often, if someone entered
the room, or to open both eyes, smile, and wag his
tail as he'd done on one occasion when confronted by a
housebreaker!</s></p>
<p><s id=mds11 n=00742>This extremely lazy lifestyle
was one long yawn from dawn to dusk.</s>
<s id=mds12 n=00743>Only the odd bouts of involuntary
twitching in his sleep reassured his owner that Jess
was still safe and sound in the land of the
living!</s></p>
<p><s id=mds13 n=00744>One winter night, as the mutt
twitched away in front of the fire, his mind somewhere
between Basingstoke and the twilight zone, a 100-watt
light bulb in the standard lamp above his head
suddenly exploded without warning!</s></p>
<p><s id=mds14 n=00745>According to his owner, who
witnessed the spectacle, Jessie rose gracefully toward
the ceiling like a space shuttle and, after lingering
in mid-air for what seemed an eternity, crashed to the
floor and fled the house with a speed and agility the
owner found quite amazing.</s></p>
<p><s id=mds15 n=00746>Jessie did not return home for
several hours.</s>
<s id=mds16 n=00747>When he eventually did show up, it
was obvious to all that he was a changed dog!</s>
<s id=mds17 n=00748>What plodded through the front door
was not the lovable, lazy hound who had once lived
there but a grim-faced light bulb serial
killer!</s></p>
<p><s id=mds18 n=00749>Within seconds of his return,
Jessie launched a vicious attack on a table lamp,
popping the bulb and wrecking the shade before
charging into the lounge.</s>
<s id=mds19 n=00750>There, in a frenzy of violence, he
reduced the standard lamp to a table lamp in 10
seconds flat!</s></p>
<p><s id=mds20 n=00751>After a room-to-room chase
lasting several minutes, during which every lamp in
the house was turned to sawdust, the dog was finally
caught and wrestled to the ground.</s></p>
<p><s id=mds21 n=00752>With his house plunged into
darkness, Jessie's owner sought my help.</s></p>

<div2 type='part'><head>
<s id=mds22 n=00753>SIMPLE SOLUTION</s></head>
<p><s id=mds23 n=00754>When I first saw the dog, it
was quite obvious he'd been deeply affected by the
explosion and had developed a 100-watt phobia for
light bulbs!</s></p>
<p><s id=mds24 n=00755>By placing his feeding bowl
closer each day to a table lamp the dog gradually
learned to live with his enemy.</s>
<s id=mds25 n=00756>Within a couple of weeks, his
killer instincts had disappeared and he was back where
he belonged &mdash; twitching away peacefully on the
fireside rug.</s></p>
</div2>
</div1>
]]>
</eg>

<p>The first illustration is based on the observation that from the
example text, it is possible to infer a fairly extensive medical history
for the dog described in it.  Suppose that we have a definition of a
feature structure that represents a canine medical history.  Then we can
fill in feature values in that history from the text, and prepare a
<gi>linkGrp</gi> element that specifies the links between the text segments
and the various features specified in the feature structure.  Here is a
hypothetical example of such a filled-in feature structure and associated
link group.

<eg><![ CDATA [
<fs type='canine medical history'id=j37>
  <f name=name id=j37pn><str>Jessie</str></f>
  <f name=called.by org=set id=j37pc>
    <str>Jessie</str>
    <str>Jess</str>
    </f>
  <f name=breed id=j37b><sym value=collie>
  <f name=owner id=j37o>
    <fs type='owner description'>
      <f name=name><uncertain></f>
      <f name=address id=j37or><str>Surrey</str></f>
      </fs>
  <f name=illness org=list id=j37i>
    <fs type='case history' id=j37i1>
      <f name=name.of.specialist id=j37i1sn>
        <fs type='name structure'>
          <f name=last.name><str>Neville</str></f>
          <f name=first.name><str>Peter</str></f>
          </fs>
      <f name=title.of.specialist><uncertain>
      <f name=case.number id=j37i1n><nbr value=72></f>
      <f name=age.at.incidence><uncertain></f>
      <f name=date.of.incidence><uncertain>
      <f name=baseline.condition org=set id=j37i1b>
        <sym value=lazy>
        <sym value=friendly>
        <sym value=indoor>
        </f>
      <f name=symptoms id=j37i1s>
        <fs type='symptom structure'>
          <f name=behaviors org=set id=j37i1sb>
            <sym value=agitated>
            <sym value=destructive>
            <sym value=unfriendly>
            </f>
          <f name=particulars id=j37i1sp>
             <str>ran off, then returned and
             destroyed every lamp in the house</str></f>
          </fs>
        </f>
      <f name=diagnosis id=j37i1d>
        <fs type='diagnosis structure'>
          <f name=date.of.diagnosis><uncertain>
          <f name=disease id=j37i1dd>
            <str>light bulb phobia</str>
            </f>
          <f name=presumed.cause id=j37i1dc>
            <str>explosion of light bulb over patient's head</str>
            </f>
          </fs>
        </f>
      <f name=treatment id=j37i1t>
        <fs type='treatment history'>
          <f name=medicine><none></f>
          <f name=regime id=j37i1tr><str>positive reinforcement</str></f>
          <f name=particulars id=j37i1tp>
            <str>systematically decreased distance between
             feeding bowl and table lamp</str></f>
          <f name=duration.of.treatment id=j37i1td>
            <msr unit=week value=2>
            </f>
          </fs>
        </f>
      <f name=result id=j37i1r>
        <str>return to baseline condition</str>
        </f>
      </fs>
    </f>
  </fs>
]]>
</eg>

<eg><![ CDATA [
<linkGrp domains='j37 DT91mds'
         targFunc='feature segment' >
  <link targets='j37pn    mds06'>
  <link targets='j37pc    mds09'>
  <link targets='j37pc    mds09'>
  <link targets='j37pc    mds11'>
  <link targets='j37pc    mds14'>
  <link targets='j37pc    mds18'>
  <link targets='j37pc    mds21'>
  <link targets='j37b     mds07'>
  <link targets='j37b     mds09'>
  <link targets='j37or    mds09'>
  <link targets='j37i1sn  mds04'>
  <link targets='j37i1n   mds05'>

<!-- ... -->

  <link targets='j37i1dc  mds23'>
  <link targets='j37i1tr  mds24'>
  <link targets='j37i1td  mds25'>
  <link targets='j37r     mds25'>
  </linkGrp>
]]>
</eg>

<p>From this illustration, we see that links can be made not only between
text and feature structure elements, but also between text and feature
elements.  For that matter, links between text and feature value elements
can also be made.

<p>The second illustration takes advantage of the fact that this text,
like others that appear in the BNC, has been provided with detailed
grammatical markup of most of its orthographic words and certain other
comparable structural units.  For example, in an early form of the BNC
markup, the second paragraph of the
above text was  marked up as follows.

<eg><![ CDATA [
<s n=00741>The&AT0; closest&AJS; he&PNP; came&VVD; to&PRP; exercise&NN1;
was&VBD; to&TO0; open&VVI; one&CRD; eye&NN1; every so often&AV0;,&PUN;
if&CJS; someone&PNI; entered&VVD; the&AT0; room&NN1;,&PUN; or&CJC;
to&TO0; open&VVI; both&DT0; eyes&NN2;,&PUN; smile&VVI;,&PUN; and&CJC;
wag&VVI; his&DPS; tail&NN1; as&CJS; he&PNP;'d&VHD; done&VDN; on&PRP;
one&CRD; occasion&NN1; when&AVQ; confronted&VVN; by&PRP; a&AT0;
housebreaker&NN1;!&PUN;</s>
]]>
</eg>

<p>The entities that appear in this fragment may be expanded into
pointers to feature structures that represent grammatical structure by
means of entity definitions as follows.

<eg><![ CDATA [
<!-- ... -->
<!ENTITY   AJS    "<ptr target=AJS>"                              >
<!-- ... -->
<!ENTITY   AT0    "<ptr target=AT0>"                              >
<!-- ... -->
]]>
</eg>

<p>This method of associating feature structures with textual elements
has a number of drawbacks, most important of which is the fact that the
association is implicit, relying on the relative position of pointer
and associated text, rather than being explicit.
A better method therefore (which was subsequently adopted by the BNC
project) is to segment the text into the units under
analysis, and point to the feature structures from within the unit tags,
by means of the <att>ana</att> attribute (see sections <ptr
target=AIatts> and <ptr target=AIla>).

<eg><![ CDATA [
<s n=00741>
<w ana=AT0>The</w>
<w ana=AJS>closest</w>
<w ana=PNP>he</w>
<w ana=VVD>came</w>
<w ana=PRP>to</w>
<w ana=NN1>exercise</w>
<w ana=VBD>was</w>
<w ana=TO0>to</w>
<w ana=VVI>open</w>
<w ana=CRD>one</w>
<w ana=NN1>eye</w>
<phr ana=AV0>
  <w>every</w>
  <w>so</w>
  <w>often</w>
  </phr>
<c ana=PUN>,</c>
<w ana=CJS>if</w>
<w ana=PNI>someone</w>
<w ana=VVD>entered</w>
<w ana=AT0>the</w>
<w ana=NN1>room</w>

<!-- ... -->

</s>
]]>
</eg>

<p>To provide pointers in both direction between text and structural
analysis, one may supply both the text segments and the feature-structure
tags with identifiers, and associate the segments with their analysis by
means of a <gi>linkGrp</gi> (see section <ptr target=SApt>), as follows.

<p>First, we define a feature-structure library  to
represent all of the
grammatical structures that are used in the BNC encoding scheme. (For
illustrative purposes, we cite here only the structures needed for the
first six words of the sample sentence):

<eg><![ CDATA [
<fsLib id=BNCgs type='BNC grammatical structures'>
   <!-- ... -->
  <fs type='grammatical structure' id=AJS feats='Wj Ds'></fs>
  <fs type='grammatical structure' id=AT0 feats='Wl'></fs>
  <fs type='grammatical structure' id=PNP feats='Wr Rp'></fs>
  <fs type='grammatical structure' id=VVD feats='Wv Bv Fd'></fs>
  <fs type='grammatical structure' id=PRP feats='Wp Bp'></fs>
  <fs type='grammatical structure' id=NN1 feats='Wn Tc Ns'></fs>
  <!-- ... -->
  </fsLib>

]]>
</eg>

It will be noted that each feature structure in this library bears an
identifier corresponding with the code supplied as the value for the
<att>ana</att> attribute in the sample sentence. The component
features of each feature structure are further specified by the
<att>feats</att> attribute. These identify one or more <gi>f</gi>
elements in the following feature library (again, only a few of the
available features are quoted here):

<eg><![ CDATA [

<fLib type='BNC grammatical features'>
<!-- ... -->
  <f name=verbBase  id=Bv><sym value=main></f>
  <f name=prepBase  id=Bp><sym value=lexical></f>
  <f name=degree    id=Ds><sym value=superlative></f>
  <f name=verbForm  id=Fd><sym value=ed></f>
  <f name=number    id=Ns><sym value=singular></f>
  <f name=pronType  id=Rp><sym value=personal></f>
  <f name=nounType  id=Tc><sym value=common></f>
  <f name=class     id=Wj><sym value=adjective></f>
  <f name=class     id=Wl><sym value=article></f>
  <f name=class     id=Wn><sym value=noun></f>
  <f name=class     id=Wp><sym value=preposition></f>
  <f name=class     id=Wr><sym value=pronoun></f>
  <f name=class     id=Wv><sym value=verb></f>
<!-- ... -->
  </fLib>
]]>
</eg>

<p>Next, here is a markup of the start of our sample sentence being
analyzed, with identifiers for each segment; see section <ptr
target=AIlc> for discussion of the <gi>phr</gi>, <gi>w</gi>,
<gi>m</gi> and <gi>c</gi> elements used here.

<eg><![ CDATA [
<s n=00741 id=mds09>
<w id=mds0901>The</w>
<w id=mds0902>closest</w>
<w id=mds0903>he</w>
<w id=mds0904>came</w>
<w id=mds0905>to</w>
<w id=mds0906>exercise</w>
<w id=mds0907>was</w>
<w id=mds0908>to</w>
<w id=mds0909>open</w>
<w id=mds0910>one</w>
<w id=mds0911>eye</w>
<phr id=mds0912>
  <w>every</w>
  <w>so</w>
  <w>often</w>
  </phr>
<c id=mds0913>,</c>
<w id=mds0914>if</w>
<w id=mds0915>someone</w>
<w id=mds0916>entered</w>
<w id=mds0917>the</w>
<w id=mds0918>room</w>
<c id=mds0919>,</c>
<w id=mds0920>or</w>
<w id=mds0921>to</w>
<w id=mds0922>open</w>
<w id=mds0923>both</w>
<w id=mds0924>eyes</w>
<c id=mds0925>,</c>
<w id=mds0926>smile</w>
<c id=mds0927>,</c>
<w id=mds0928>and</w>
<w id=mds0929>wag</w>
<w id=mds0930>his</w>
<w id=mds0931>tail</w>
<w id=mds0932>as</w>
<w>
  <w id=mds0933>he</w>
  <m id=mds0934>'d</m>
  </w>
<w id=mds0935>done</w>
<w id=mds0936>on</w>
<w id=mds0937>one</w>
<w id=mds0938>occasion</w>
<w id=mds0939>when</w>
<w id=mds0940>confronted</w>
<w id=mds0941>by</w>
<w id=mds0942>a</w>
<w id=mds0943>housebreaker</w>
<c id=mds0944>!</c>
</s>
]]>
</eg>

<p>Finally, here is a <gi>linkGrp</gi>, which contains all of the
<gi>link</gi> elements that associate the text segments in the example
sentence with their respective grammatical structures.

<eg><![ CDATA [
<linkGrp domains='mds09 BNCgs'
         targFunc='segment analysis'>
  <link targets='mds0901 AT0'>
  <link targets='mds0902 AJS'>
  <link targets='mds0903 PNP'>
  <link targets='mds0904 VVD'>
  <link targets='mds0905 PRP'>
  <link targets='mds0906 NN1'>
  <link targets='mds0907 VBD'>
  <link targets='mds0908 TO0'>
  <link targets='mds0909 VVI'>
  <link targets='mds0910 CRD'>
  <link targets='mds0911 NN1'>
  <link targets='mds0912 AV0'>
  <link targets='mds0913 PUN'>
  <link targets='mds0914 CJS'>
  <link targets='mds0915 PNI'>
  <link targets='mds0916 VVD'>
  <link targets='mds0917 AT0'>
  <link targets='mds0918 NN1'>
  <link targets='mds0919 PUN'>
  <link targets='mds0920 CJC'>
  <link targets='mds0921 TO0'>
  <link targets='mds0922 VVI'>
  <link targets='mds0923 DT0'>
  <link targets='mds0924 NN2'>
  <link targets='mds0925 PUN'>
  <link targets='mds0926 VVI'>
  <link targets='mds0927 PUN'>
  <link targets='mds0928 CJC'>
  <link targets='mds0929 VVI'>
  <link targets='mds0930 DPS'>
  <link targets='mds0931 NN1'>
  <link targets='mds0932 CJS'>
  <link targets='mds0933 PNP'>
  <link targets='mds0934 VHD'>
  <link targets='mds0935 VDN'>
  <link targets='mds0936 PRP'>
  <link targets='mds0937 CRD'>
  <link targets='mds0938 NN1'>
  <link targets='mds0939 AVQ'>
  <link targets='mds0940 VVN'>
  <link targets='mds0941 PRP'>
  <link targets='mds0942 AT0'>
  <link targets='mds0943 NN1'>
  <link targets='mds0944 PUN'>
  </linkGrp>
]]>
</eg>

<p>This grammatical markup represents the text as completely unambiguous,
despite the fact that instances of the same textual unit are associated
with different structure elements (e.g. the word <mentioned>to</mentioned>), and at
least one sequence (namely <mentioned>to exercise</mentioned>, identified by the
attribute values <att>id=mds0905</att> and <att>id=mds0906</att>), is in
fact structurally ambiguous in English.  That sequence may be analyzed as
a preposition followed by a singular noun (as this markup asserts) or as
the infinitive marker followed by an uninflected form of a main verb.

<p>To represent the ambiguity of words like <mentioned>to</mentioned> and
<mentioned>exercise</mentioned>, and of phrases like <mentioned>to exercise</mentioned>,
we may use the <gi>alt</gi> and <gi>join</gi> elements defined in sections
<ptr target=SAat> and <ptr target=SAag>, as follows.
First, we define <gi>alt</gi> elements for
the ambiguous word classes, and add these to the <gi>fsLib</gi>.

<eg><![ CDATA [
<alt id=PRP-TO0 targets='PRP TO0'>
<alt id=NN1-VVI targets='NN1 VVI'>
]]>
</eg>

Next, we change the <gi>link</gi> elements for the text elements identified
by the <att>id=mds0905</att> and <att>id=mds0905</att> attribute values.

<eg><![ CDATA [
<link targets='mds0905 PRP-TO0'>
<link targets='mds0906 NN1-VVI'>
]]>
</eg>

<p>As the encoding now stands, the phrase <mentioned>to exercise</mentioned> has
four structural analyses associated with it:  preposition followed by
noun, preposition followed by verb, infinitive marker followed by noun
and infinitive marker followed by verb.  To narrow the choices down to
the desired two, namely preposition followed by noun and infinitive
marker followed by verb, we next form <gi>join</gi> elements to represent
the desired sequences.

<eg><![ CDATA [
  <join id=PRP.NN1 targets='PRP NN1'>
  <join id=TO0.VVI targets='TO0 VVI'>
]]>
</eg>

We then define an <gi>alt</gi> element to express the alternation
between the two <gi>join</gi> elements.

<eg><![ CDATA [
  <alt id=PRP.NN1-TO0.VVI targets='PRP.NN1 TO0.VVI'>
]]>
</eg>

Next, we add a <gi>phr</gi> element in the encoding of the text for the
phrase <mentioned>to exercise</mentioned>.

<eg><![ CDATA [
<phr id=mds090506>
  <w id=mds0905>to</w>
  <w id=mds0906>exercise</w>
  </phr>
]]>
</eg>

Finally, we add to the <gi>linkGrp</gi> element a <gi>link</gi> element
connecting that phrase to the <gi>alt</gi> that represent its two
analyses.

<eg><![ CDATA [
<link targets='mds090506 PRP.NN1-TO0.VVI'>
]]>
</eg>

<p>Note that the technique of forming <gi>join</gi> elements for sequences
of structure elements and associating them with textual units can also be
used to provide a complete structural analysis for the complex word
<mentioned>he'd</mentioned>.  First, we add an <att>id</att> attribute for the
word.

<eg><![ CDATA [
<w id=mds093334>
  <w id=mds0933>he</w>
  <m id=mds0934>'d</m>
  </w>
]]>
</eg>

Next, we form a join of the structures associated separately with the
subelements <mentioned>he</mentioned> and <mentioned>'d</mentioned>.

<eg><![ CDATA [
<join id=PRP.VHD targets='PRP VHD'>
]]>
</eg>

Finally, we define a link between the complex word and the new
<gi>join</gi> element.

<eg><![ CDATA [
<link targets='mds093334 PRP.VHD'>
]]>
</eg>






</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:
-->
             <!-- 16 Feature Structures -->
