From 6a34154b77ac80f89df816ba0062f382d915fb22 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 5 Sep 2021 19:41:40 +0200 Subject: Updated tests --- src/lib/modifiers/e.ml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/lib/modifiers/e.ml') 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 -- cgit v1.2.3