mhulden / foma

Automatically exported from code.google.com/p/foma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Consonant assimilation rule can be written more elegant?

GoogleCodeExporter opened this issue · comments

I have written a consonant assimilation rule that works:

define HarmRuleV V -> v || Vowel %^  _ ,,
                 V -> b || b %^ _ ,,
                 V -> c || c %^ _ ,,
                 V -> d || d %^ _ ,,
                 V -> f || f %^ _ ,,
                 V -> g || g %^ _ ,,
                 V -> h || h %^ _ ,,
                 V -> j || j %^ _ ,,
                 V -> k || k %^ _ ,,
                 V -> l || l %^ _ ,,
                 V -> m || m %^ _ ,,
                 V -> n || n %^ _ ,,
                 V -> p || p %^ _ ,,
                 V -> q || q %^ _ ,,
                 V -> r || r %^ _ ,,
                 V -> s || s %^ _ ,,
                 V -> t || t %^ _ ,,
                 V -> v || v %^ _ ,,
                 V -> z || z %^ _ ;
What it does is:
If the words ends with vowel, it is a v
If the word ends with consonant, it is the ending consonant.

for example: rém- rémm
             rab - rabb
             hajó- hajóv

In sfst there is a special variable, a so called agreement variable, that takes 
the value of the matching character, and that simplified the above rule, since 
one can express with one line: if a consonant is matched, take its value.

Is there nothing similar in foma to simplify the above rule?

Original issue reported on code.google.com by eleonor...@gmx.net on 4 Jan 2012 at 6:00