On 2 February 2013 17:30, Bernard Chardonneau <[email protected]> wrote:
> The wiki page of Francis about writing transfer rules is interesting
> (and it is good to have written it), but the example is not enough
> simple for me to know what to write in the different sections.
>
> For instance, in def-cats , you seem to describe separated words when
> transfer rules are supposed to work with groups of words.
>

No, it's defining tag categories. 'sg', 'pl', 'sp', and 'ND' (number
to be determined) fit into the category of 'number', so having a
category containing these elements allows us to treat any of these
items as one, rather than having to treat them individually. So, if
you want to have simple agreement between words, you can take the
contents of the relevant category, whatever it is, without having to
treat what it _really_ is. So instead of checking if one word contains
'<lit-tag v="sg"/>', then '<lit-tag v="pl"/>' ... etc., you can use
'<clip ...>' where the 'part' attribute is whatever you named the
number category.

So, if I have:
    <def-attr n="nbr">
      <attr-item tags="sg"/>
      <attr-item tags="pl"/>
      <attr-item tags="sp"/>
      <attr-item tags="ND"/>
    </def-attr>

and the input word was '^foo<n><sg>$'

then
<clip pos="1" side="sl" part="nbr"/>

equals '<sg>'.

(Here, 'pos' has the same meaning as with '<b>' - the number of the
word relative to the '<pattern-item>' that matched it - and 'side' is
either 'sl' (source language, or input) or 'tl' (target language, or
output)).

-- 
<Sefam> Are any of the mentors around?
<jimregan> yes, they're the ones trolling you

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to