Difference between revisions of "Conjoined lexical units"

From Apertium
Jump to navigation Jump to search
(Created page with "A single surface form can correspond to multiple lexical units. When this happens, the lexical units are connected with <code>+</code>. An example of where this might be usef...")
(No difference)

Revision as of 19:56, 5 April 2021

A single surface form can correspond to multiple lexical units. When this happens, the lexical units are connected with +.

An example of where this might be useful is English plurals and possessives:

^dog/dog<n><sg>$
^dogs/dog<n><pl>$
^dog's/dog<n><sg>+'s<gen>$
^dogs'/dog<n><pl>+'s<gen>$

In monodix this is written with <j/>

<pardef n="dog__n">
  <e><p> <l></l>    <r><s n="n"/><s n="sg"/></r>                   </p></e>
  <e><p> <l>s</l>   <r><s n="n"/><s n="pl"/></r>                   </p></e>
  <e><p> <l>'s</l>  <r><s n="n"/><s n="sg"/><j/>'s<s n="gen"/></r> </p></e>
  <e><p> <l>s'</l>  <r><s n="n"/><s n="pl"/><j/>'s<s n="gen"/></r> </p></e>
</pardef>

<e lm="dog"><i>dog</i><par n="dog__n"/></e>

In lexc this is written with %+

LEXICON NounInfl
%<n%>%<sg%>:   # ;
%<n%>%<pl%>:s  # ;
%<n%>%<sg%>%+'s%<gen%>:'s  # ;
%<n%>%<pl%>%+'s%<gen%>:s'  # ;

LEXICON NounRoot
dog:dog NounInfl ;

In lexd this is written with +

LEXICON NounNumPos
<sg>:
<pl>:s
<sg>+'s<gen>:'s
<pl>+'s<gen>:s'

LEXICON NounRoot
dog:dog

PATTERNS
NounRoot NounNumPos