PMLTQ

 view release on metacpan or  search on metacpan

doc/pmltq_doc.xml  view on Meta::CPAN

                  less than or equal to <literal>max</literal>.</para>

                  <para>For example, in <programlisting>t-node $a := [ depth-first-precedes t-node $b := [ order-precedes $a ] ]</programlisting>
                  <literal>$a</literal> matches a node that precedes
                  <literal>$b</literal> in the depth-first order but follows
                  <literal>$b</literal> in the total ordering of the tree;
                  thus, for instance, <literal>$b</literal> can be a
                  descendant of <literal>$a</literal> that precedes
                  <literal>$a</literal>.</para>

                  <para>In the following query, <literal>$a</literal> must
                  immediately precede <literal>$b</literal> in the total
                  ordering of the tree: <programlisting>t-node $a := [ order-precedes{,1} t-node $b := [ ] ]</programlisting>
                  Conversely, in <programlisting>t-node $a := [ order-precedes{2,} t-node $b := [ ] ]</programlisting>
                  <literal>$a</literal> precedes <literal>$b</literal>, but
                  there must be at least one other node between the nodes
                  <literal>$a</literal> and <literal>$b</literal>. The query
                  <programlisting>t-node $a := [ order-precedes{1,2} t-node $b := [ ] ]</programlisting>
                  allows at most one node between <literal>$a</literal> and
                  <literal>$b</literal> in the total ordering of the
                  tree.</para>

                  <para>Negative distance bound extends the relation in the
                  opposite direction. For example, in this query:
                  <programlisting>t-node $a := [ order-precedes{-1,1} t-node $b := [ ] ]</programlisting>
                  <literal>$a</literal> either immediately precedes
                  <literal>$b</literal> or immediately follows
                  <literal>$b</literal>.</para>
                </listitem>
              </varlistentry>

              <varlistentry>
                <term>relations based on PML-references</term>

                <listitem>
                  <mediaobject id="rail_pmlRefRelation">
                    <imageobject role="html">
                      <imagedata fileref="rail_pmlRefRelation.png"
                                 format="PNG" />
                    </imageobject>

                    <imageobject role="fo">
                      <imagedata fileref="rail_pmlRefRelation.pdf"
                                 format="PDF" />
                    </imageobject>

                    <textobject role="syntax_diagram">
                      <phrase>pmlRefRelation : attributePath '-&gt;'?
                      ;</phrase>
                    </textobject>
                  </mediaobject>

                  <para>These relations represent ID-based references. They
                  are derived from attributes declared in the specific PML
                  schema of the treebank as PML references and represent the
                  relation from a referring node (the one containing the
                  reference) to the referenced node (the one whose ID the
                  reference contains).</para>

                  <para>The name of the relation is an attribute path to a PML
                  reference (declared in the PML schema as <literal>&lt;cdata
                  format="PMLREF"/&gt;</literal>).</para>

                  <para>For example, nodes of the type
                  <literal>t-node</literal> in PDT 2.0 are structures declares
                  as follows: <programlisting>  &lt;type name="t-node.type"&gt;
    &lt;structure role="#NODE" name="t-node"&gt;
      ...
      &lt;member name="a"&gt;
        &lt;structure&gt;
          &lt;member name="lex.rf"&gt;
            &lt;cdata format="PMLREF"/&gt;
          &lt;/member&gt;
          &lt;member name="aux.rf"&gt;
            &lt;list ordered="0"&gt;
              &lt;cdata format="PMLREF"/&gt;
            &lt;/list&gt;
          &lt;/member&gt;
        &lt;/structure&gt;
      &lt;/member&gt;
      ...
    &lt;/structure&gt;
  &lt;/type&gt;</programlisting></para>

                  <para>So, for a <literal>t-node</literal>, the attribute
                  paths <literal>a/lex.rf</literal> and
                  <literal>a/aux.rf</literal> refer to PML references. They
                  represent a pointer to a lexical counterpart node on the
                  analytical layer, and zero or more pointers to related
                  auxiliary nodes on the analytical layer (prepositions,
                  conjunctions, auxiliary verbs, etc.). We can thus use these
                  relations as follows: <programlisting>t-node $t:= [ a/lex.rf a-node $a:= [ afun='Sb' ], a/aux.rf a-node $x:= [ afun = 'AuxP' ] ]</programlisting>
                  The query locates a <literal>t-node</literal>
                  <literal>$t</literal> whose lexical counterpart on the
                  analytical layer is the node <literal>$b</literal> with
                  <literal>afun='Sb'</literal> and that contains at least one
                  pointer to an auxiliary node <literal>$x</literal> with
                  <literal>afun='AuxP'</literal> (a preposition).</para>

                  <para>Since the names of node attributes may be in collision
                  with other types of relations, we may force interpreting a
                  relation as a <literal>pmlRefRelation</literal> by following
                  it by the characters <literal>-&gt;</literal>.</para>
                </listitem>
              </varlistentry>

              <varlistentry>
                <term>implementation specific relations</term>

                <listitem>
                  <mediaobject id="railimplementationSpecificRelation">
                    <imageobject role="html">
                      <imagedata fileref="railimplementationSpecificRelation.png"
                                 format="PNG" />
                    </imageobject>

                    <imageobject role="fo">
                      <imagedata fileref="railimplementationSpecificRelation.pdf"
                                 format="PDF" />
                    </imageobject>

                    <textobject role="syntax_diagram">
                      <phrase>implementationSpecificRelation : NAME
                      distanceInterval? '::'? ;</phrase>
                    </textobject>
                  </mediaobject>

                  <para>An implementation can choose to provide further set of
                  relations provided that their names are not in collision
                  with the tree relations and ordering relations.</para>

                  <para>For example, the standard implementation of PML-TQ
                  defines relations <literal>echild</literal> and
                  <literal>eparent</literal> for the PDT 2.0 treebank to
                  represent so called effective-parent and effective-child
                  relations.</para>



( run in 0.451 second using v1.01-cache-2.11-cpan-f56aa216473 )