Difference between revisions of "Northern Sámi and Norwegian/Compounds"

From Apertium
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
 
* politiijastašuvnna <code>^politiija<N><Sg><Nom><Cmp><@HNOUN>$ ^stašuvdna<N><Sg><Gen>$</code>
 
* politiijastašuvnna <code>^politiija<N><Sg><Nom><Cmp><@HNOUN>$ ^stašuvdna<N><Sg><Gen>$</code>
   
We could generalise some by having an output macro out_cmp_nom that that takes the nominal and assumes that variable "cmp-lu" is set to the first lexical unit. Then we need four rules for the above:
+
We generalise some by using the nominal output macro "out_nom" that that takes the nominal and assumes that variable "pre-nom" is set to the preceding lexical unit(s). We still need four rules for the above:
   
 
* <code><pattern-item n="cmp"><pattern-item n="verb"></code>
 
* <code><pattern-item n="cmp"><pattern-item n="verb"></code>
Line 13: Line 13:
 
* <code><pattern-item n="nom"><pattern-item n="nom"></code>
 
* <code><pattern-item n="nom"><pattern-item n="nom"></code>
   
Each rule sets the "cmp-lu" variable to the first lu, and calls "out_cmp_nom".
+
Each rule sets the "pre-nom" variable to the first lu, and calls "out_nom".
   
The macro "out_cmp_nom" sets the case-prep, defnes, chunk gender/number, c_def_pos (position of defnes tag in the chunk), and outputs
+
The macro "out_nom" sets the case-prep, chunk gender/number, chunk syntactic label, and outputs
 
<pre>
 
<pre>
<chunk name="cmp_nom" case="caseFirstWord">
+
<chunk namefrom="c_name" case="caseFirstWord">
 
<tags>
 
<tags>
 
<tag><lit-tag v="SN"/></tag>
 
<tag><lit-tag v="SN"/></tag>
<tag><var n="c_syn"/></tag>
+
<tag><var n="c_syn"/><tag>
 
<tag><var n="defnes"/></tag>
 
<tag><clip pos="1" side="sl" part="mode"/></tag>
 
<tag><clip pos="1" side="sl" part="mode"/></tag>
 
<tag><var n="c_gen"/></tag>
 
<tag><var n="c_gen"/></tag>
 
<tag><var n="c_nbr"/></tag>
 
<tag><var n="c_nbr"/></tag>
<tag><var n="defnes"/></tag>
 
 
<tag><clip pos="1" side="tl" part="case"/></tag>
 
<tag><clip pos="1" side="tl" part="case"/></tag>
 
</tags>
 
</tags>
<var n="cmp-lu"/>
+
<var n="pre-nom"/>
 
<lu>
 
<lu>
 
<clip pos="1" side="tl" part="lemh"/>
 
<clip pos="1" side="tl" part="lemh"/>
Line 33: Line 33:
 
<clip pos="1" side="tl" part="gen"/>
 
<clip pos="1" side="tl" part="gen"/>
 
<clip pos="1" side="tl" part="nbr"/>
 
<clip pos="1" side="tl" part="nbr"/>
  +
<lit-tag v="3"/> <!-- turns into chunk defnes in postchunk -->
<var n="c_def_pos"/>
 
 
<clip pos="1" side="tl" part="gen-case"/>
 
<clip pos="1" side="tl" part="gen-case"/>
 
<clip pos="1" side="tl" part="lemq"/>
 
<clip pos="1" side="tl" part="lemq"/>
Line 40: Line 40:
 
</pre>
 
</pre>
   
(where pos="1" is the argument given to out_cmp_nom, ie. the nominal which becomes the second part of the chunk)
+
(where pos="1" is the argument given to out_nom, ie. the nominal which becomes the second part of the chunk)
   
 
[[Category:Northern Sámi and Norwegian]]
 
[[Category:Northern Sámi and Norwegian]]

Latest revision as of 13:55, 18 November 2010

Compounds in sme->nob come in many shapes, those ending in a nominal include eg.:

  • mielbargin ^miel<ShCmp><@←PPRED>$ ^bargat<V><TV><Der2><Actor><N><Ess>$
  • vuođđofága ^vuođđu<N><Sg><Nom><Cmp><@HNOUN>$ ^fága<N><Sg><Nom>$
  • allaskuvla ^allat<A><Attr><@→N>$ ^skuvla<N><Sg><Nom>$
  • politiijastašuvnna ^politiija<N><Sg><Nom><Cmp><@HNOUN>$ ^stašuvdna<N><Sg><Gen>$

We generalise some by using the nominal output macro "out_nom" that that takes the nominal and assumes that variable "pre-nom" is set to the preceding lexical unit(s). We still need four rules for the above:

  • <pattern-item n="cmp"><pattern-item n="verb">
  • <pattern-item n="cmp"><pattern-item n="nom">
  • <pattern-item n="adj"><pattern-item n="nom">
  • <pattern-item n="nom"><pattern-item n="nom">

Each rule sets the "pre-nom" variable to the first lu, and calls "out_nom".

The macro "out_nom" sets the case-prep, chunk gender/number, chunk syntactic label, and outputs

<chunk namefrom="c_name" case="caseFirstWord">
            <tags>
              <tag><lit-tag v="SN"/></tag>
              <tag><var n="c_syn"/><tag>
              <tag><var n="defnes"/></tag>
              <tag><clip pos="1" side="sl" part="mode"/></tag>
              <tag><var n="c_gen"/></tag>
              <tag><var n="c_nbr"/></tag>
              <tag><clip pos="1" side="tl" part="case"/></tag>
            </tags>
            <var n="pre-nom"/>
            <lu>
              <clip pos="1" side="tl" part="lemh"/>
              <clip pos="1" side="tl" part="a_nom"/>
              <clip pos="1" side="tl" part="gen"/>
              <clip pos="1" side="tl" part="nbr"/>
              <lit-tag v="3"/>                              <!-- turns into chunk defnes in postchunk -->
              <clip pos="1" side="tl" part="gen-case"/>
              <clip pos="1" side="tl" part="lemq"/>
            </lu>
          </chunk>

(where pos="1" is the argument given to out_nom, ie. the nominal which becomes the second part of the chunk)