diff options
Diffstat (limited to 'src/lib/sounds')
| -rw-r--r-- | src/lib/sounds/sig.ml | 2 | ||||
| -rw-r--r-- | src/lib/sounds/sounds.ml | 7 | ||||
| -rw-r--r-- | src/lib/sounds/sounds.mli | 2 | 
3 files changed, 10 insertions, 1 deletions
| diff --git a/src/lib/sounds/sig.ml b/src/lib/sounds/sig.ml index 3c3c731..3ff6bf2 100644 --- a/src/lib/sounds/sig.ml +++ b/src/lib/sounds/sig.ml @@ -1,6 +1,8 @@  module type REPR = sig    type t +  val space : string -> t +    val none: t    val a : t diff --git a/src/lib/sounds/sounds.ml b/src/lib/sounds/sounds.ml index 47fea2b..cc801dd 100644 --- a/src/lib/sounds/sounds.ml +++ b/src/lib/sounds/sounds.ml @@ -7,6 +7,7 @@ type kind =  type code =    | None +  | Space of string    | SZ (* This is a possible Z if followed by a voyel *)    | Voyel_A    | Voyel_E @@ -53,8 +54,8 @@ and t =  let is_voyel t =    t.kind = Voyel    || t.kind = SemiVoyel -let is_nasal t = t.nasal +let is_nasal t = t.nasal  let none =    { mutable_ = true @@ -62,6 +63,9 @@ let none =    ; nasal = false    ; code = None } +let space s = +  { none with code = Space s } +  let voyel =    { none with kind = Voyel } @@ -245,6 +249,7 @@ let repr        match letter.code, letter.nasal with        | None            , _     -> Repr.none +      | Space s         , _     -> Repr.space s        | Voyel_A         , false -> Repr.a        | Voyel_A         , true  -> Repr.a_nasal        | Voyel_AI        , false -> Repr.e_opened diff --git a/src/lib/sounds/sounds.mli b/src/lib/sounds/sounds.mli index 7dea8c0..3b7b760 100644 --- a/src/lib/sounds/sounds.mli +++ b/src/lib/sounds/sounds.mli @@ -15,6 +15,8 @@ val schwa: t      It can be used to replace any element in a syllabus *)  val none: t +val space: string -> t +  (** This is the voyel i like in "ici"      When nazalized, the voyel become [in] like in "ainsi" *)  val i : t | 
