I began to work in apertium-por. Its CG file uses unification for matching
gender and number. Unfortunately, it is not working. I can't see how to
correct the behaviour if I continue to use unification (I'm not familiar
with CG's unification). Could someone help? The relevant lines are:

LIST Masc = m ;
LIST Fem = f ;
LIST MascFem = mf ;

SET NotMasc = Fem | MascFem ;
SET NotFem = Masc | MascFem ;
SET Gender = NotMasc | NotFem ;

SELECT A + $$Gender IF (0 A + $$Gender) (0 N) (1 N + $$Gender) ;

But there is no match for:

$ echo "quarto comunista" | apertium -d . por-disam
"<quarto>"
"quarto" adj m sg
"quarto" n m sg
"<comunista>"
"comunista" adj mf sg
"comunista" n mf sg

I added two lines to see what is happening:

SELECT:testNotMasc A IF (0 NotMasc);
SELECT:testNotFem A IF (0 NotFem);

And I tried:

$ echo "quarto, comunista" | apertium -d . por-disam
"<quarto>"
"quarto" adj m sg SELECT:366:testNotFem
; "quarto" n m sg SELECT:366:testNotFem
"<,>"
"," cm
"<comunista>"
"comunista" adj mf sg SELECT:365:testNotMasc
; "comunista" n mf sg SELECT:365:testNotMasc

In seems that in the case of a word with the mf-gender, NotMasc is selected
for the ambiguous word "comunista", while "quarto" is NotFem. For seeing
that I added these two rules:

SELECT:testNotMasc A IF (0 NotMasc);
SELECT:testNotFem A IF (0 NotFem);

And I got:

$ echo "quarto comunista" | apertium -d . por-disam
"<quarto>"
"quarto" adj m sg SELECT:376:testNotFem
; "quarto" n m sg SELECT:376:testNotFem
"<comunista>"
"comunista" adj mf sg SELECT:375:testNotMasc
; "comunista" n mf sg SELECT:375:testNotMasc

Hèctor
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to