Pim:
I'm trying to fix an issue with the af-nl pair, namely that removing
"nie" at the end of a sentence leaves a space between the last word
and the period.
Have you tried to see where this extra space is added? I assume this is a problem with a .t1x rule or similar dealing with nie, which does not properly take care of superblanks. The rule <rule comment="REGLA: nie"> is written in a way I cannot understand, with a *choose* that only contains an *otherwise*. Apparently this rule checks whether a negative has been seen before (using a state variable "seen_neg" carried from rule to rule).

<equal>
                <var n="seen_neg"/>
                <lit v="true"/>
              </equal>

and outputs a "nie" for a matched "nie" only if it has not been seen before in the sentence. I would rewrite this rule reversing the condition for "seen_neg" for a clearer code, and I would consider adding a rule matching "nie .", that is, a nie at the end of a sentence. This rule should deal with the superblanks (I would have to think about this, as I cannot remember who deals with the superblank before the "nie"!) to avoid the double blanks. I can give it a deeper thought if needed.
Francis suggested and implemented a fix which involves
waking up the postchuncker by adding a ~ and then replacing " ~." with
"." This worked for some examples, but broke others.
Anyway, I personally think this is a syntactic/structural problem that should be dealt with in the module that deals with syntactic/structural transfer, and not inserting a post-generator where it does not belong, but I tend to think that Francis maybe had a reason to suggest this strange use, perhaps because superblank management was not trivial in this case.

Cheers

Mikel

--
Mikel L. Forcada (http://www.dlsi.ua.es/~mlf/)
Departament de Llenguatges i Sistemes InformĂ tics
Universitat d'Alacant
E-03071 Alacant, Spain
Phone: +34 96 590 9776
Fax: +34 96 590 9326

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to