jimregan / foma

Automatically exported from code.google.com/p/foma
0 stars 0 forks source link

I do not understand this replacement case. Can you please help? #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Lexc file contains:
+Posss1p:^+cPosss1p^§JPnull§§AE§im    Gen;  ! aim
citromlé:citromlev AddNoun1;

Foma file contains:
define FrontVowel [ e | é | i | í | ü | ű | ö | ő | E | É | I | Í | Ü 
| Ű | Ö | Ő ];
define BackVowel [ a | á | o | ó | u | ú | A | Á | O | Ó | U | Ú ];
define HarmRuleai §AE§ -> 0 || .#. \"^"* Vowelwithy %^ \%^* _ .o.
                  §AE§ -> a // .#. \"^"* BackVowel Cons+ %^ \%^* _ .o.
                  §AE§ -> e // .#. \"^"* FrontVowel Cons+ %^ \%^* _ ;

The word has Frontvowel-backvowel-frontwovel vowels (mixed)
I get this
foma[1]: down
apply down> citromlé+Noun+Posss1p+Gens+Dat
citromlé^im^é^n§AA§k
citromlev^aim^é^n§AA§k
when I stop immediately after replacement of §AE§.

This is wrong! the rule says:
                 §AE§ -> a // .#. \"^"* BackVowel Cons+ %^ \%^* _ .o.

Start from the beginning of the word; if you see backvowel, then only 
consonant(s) and then ^, replace §AE§ after this with 'a';

However there is no such sequence in citromlev^, since before ^ there is 
frontvowel and not backvowel.

If I use:  
define HarmRuleai §AE§ -> 0 || .#. \"^"* Vowelwithy %^ \%^* _ .o.
                  §AE§ -> e // .#. \"^"* FrontVowel Cons+ %^ \%^* _ .o.
                  §AE§ -> a // .#. \"^"* BackVowel Cons+ %^ \%^* _ ;

That is, I swap check for front and back vowel, I get correct behaviour but I 
do not understand, why the first version delivers an incorrect replacement.

Any ideas?

Original issue reported on code.google.com by eleonor...@gmx.net on 1 Feb 2012 at 4:28

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
There seems to be a bug here:

define Cons [ b | c | d | e | f | g | h | j | k | l | m | n | p | q | r | s | t 
| v | w | x | y | z | B | C | D | E | F | G | H | J | K | L | M | N | P | Q | R 
| S | T | V | W | X | Y | Z ];

Here, "e" is defined as a consonant, and the rule is triggered in environments 
it shouldn't be:

§AE§ -> a // .#. \"^"* BackVowel Cons+ %^ \%^* _ .o.

Like so:

c i t r o  m l e v ^ §AE§
        BV       C 

Original comment by mans.hul...@gmail.com on 4 Feb 2012 at 7:46