Inconditional section
Revision as of 19:16, 17 September 2009 by Jacob Nordfalk (talk | contribs) (New page: An inconditional ('unconditional') section of a dictionary typically contains punctuation, and such things. The main section of a dictionary works on a longest-match basis. Inconditiona...)
An inconditional ('unconditional') section of a dictionary typically contains punctuation, and such things.
The main section of a dictionary works on a longest-match basis.
Inconditional means 'if you see this, stop processing immediately and start reading a new word'. Stop when you reach the end of a possible transduction.
You could say that the "only" difference is that a space is not required to start a new match.
$ echo 23men |apertium -d . en-it-anmor ^23/23<num>$^men/man<n><pl>$^./.<sent>$
It doesn't need the space between 23 and men because numbers are in an 'inconditional' section.
<dictionary> <alphabet>ab</alphabet> <sdefs> <sdef n="aa"/> <sdef n="ab"/> </sdefs> <section id="foo" type="inconditional"> <e><p><l>a</l><r>a<s n="aa"/></r></p></e> <e><p><l>aa</l><r>aa<s n="aa"/></r></p></e> </section> </dictionary> jim@jim-laptop:~/Devel/apertium-git/incubator/apertium-en-it$ echo aaa |lt-proc sample.bin ^aa/aa<aa>$^a/a<aa>$ jim@jim-laptop:~/Devel/apertium-git/incubator/apertium-en-it$ echo aaaa |lt-proc sample.bin ^aa/aa<aa>$^aa/aa<aa>$ jim@jim-laptop:~/Devel/apertium-git/incubator/apertium-en-it$ echo aaaaa |lt-proc sample.bin ^aa/aa<aa>$^aa/aa<aa>$^a/a<aa>$