Kymorph/Remaining transducer issues/п deletion and voicing conflict
< Kymorph | Remaining transducer issues
Jump to navigation
Jump to search
Revision as of 10:55, 25 July 2011 by TommiPirinen (talk | contribs) (Multiple context subtraction example)
The problem
The environment
- п should delete between a low vowel and a morpheme boundary followed by {I}п
- e.g., тап>{I}п : таап, теп>{I}п : тээп (everything else needed for these rules works)
- п should voice (to б) in all other intervocalic positions
- e.g., тап>{A} : таба, теп>{A} : тебе
- also: кап>{I} : кабы, кеп>{I} : кеби
The basic rules
- "Intervocalic voicing of п"
- п:б <=> :SurVow (:0) _ %>: (:0) :SurVow ;
- "Deletion of п at end of verb stem in <cv_perf>"
- п:0 <=> :LowVow _ %>: %{I%}: п ;
The conflict
As expected, the following conflict results from these two rules being present in the same .twol file:
There is a <=-rule conflict between "Intervocalic voicing of п" and "Deletion of п at end of verb stem in <cv_perf>". E.g. in context {I}:и >: ё:ё _ >: {I}:и п:п WARNING! The conflict is unresolvable.
What needs to be done
Somehow, the voicing rule's environment needs to exclude the entire environment of the deletion rule.
How to do it
It might be possible with what's suggested in the twolc book on pp. 49-54.
How not to do it
- Simply subtracting the deletion rule's environment from the voicing rule's environment is impossible because _ cannot be contained in such subtractions.
- Subtracting the more restrictive rule's left (x) and right (y) environments from the more general rule's left (a) and right (b) environments (respectively, resulting in [ a - x ] _ [ b - y ]) doesn't work either, because then it fails to apply the more general [voicing] rule after e.g., any x environment, not just when any y follows.
- Using <= and => instead of <=> does not seem to be a possible solution.
Multiple context subtraction example
$ svn diff apertium-tr-ky.ky.twol Index: apertium-tr-ky.ky.twol =================================================================== --- apertium-tr-ky.ky.twol (revision 32117) +++ apertium-tr-ky.ky.twol (arbetskopia) @@ -50,6 +50,8 @@ BackLowRndVow = О о Ё ё ; LowVow = Е е Э э Ө ө А а Я я О о Ё ё ; ! АА аа ЭЭ ээ ӨӨ өө ОО оо ; YotVow = Я я Е е Ё ё Ю ю ; +UnlowVow = И У Ү Ы Ю + и у ү ы ю ; NasalCns = м н ң М Н Ң ; @@ -136,7 +138,11 @@ !п:б <=> :SurVow _ %>: [ [ (:0) :SurVow ] - $[ %{I%}: п ] ] ; !п:б <=> :SurVow _ %>: [ [ (:0) :SurVow ] - [ %{I%}: п ] ] ; !п:б <=> :SurVow (:0) _ %>: (:0) [ :SurVow - %{I%}:LowVow ] ; -п:б <=> :SurVow (:0) _ %>: (:0) :SurVow ; + +п:б <=> :UnlowVow (:0) _ %>: (:0) [ [:SurVow - %{I%}:] [:* - п]* | %{I%}: ] .#. ; + :UnlowVow (:0) _ %>: (:0) :SurVow ; + :SurVow (:0) _ %>: (:0) [ [:SurVow - %{I%}:] [:* - п]* | %{I%}: ] .#. ; + !п:б => :SurVow (:0) _ %>: (:0) :SurVow ; !п:б <= :SurVow (:0) _ %>: (:0) :SurVow ; !п:б <=> [ [ :SurVow :* ] - [ :LowVow :* ] ] (:0) _ %>: (:0) [ [ :* :SurVow ] - [ :* %{I%}: п [ :Cns | .#. ] ] ] ; @@ -310,15 +316,15 @@ LastVowel in ( и ү е э ө я а ё о ы ю у ) matched ; -"Deletion of all the other {I}s in {I}п <cv_perf>" -%{I%}:0 <=> [ :SurVow - м:SurVow ] %>: _ п ; +!"Deletion of all the other {I}s in {I}п <cv_perf>" +!%{I%}:0 <=> [ :SurVow - м:SurVow ] %>: _ п ; !!"Deletion of п at end of verb stem before {I}п <cv_perf>" !!п:0 <=> :LowVow _ %>: %{I%}: п ; -!"Deletion of п at end of verb stem in <cv_perf>" +"Deletion of п at end of verb stem in <cv_perf>" !!п:0 <=> _ %>: %{I%}:0 п ; -!п:0 <=> :LowVow _ %>: %{I%}: п ; +п:0 <=> :LowVow _ %>: %{I%}: п ; !!п:0 <= :LowVow _ %>: %{I%}: п ; !!п:0 <=> :LowVow _ %>: %{I%}: п [ :Cns | .#. ] ;