El 2017-10-25 19:06, Hèctor Alòs i Font escribió:
2017-10-25 11:44 GMT+03:00 Hèctor Alòs i Font
<hectora...@gmail.com>:

2017-10-25 10:47 GMT+03:00 Francis Tyers <fty...@prompsit.com>:

El 2017-10-25 08:54, Hèctor Alòs i Font escribió:
This question is about CG, but since it seems this is quite related
to
the "bridge" between Apertium and CG I put it here.

I've never understood well how to select in CG enclitic pronouns. I
have a specific question about Catalan.

We have this:

echo "donant-los" | apertium -d . cat-disam
"<donant-los>"
"donar" vblex ger
"el" prn enc p3 m pl
"donar" vblex ger
"li" prn enc p3 mf pl
"<.>"
"." sent

I want to write a few rules for disambiguating "los", specifically
choosing "li" ("el" seems to be the choice always or most of the
time).

So I've defined a very simple rule (which is wrong, but it's just a
beginning):

SET VCD_CI = ("donar") OR ("dar") ; # this is a list of verbs
LIST Li = "li" ;
SELECT Li IF (0/* VCD_CI) ;

But this rule does not match. I still receive:

echo "donant-los" | apertium -d . cat-disam
"<donant-los>"
"donar" vblex ger
"el" prn enc p3 m pl
"donar" vblex ger
"li" prn enc p3 mf pl
"<.>"
"." sent

What is wrong?

Try:

SELECT SUB:1 Li IF (0/* VCD_CI) ;

or

SELECT SUB:1 Li IF (0 VCD_CI) ;

For the selecting, you need to use SUB: and for the contexts you
need to use /

:)

F.

Moltes gràcies, Fran!
It is working.

H.

Still there is a problem. It is working in the cat-disam mode, but not
in the cat-tagger. For instance, this is the result for both modes of
"donant-los una cosa" (I've commited the changes in apertium-cat,
since nothing is changing really, except the output of the cat-disam
or cat-srd-disam).

echo "donant-los una cosa" | apertium -d . cat-disam
"<donant-los>"
    "donar" vblex ger
        "li" prn enc p3 mf pl SELECT:339
;    "donar" vblex ger
;        "el" prn enc p3 m pl SELECT:339
"<una>"
    "un" prn tn f sg
    "un" det ind f sg
"<cosa>"
    "cosa" n f sg
"<.>"
    "." sent

echo "donant-los una cosa" | apertium -d . cat-tagger
^donar<vblex><ger>+el<prn><enc><p3><m><pl>$ ^un<det><ind><f><sg>$
^cosa<n><f><sg>$^.<sent>$

The problem can be in the modes:

more modes/cat-disam.mode

    lt-proc -w /home/apertium/apertium/apertium-cat/cat.automorf.bin
|cg-conv -a -l|vislcg3 --trace -g
/home/apertium/apertium/apertium-cat/apertium-cat.cat.rlx

more modes/cat-tagger.mode

    lt-proc -w /home/apertium/apertium/apertium-cat/cat.automorf.bin
|cg-proc -w /home/apertium/apertium/apertium-cat/cat.rlx.bin
|apertium-tagger -g /home/apertium/apertium/apertium-cat/cat.prob

Is there any idea?

Prova afegir:

SUBREADINGS = LTR ; # Alternate, left-to-right (main reading on the left)

al capçalera del fitxer .rlx. :)

F.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to