diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-04 10:43:01 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-09-04 10:43:01 +0200 |
commit | 0ba049daed6e4b5d01f83d236f3178747bf849cb (patch) | |
tree | 72eeedcaa5fbe9736e2842879d62d0bf412a149f /src/lib/modifiers/e.ml | |
parent | 0b2e63791a073000b70b4463db5d8bce88ab4d23 (diff) |
Transform the letter e into eu or E
Diffstat (limited to 'src/lib/modifiers/e.ml')
-rw-r--r-- | src/lib/modifiers/e.ml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/modifiers/e.ml b/src/lib/modifiers/e.ml new file mode 100644 index 0000000..8fd65bf --- /dev/null +++ b/src/lib/modifiers/e.ml @@ -0,0 +1,15 @@ +(** Transform the e into eu or E *) +let process + : 'a Sig.modifier + = fun init -> + let ((v2, c) , ending) = init in + + match ending with + | None when v2 = 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 -> + (* If there is an ending consonant, change the e into E like essai *) + ((Sounds.e `Opened, c) , ending) + | _ -> init |