summaryrefslogtreecommitdiff
path: root/src/lib/modifiers/vocalize.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-09-04 10:43:01 +0200
committerSébastien Dailly <sebastien@chimrod.com>2021-09-04 10:43:01 +0200
commit0ba049daed6e4b5d01f83d236f3178747bf849cb (patch)
tree72eeedcaa5fbe9736e2842879d62d0bf412a149f /src/lib/modifiers/vocalize.ml
parent0b2e63791a073000b70b4463db5d8bce88ab4d23 (diff)
Transform the letter e into eu or E
Diffstat (limited to 'src/lib/modifiers/vocalize.ml')
-rw-r--r--src/lib/modifiers/vocalize.ml18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/modifiers/vocalize.ml b/src/lib/modifiers/vocalize.ml
index 1014642..068279d 100644
--- a/src/lib/modifiers/vocalize.ml
+++ b/src/lib/modifiers/vocalize.ml
@@ -1,25 +1,23 @@
-module T = Sounds
-
(** Transform the S into Z if the S is the opening consonant and
there is no ending consonant before *)
let process
: 'a Sig.modifier
= fun init ->
- let (((v1, v2), c) , ending) = init in
+ let ((v, c) , ending) = init in
match c with
| None -> init
| Some op ->
(* The voyel may be none in case of ending word. In such case, we shall
not transform the S into Z *)
- let is_voyel = T.is_voyel v1 && T.is_voyel v2 in
+ let is_voyel = Sounds.is_voyel v in
match is_voyel, op.Sig.opening, op.Sig.ending with
- | true, hd::[], None when hd = T.sz ->
- let c = Some { op with opening = [T.z] } in
- (((v1, v2), c) , ending)
- | true, hd::n::[], None when hd = T.sz && T.is_voyel n->
+ | true, hd::[], None when hd = Sounds.sz ->
+ let c = Some { op with opening = [Sounds.z] } in
+ ((v, c) , ending)
+ | true, hd::n::[], None when hd = Sounds.sz && Sounds.is_voyel n->
(* The s is followed by a semi-voyel *)
- let c = Some { op with opening = [T.z; n] } in
- (((v1, v2), c) , ending)
+ let c = Some { op with opening = [Sounds.z; n] } in
+ ((v, c) , ending)
| _ -> init