File: apertium-kaz.kaz.twol

package info (click to toggle)
apertium-kaz 0.1.0~r61338-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 21,436 kB
  • sloc: python: 368; sh: 203; makefile: 154; xml: 94
file content (467 lines) | stat: -rw-r--r-- 18,573 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

Alphabet
 А Ә Б В Г Ғ Д Е Ё Ж З И І Й К Қ Л М Н Ң О Ө П Р С Т У Ұ Ү Ф Х Һ Ц Ч Ш Щ Ь Ы Ъ Э Ю Я
 а ә б в г ғ д е ё ж з и і й к қ л м н ң о ө п р с т у ұ ү ф х һ ц ч ш щ ь ы ъ э ю я
 %0 1 2 3 4 5 6 7 8 9
 %{K%}:к %{l%}:л %{L%}:л %{M%}:м %{N%}:н %{G%}:г %{D%}:д  ! Cns
 %{S%}:с %{n%}:н %{y%}:ы %{o%}:0 %{д%}:0 %{т%}:0 %{ъ%}:0  ! disappearing stuff
 %{A%}:а %{I%}:ы %{E%}:а ! Vow
 ° %% %, %. %- %>:0 %    ! punctuation and boundaries

 !!! These are needed for the phonology of numbers, alphabetisms, and acronyms
 !!! They trigger relevant phonology and disappear
 %{а%}:0 %{э%}:0 %{ә%}:ә
 %{й%}:0 %{л%}:0 %{н%}:0 %{з%}:0 %{с%}:0

 ! Russian words:
 %{☭%}:0 %{і%}:і

 ! Obstacles on the road!!
 %{❗%}:0 ;

Sets

Vow =      А Ә Е Ё І И О Ө У Ү Ұ Ы Э Ю Я
           а ә е ё і и о ө у ү ұ ы э ю я 
           %{A%} %{I%} %{E%} %{y%}
           %{а%} %{э%} ;

LowVow =   А Ә Е О Ө
           а ә е о ө ;

HighVow =  І Ү Ы Ұ
           і ү ы ұ ;

YotVow = Я я Е е Ё ё Ю ю ;

VowRight = А Ә Е Ё І О Ө Ү Ұ Ы Э Я
           а ә е ё і о ө ү ұ ы э я 
           %{A%} %{I%} %{E%} ;

FrontVow = Ә Е І Ө Ү Э
           ә е і ө ү э
           %{э%} ;

BackVow = А О Ұ Ы Я Ё
          а о ұ ы я ё
          %{а%} ;

! FIXME: These can be front or back vowels :(
VCdigraphs = У И Ю
             у и ю ;

CVdigraphs = Е Ё Ю Я
             е ё ю я ;
				 ! е is only CV after vowels; others only occur after vowels

Cns =      Б В Г Ғ Д Ж З Й К Қ Л М Н Ң П Р С Т Ф Х Һ Ц Ч Ш Щ Ь Ъ 
           б в г ғ д ж з й к қ л м н ң п р с т ф х һ ц ч ш щ ь ъ 
           %{D%} %{K%} %{G%} %{N%} %{L%} %{M%} %{S%} %{n%} ; ! %- ;

CnsRight = Б В Г Ғ Д Ж З И Й К Қ Л М Н Ң П Р С Т У Ф Х Һ Ц Ч Ш Щ Ь Ъ Ю
           б в г ғ д ж з и й к қ л м н ң п р с т у ф х һ ц ч ш щ ь ъ ю
           %{D%} %{K%} %{G%} %{N%} %{L%} %{M%} %{S%} %{n%} ; ! %- ;

AbstrCns = %{й%} %{л%} %{н%} %{з%} %{с%} ;  

Abstract = %{а%} %{э%} %{й%} %{л%} %{н%} %{з%} %{с%} ;  

HighSonCns = Й У Р И Ю
             й у р и ю ;

Liquid = Л
         л ;

Nasals = М Н Ң
         м н ң ;

! FIXME: There are a few "native" Kazakh words with ж as voiced also
VoicedObstruents = Ғ З
                   ғ з ;

! These are all voiceless when word-final, many only in borrowings
VoicelessCns = Б В П Ф Д Т Ц Ж Ш Щ Ч С Г Х К Қ Һ
               б в п ф д т ц ж ш щ ч с г х к қ һ 
               %{с%} ;

AbstrVoicelessCns = %{с%} ;

AbstrVoicedCns = %{й%} %{л%} %{н%} %{з%} ;

FrontCns = К Г Ь
           к г ь ;

BackCns  = Қ Ғ
           қ ғ ;

Rules 

!!!! Desonorisation !!!!

"N Desonorisation"
%{N%}:д <=> [ :HighSonCns | :Liquid | :Nasals | :VoicedObstruents ] [ %>: | %{☭%}:0 | т:0 | д:0 | с:0 | :ь ]* _ ;
                                        [ %{й%}: | %{л%}: | %{н%}: | %{з%}: ]/[ %-: | %%: | %>: ] _ ;
            except
                    :Nasals/[ :0 - Abstract:0 ]  _ :Vow :Nasals ;
                     %{n%}: %>: _ ;

"L Desonorisation"
%{L%}:д <=> [ :Liquid | :Nasals | :VoicedObstruents ] [ %>: | %{☭%}:0 | т:0 | д:0 | с:0 | :ь ]* _ ;
                                                   [ %{л%}: | %{н%}: | %{з%}: ] %>: _ ;

"M Desonorisation"
%{M%}:б <=> [ :Nasals | :VoicedObstruents ]/[ %>: | %  ] _ ;
                                 [ %{н%}: | %{з%}: ] %>: _ ;
            except
                                    :Nasals %>: _ Vow :Nasals ;

!!!! Nasal harmony !!!!
"D nasal harmony"
%{D%}:н <=> :Nasals/[ :0 - Abstract:0 ] _ :Vow :Nasals ;
            %{n%}:0 %>: _ Vow :Nasals ;
            %{н%}:0 [ %-: | %>: ]* _ Vow :Nasals ;

!!!! Assimilation !!!!

"Forward voicing assimilation"
Cx:Cy <=> :VoicelessCns/[ %>: | т:0 | д:0 | с:0 | %  | %{☭%}:0 | %{ъ%}:0 ] _ ;
          AbstrVoicelessCns:/[ %-: | %>: ] _ ;
          where Cx in ( %{M%}  %{D%}  %{L%}  %{N%} )
                Cy in (   п      т      т      т   )
                matched;

"Voicing assimilation of front G"
%{G%}:к <=> [ :FrontVow | :и | :у | %{э%}: ] [ :Cns* [ :VoicelessCns - :BackCns ] ]/[ %>: | [ :0 - [ ы:0 | Abstract:0 ] ] ] _ ;
                                                      [ :VoicelessCns & :FrontCns ]/[ %>: | [ :0 - [ ы:0 | Abstract:0 ] ] ] _ ;
                                                                                            [ %{э%}: %{с%}: ]/[ %>: | :%- ] _ ;
             except
!                                                                 [ ы:0 [ :и | :у ] :Cns* [ :VoicelessCns - :BackCns ] ]/%>: _ ;
!      [ .#. :Cns* :у [ :Cns - :FrontCns ]* ]/[ %>: | [ :0  - ь:0 ] ] _ ;
!                        [ :BackVow :у [ :Cns - :FrontCns]* ]/[ %>: ] _ ;
!                        [ ы:0 [ :и | :у ] [ :Cns - :FrontCns]* ]/%>: _ ;
!                             [ :у %{☭%}:0/[ :Cns - :FrontCns ] ]/%>: _ ;
                             [ :у :Cns* [ :VoicelessCns - :FrontCns ]/%{☭%}:0 ]/%>: _ ;



"Voicing assimilation of back G"
%{G%}:қ <=> [ :BackVow | ы:0 ] [ :Cns* [ :VoicelessCns - :FrontCns ] ]/[ %>: | [ :0 - [ Abstract:0 - %{☭%}:0 ] ] | т:0 | д:0 | с:0 ] _ ;
                                                                     [ %{а%}: %{с%}: ]/[ %>: | :%- ] _ ;
                             [ :у :Cns* [ :VoicelessCns - :FrontCns ]/%{☭%}:0 ]/%>: _ ;
!            except
!    [ :BackVow [ :и | :у ]/:Cns* ]/[ :0 - [ Abstract:0 | %{☭%}:0 ] ] _ ;

"Voicing assimilation of G across space"
%{G%}:қ <=> [ :VoicelessCns | %{с%}: ] %  _ ;

"Normal G across space"
%{G%}:ғ <=> %  _ ;
            except
                   [ :VoicelessCns | %{с%}: ] %  _ ;

"Intervocalic voicing of п"
п:б <=> :Vow (:0) _ %>: (:0) :Vow ;
        except
               [ :LowVow ]/[ :0 ] _ %>: [ :HighVow :п ]/[ :0 ] ;

"Lenition of п to у in Ip forms"
п:у <=> [ :LowVow ]/[ :0 ] _ %>: [ :HighVow :п ]/[ :0 ] ;

"Intervocalic voicing of к/қ"
Cx:Cy <=> :Vow (:0) _ %>: (:0) :Vow ;
          except
            %{❗%}:0 _ ;
          where Cx in ( к қ )
                Cy in ( г ғ )
                matched;

!!!! Dissimilation !!!!

"Passive {l} becomes n after verb stem ending in /l/"
%{l%}:н <=> [ л :Vow ]/[ :0 | %>: ] _ ;

!!!! Vowel Harmony !!!!

"I Vowel Harmony"
%{I%}:і <=> [ [ :FrontVow | :и ] :Cns* :CnsRight ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
!            [ :FrontVow [ :Cns | :и | :у ]* :CnsRight ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
                 [ :и :Cns* :CnsRight %{☭%}:0 ]/[ %>: | т:0 | д:0 | с:0 ] _ ;
                 [ %{э%}:0 [ :Cns | AbstrCns: ]* ]/[ %>: | %-: | %{S%}: ] _ ;
     [ :FrontCns :Cns* ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
  [ .#. :Cns* :и [ :Cns | :ю ]* ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
  [ :FrontVow :у/:Cns* ]/[ :0 - [ Abstract:0 | %{☭%}:0 | %{ъ%}:0 ] ] _ ;
            :BackVow %{э%}:0/[ :CnsRight | :Cns | [ :0 - %{э%}:0 ] ] _ ;
!                    ь:0 [ :0 - ь: ]* _ ;
!                 FrontCns:0 [ :0 - FrontCns: ]* _ ;
                  ь:0 %{☭%}: %>: %{S%}: _ ;
            except
                                                %{n%}:н/[ :0 | %>: ] _ ;
                                 [ :BackCns ]/[ %>: | [ :0 - ь:0 ] ] _ ;
      [ .#. :Cns* :у [ :Cns - :FrontCns ]* ]/[ %>: | [ :0  - ь:0 ] ] _ ;
                        [ :BackVow :у [ :Cns - :FrontCns]* ]/[ %>: ] _ ;
!                                                 [ й: ]/[ %>: | :0 ] _ ;
                                                             %{o%}:0 _ ;
                        [ ы:0 [ :и | :у ] [ :Cns - :FrontCns]* ]/%>: _ ;
                             [ :у %{☭%}:0/[ :Cns - :FrontCns ] ]/%>: _ ;
 [ [ :BackVow | :BackCns] [ :и | :у | :ю ]*/[ :Cns - :FrontCns ]* ]/[ :0 - [ Abstract:0 | %{☭%}:0 | ь:0 ] ] _ ;

!ь:0 <=> _ %>: [ :Vow ]/[ :0 ] ;

"A Vowel Harmony"
%{A%}:е <=> [ [ :FrontVow | :и ] :Cns* :CnsRight ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] | %  ] _ ;
!            [ [ :FrontVow | :и | :у ] :Cns* :CnsRight ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] | %  ] _ ;
!            [ :FrontVow [ :Cns | :и | :у ]* :CnsRight ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] | %  ] _ ;
           [ %{э%}:0 :Cns* :CnsRight ]/[ %>: | %-: | AbstrCns: | %{S%}: ] _ ;
                                    [ %{э%}:0 AbstrCns:0* ]/[ %>: | %-: ] _ ;
         [ :FrontCns :Cns* ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
        [ .#. [ :Cns - :BackCns ]* :и :Cns* ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
!                                      [ [ :Cns - :BackCns ] :и ]/[ %>: ] _ ;
       [ :FrontVow :у/:Cns* ]/[ :0 - [ Abstract:0 | %{☭%}:0 | %{ъ%}:0 ] ] _ ;
  [ .#. :Cns* :и [ :Cns | :ю ]* ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
            except
                                                [ :BackCns ]/[ %>: | :0 ] _ ;
                      [ .#. :Cns* :у [ :Cns - :FrontCns ]* ]/[ %>: | :0 ] _ ;
                            [ :BackVow :у [ :Cns - :FrontCns ]* ]/[ %>: ] _ ;
                                                           [ й: ]/[ %>: ] _ ;
                                            [ ы:0 [ :и | :у ] :Cns* ]/%>: _ ;
                                  [ :у %{☭%}:0/[ :Cns - :FrontCns ] ]/%>: _ ;
 [ [ :BackVow | :BackCns] [ :и | :у | :ю ]*/[ :Cns - :FrontCns ]* ]/[ :0 - [ Abstract:0 | %{☭%}:0 ] ] _ ;
                                                                 :Vow %>: _ ;
                     [ %{ә%}:ә :Cns* :Cns ]/[ %  | :0 - [ Abstract:0 ] ]  _ ;

"E Vowel Harmony"
%{E%}:е <=> [ :FrontVow :Cns* :CnsRight ]/[ %>: | [ :0 - %{ъ%}:0 ] ] _ ;
                      [ :FrontCns :Cns* ]/[ %>: | [ :0 - %{ъ%}:0 ] ] _ ;
                 ! FIXME: this is supposed to make front vowels after и
                 !        but doesn't seem to work :(
                 !        e.g., и<v><TD><aor><p1><sg>
                 ![ .#. [ :Cns - :қ ]* и ]/[ %>: | :0 ] _ ;
!                    [ [ :Cns - :BackCns ] :и ]/[ %>: ] _ ;
                                      [ .#. [ :Cns - :BackCns ]* :и :Cns* ]/[ %>: | [ :0 - [ Abstract:0 | %{ъ%}:0 ] ] ] _ ;
            except
!                                     :Vow/[ :0 | %>: ] _ ;  ! WTF?
                                 :BackVow/[ :0 | %>: ] _ ;
                                 [ і:0 | ы:0 ]/[ %>: ] _ ;
                                        [ й: ]/[ %>: ] _ ;
   [ :BackVow [ :и | :у ]/:Cns* ]/[ :0 - [ Abstract:0 | %{☭%}:0 ] ] _ ;
                     [ :BackCns :и (%{ъ%}:0) ]/[ %>: ] _ ;


"Harmony of unepenthesised vowel in some stems"
%{y%}:і <=> [ :FrontVow :Cns* :CnsRight ]/[ %>: | :0 ] _ [ :Cns [ .#. | :Cns ] ]/[ :0 | %>: ] ;
     %{э%}:0/[ [ :0 - %{э%}: ] | :CnsRight ]* _ [ :Cns [ .#. | :Cns ] ]/[ :0 | %>: ] ;


"Turn {E} into й after a vowel"
%{E%}:й <=> [ :VowRight ]/[ %>: | :0 ] _ ;
            except
                 [ і:0 | ы:0 ]/[ %>: ] _ ;
                   [ й: ]/[ %>: | :0 ] _ ;

"Turn {E} into и to combine with a і and ы"
%{E%}:и <=> [ і:0 | ы:0 ]/[ %>: ] _ ;
            except
              [ й: ]/[ %>: | :0 ] _ ;

!!! More concise than following two rules, but does it work?
!"Delete і and ы before {E} so that the result can be и"
!і:0 <=> _ [ %{E%} ]/[ %>: ] ;
!        where I in ( і ы ) ;

"Delete і before {E} so that the result can be и"
і:0 <=> _ [ %{E%}: ]/[ %>: ] ;

"Delete ы before {E} so that the result can be и"
ы:0 <=> _ [ %{E%}: ]/[ %>: ] ;

!"A front vowel harmony after и"
!%{A%}:е <=> [ [ :Cns - :BackCns ] :и ]/[ %>: ] _ ;

"A back vowel harmony after и"
%{A%}:я <=> [ :BackCns :и (%{ъ%}:0) ]/[ %>: ] _ ;
                  [ :Cns :и %{ъ%}:0 ]/[ %>: ] _ ;
        except
                            [ :Vow - :и ] %>: _ ;

!"E front vowel harmony after и"
!%{E%}:е <=> [ [ :Cns - :BackCns ] :и ]/[ %>: ] _ ;

"E back vowel harmony after и"
%{E%}:я <=> [ :BackCns :и (%{ъ%}:0) ]/[ %>: ] _ ;
                  [ :Cns :и %{ъ%}:0 ]/[ %>: ] _ ;

!!!!!!!!!!!!   й vowel harmony  !!!!!!!!!!

"Vowel harmony for archiphoneme {A} after й and и"
%{A%}:Vy <=> [ :LastVowel й: ]/[ %>: ] _ ; 
        where Vy  in ( е  е  е  е  е  я  я  я  я  я  я  я  я )
        LastVowel in ( и  ү  е  э  ө  я  а  ё  о  ы  ұ  ю  у )
               matched ;

"Vowel harmony for archiphoneme {E} after й" ! should be just like {A}
%{E%}:Vy <=> [ :LastVowel й: ]/[ %>: ] _ ; 
        where Vy  in ( е  е  е  е  е  я  я  я  я  я  я  я  я )
        LastVowel in ( и  ү  е  э  ө  я  а  ё  о  ы  ұ  ю  у )
              matched ;

"Deletion of й before yoticised vowels when not earlier in a stem"
й:0 <=> _ %>: [ :YotVow ]/[ :0 ] ;

!"Delete й before yoticised vowels"
!й:0 <=> _ ( %>: ) YotVow ;

!"A Vowel harmony after й"
!%{A%}:я <=> [ :BackVow :Cns* й:0 ]/[ %>: ] _ ;


!!!! Consonant-vowel interactions !!!!

!!! FIXME:  суға still surfacing as суге
"Back assimilation of G"
! %{G%}:ғ <=> :BackVow [ :Cns* [ :Cns - [ :VoicelessCns | :FrontCns ] ]* ]/[ %>: ] _ ;
! %{G%}:ғ <=> _ [ :BackVow ]/[ %>: | :0 ] ;
%{G%}:ғ <=> [ [ :BackVow | ы:0 ] :Cns* ]/[ %>: | [ :0 - [ Abstract: | %{☭%}:0 ] ] | :и | :у ] _ ;
                            [ .#. :Cns* [ :у | :ю ]* :Cns* ]/[ %>: | [ :0 - [ Abstract: | %{☭%}:0 ] ] ] _ ;
                            [ :BackCns (:Vow) [ :и | :у | :ю ]* :Cns* ]/[ %>: | [ :0 - [ Abstract: | %{☭%}:0 ] ] ] _ ;
                                             [ %{а%}: AbstrVoicedCns:* ]/[ %>: | :%- ] _ ;
                                            [ %{ә%}:ә Cns:* ]/[ :0 - [ Abstract:0 ] ]  _ ;
              [ %{ъ%}: :Cns* ]/[ [ :0 - [ Abstract: | %{☭%}:0 ] ] | :и | :у | :ю ] _ ;
           FrontCns: BackVow: [ %>: | %{☭%}:0 ]* _ ;
            except
    :VoicelessCns/[ %>: | :0 ] _ ;
        :FrontCns/[ %>: | :0 ] _ ;
            %{I%}: :Nasals %>: _ %{A%}: (%>:) .#. ;  ! avoid conflict with "Deletion of dative {G} after px1sg, px2sg"
             %{I%}: :Nasals %>: _ %{A%}: (%>:) %  ;  ! ""
!    [ :BackVow [ :и | :у ]/:Cns* ]/[ :0 - [ Abstract:0 | %{☭%}:0 ] ] _ ;

!!!"Assimilation of G to 
!!!%{G%}:ғ <=> [ ы:0 :у :Cns* ]/[ %>: ] _ ;
!!!
!!!%{G%}:ғ <=> [ ы:0 :у :Cns* ]/[ %>: ] _ ;

"Back assimilation of K"
%{K%}:қ <=> [ :BackVow | ы:0 | %{а%}: ] [ :Cns* [ :Cns - [ :VoicelessCns | :FrontCns ] ]* ]/[ %>: | [ :0 - ы:0 ] ] _ ;
            [ :BackVow | ы:0 | %{а%}: ] [ :Cns* %{с%}: ]/[ %>: ] _ ;
!            except
!    [ :BackVow [ :и | :у ]/:Cns* ]/[ :0 - [ Abstract:0 | %{☭%}:0 ] ] _ ;
        except
            _ :Vow/[ :0 - [ ы: | %{а%}: ] ] ;


"Back assimilation and voicing of K"
%{K%}:ғ <=> [ :BackVow | ы:0 ]/[ %>: | [ :0 - ы: ] ] _ :Vow/[ :0 - [ ы: | %{а%}: ] ] ;

"Voicing of K"
%{K%}:г <=> [ :FrontVow ]/[ %>: | [ :0 - ы: ] ] _ :Vow/[ :0 - [ ы: | %{а%}: ] ]  ;


!!!! Disappearing stuff !!!!

"Deletion of {A} directly after vowel"
%{A%}:0 <=> [ :Vow - :и ] %>: _ ;

"Deletion of ы before у"
ы:0 <=> _ :у/[ %>: | :0 ] ;

"Deletion of і before у"
і:0 <=> _ :у/[ %>: | :0 ] ;

"у > ю after stems in /й/"
у:ю <=> [ :и | й: ] ( [ %{ъ%}: | %{❗%}: ] ) %>: _ ;

"Deletion of {S} after a consonant"
!%{S%}:0 <=> [ :Cns | й: ]/[ %>: | :0 ] _ ;
%{S%}:0 <=> :CnsRight/[ :0 - AbstrCns: ] _ ;
            AbstrCns:/[ %>: | %-: ] _ ;

"Deletion of {I} after vowels"
%{I%}:0 <=> [ :VowRight ]/[ :0 | %>: ] _ ;
            except
                               %{o%}:0 _ ;
            [ %{э%}:0 [ :Cns | AbstrCns: ]* ]/[ %>: | %-: | %{S%}: ] _ ;

! "Dialectal deletion of л between low vowel and Iп"   ! Dir/LR
! л:0 <=> :LowVow _ %>: %{I%}: :п ;                    ! Dir/LR
! 
! "Dialectal deletion of I when л deletes before Iп"   ! Dir/LR
! %{I%}:0 <=> л:0 %>: _ :п ;                           ! Dir/LR

"Dialectal deletion of л between low vowel and Iп"
л:0 <=> :LowVow _ %>: %{o%}:0 ;

"Dialectal deletion of I when л deletes before Iп"
%{I%}:0 <=> %{o%}:0 _ ;

"Epenthesis in some stems"
%{y%}:0 <=> _ [ :Cns :Vow ]/[ :0 | %>: ] ;

!!!!  Possessive + case stuff !!!!

"Deletion of accusative {N} after {n}"
%{N%}:0 <=> %{n%}: %>: _ %{I%}: .#. ;
            %{n%}: %>: _ %{I%}: %  ;

"Deletion of {n} before genitive {N}s"
%{n%}:0 <=> _ %>: %{N%}: %{I%}: \[ .#. | %  ]  ;

!"Deletion of ablative-initial {D} after {n}"
!%{D%}:0 <=> %{n%}: %>: _ %{A%}: :н ;

"Deletion of {n} before ablative {D}"
%{n%}:0 <=> _ %>: %{D%}: %{A%}: :н ;

"Deletion of {n} before instrumental {M}"
%{n%}:0 <=> _ %>: %{M%}: :е :н ;

"Deletion of dative {G} after px1sg, px2sg"
%{G%}:0 <=>  %{I%}: :Nasals %>: _ %{A%}: (%>:) .#. ;
             %{I%}: :Nasals %>: _ %{A%}: (%>:) %  ;

"/n/ deletion in px3 nominative"
%{n%}:0 <=> _ .#. ;
            _ %  ;  ! before a space

"Deletion of {I} after {n}"
%{I%}:0 <=> %{n%}:н/[ :0 | %>: ] _ ;
            except
                         %{o%}:0 _ ;

"Deletion of т when usually Russian word ending in ст precedes suffix starting in т"
т:0 <=> :с/:0 _ [ %{L%}: | %{N%}: | %{D%}: ]/:0 ;
!
! журналист:журналист
! журналист>LAр:журналистер
! журналист>NI:журналисті
!
! should also apply optionally to all suffixed forms (e.g. журналист>GA:журналиске is attested, but not as common as :журналистке)

"Deletion of д when usually Russian word ending in зд precedes suffix starting in д"
д:0 <=> :з/:0 _ [ %{L%}: | %{N%}: | %{D%}: | %{G%}: ]/:0 ;
!
! съезд:съезд
! съезд>LAр:съездер
! съезд>NI:съезді
! съезд>GA:съезге

"Deletion of numeral final - in nominative"
%-:0 <=> [ %0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ] _  .#. ;

"Deletion of ь when vowel-initial stem follows"
ь:0 <=> _ %>: [ :Vow ]/[ :0 ] ;

"Deletion of с at end of сс stem with suffix"
с:0 <=> :с _ :0* %>: ;

"{д} surfaces before vowels"
! ал%{д%}+{D}{A}н     ал%{д%}+{I}
! ал-дан               алд-ы
%{д%}:д <=> _ :Vow/[ %>: | :0 ] ;
            _ .#. ;

"{т} surfaces before vowels"
%{т%}:т <=> _ :Vow/[ %>: | :0 ] ;
! ас%{т%}+{D}{A}н     ал%{д%}+{I}
! ас-тан              аст-ы

"Deletion of {і} at end of word (i.e., in stand-alone forms)"
%{і%}:0 <=> _ .#. ;