summaryrefslogtreecommitdiff
path: root/src/lib/modifiers/e.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-09-05 19:41:40 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-09-05 19:41:40 +0200
commit6a34154b77ac80f89df816ba0062f382d915fb22 (patch)
tree5dab18f15fe8555d5369a9c492228f6aa4d23001 /src/lib/modifiers/e.ml
parent853e281a6719125866f8b948540944c571b091c6 (diff)
Updated tests
Diffstat (limited to 'src/lib/modifiers/e.ml')
-rw-r--r--src/lib/modifiers/e.ml18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/modifiers/e.ml b/src/lib/modifiers/e.ml
index 8fd65bf..5f6e6fe 100644
--- a/src/lib/modifiers/e.ml
+++ b/src/lib/modifiers/e.ml
@@ -2,14 +2,26 @@
let process
: 'a Sig.modifier
= fun init ->
- let ((v2, c) , ending) = init in
+ let ((v, c) , ending) = init in
match ending with
- | None when v2 = Sounds.schwa ->
+ | 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 v2 = Sounds.schwa ->
+ | 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