apertium / apertium-grn

Apertium linguistic data for Guarani
GNU General Public License v3.0
2 stars 2 forks source link

Double accented forms #20

Open ftyers opened 5 years ago

ftyers commented 5 years ago

In the following text

Mayma yvypóra ou ko yvy ári iñapyty'yre ha eteĩcha tekoruvicharenda ha akatúape jeguerekópe; ha ikatu rupi oikuaa añetéva ha añete'yva, iporãva ha ivaíva, tekotevẽ pehenguéicha oiko oñondivekuéra.

we can analyse the form akatúape,

$ echo "akatúape" | hfst-lookup grn.automorf.hfst 
akatúape    a<prn><p1><sg><ac>+katu<v><iv><pres>+ape<adv>   0,000000
akatúape    a<prn><p1><sg><ac>+katu<v><iv><pres>+apé<adv>   0,000000
akatúape    a<prn><p1><sg><ac>+katu<v><iv><pres>+ápe<adv>   0,000000
akatúape    akatúa<adj>+pe<post>    0,000000
akatúape    akatúa<n>+pe<post>  0,000000
akatúape    a<prn><p1><sg><ac>+katu<n><incp>+a<v><iv>+pe<post>  1,000000
akatúape    a<prn><p1><sg><ac>+katu<n><incp>+a<v><iv><pres>+pe<post>    1,000000
akatúape    a<prn><p1><sg><ac>+katu<n><incp>+a<v><tv>+pe<post>  1,000000
akatúape    a<prn><p1><sg><ac>+katu<n><incp>+a<v><tv><pres>+pe<post>    1,000000

but when we try and generate, we get double accented forms:

$ echo "akatúa<n>+pe<post>" | hfst-lookup .deps/grn.LR.hfst 
akatúa<n>+pe<post>  akatúápe    0,000000

The error appears to be in this rule:

$ echo "a:a k:k a:a t:t •:0 ú:ú a:a >:> {m}:p e:e" | hfst-pair-test .deps/grn.twol.hfst 
Rule "Change vowel before atonal suffixes  fails:
#:0 a k a t •:0 ú HERE ---> a > {m}:p e #:0 

FAIL: a:a k:k a:a t:t •:0 ú:ú a:a >:> {m}:p e:e REJECTED

Test failed.

More examples can be found here: https://paste2.org/zmGZfDWW

ana-kuznetsova commented 5 years ago

According to the example, the error is in this rules, yes. We should make a rule changing tonal vowel to atonal when the next one is accentuated before atonal suffix (such as -pe).

ftyers commented 5 years ago

It appears to be fixed in 78c6f41, but we should check it with the other examples too. @ana-kuznetsova could you do that and close the issue if it's all ok ?

ftyers commented 5 years ago

Here is one that isn't fixed:

fran@ipek:~/source/apertium/languages/apertium-grn$ echo "hérava" | hfst-lookup grn.autoseg.hfst 
hérava  hérá>va 1,000000
hérava  héra>va 2,000000
hérava  hérava  2,000000