Hello everyone,
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. 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. The current
version of af-nl adds ~ in front of every word through an extra
transfer (apertium-af-nl.post-nl.t1x) and then attempts the above fix.
Examples which had the same problem of which some now work and some don't:
af-nl Hy sal nie kom nie.
- Hij zal niet komen.
+ Hij zal niet komen .
af-nl Ek het nie geweet dat hy sou kom nie.
- Ik heb niet geweten dat hij zou komen.
+ Ik heb niet geweten dat hij zou komen .
af-nl Ek het geweet dat hy nie sou kom nie.
- Ik heb geweten dat hij niet zou komen.
+ Ik heb geweten dat hij niet zou komen .
af-nl Ek weet niks nie.
WORKS Ik weet niks.
af-nl Ek ken niemand nie.
WORKS Ik ken niemand.
One thing I noticed was that this solution seems to work when an odd
number of words is preceded by ~, and doesn't work when it's an even
number of ~, but i don't know if this is a coincidence:
<spectie> $ echo "Hij ~zal niet ~komen ~.~." | lt-proc -p af-nl.autopgen.bin
<spectie> Hij zal niet komen..
<spectie> $ echo "Hij ~zal ~niet ~komen ~.~." | lt-proc -p af-nl.autopgen.bin
<spectie> Hij zal niet komen..
<spectie> $ echo "~Hij ~zal ~niet ~komen ~.~." | lt-proc -p af-nl.autopgen.bin
<spectie> Hij zal niet komen ..
The postgenerator is at:
https://apertium.svn.sourceforge.net/svnroot/apertium/staging/apertium-af-nl/apertium-af-nl.post-nl.dix
Any pointers are greatly appriciated.
Regards,
Pim
------------------------------------------------------------------------------
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