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
|
(** Transform the e into eu or E *)
let process
: 'a Sig.modifier
= fun init ->
let ((v, c) , ending) = init in
match ending with
| None when v = Sounds.schwa ->
(* If there is no more consononant in the syllabe, change the e
into eu, like in sera *)
((Sounds.eu `Closed, c) , ending)
| Some _ when v = Sounds.schwa ->
(* If there is an ending consonant, change the e into E like essai *)
((Sounds.e `Opened, c) , ending)
| _ -> init
(** Transform the final e into E if there is a consonant *)
let ending_e
: 'a Sig.modifier
= fun init ->
let ((v, c) , ending) = init in
match ending with
| Some _ when v = Sounds.schwa ->
(* If there is an ending consonant, change the e into E like essai *)
((Sounds.e `Opened, c) , ending)
| _ -> init
|