summaryrefslogtreecommitdiff
path: root/sorsyl/lib/syllabifier.mli
blob: e40feeb7896fb29eb5b54da9c1dcb9f7dfd38ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(** Syllabifier module for segmenting words into syllables using sonority *)

(** Result of syllabification *)
type syllabified = {
  word : string;           (** Original orthographic word *)
  ipa : string;            (** Original IPA transcription *)
  lang : string;           (** Language code *)
  clean_ipa : string;      (** Cleaned IPA without diacritics *)
  syllables : Syllable.t list;  (** List of syllables *)
}

(** Syllabify a word given its IPA transcription 
    @param sonority The sonority calculator
    @param ipa The IPA transcription of the word
    @param word The orthographic form of the word
    @param lang The language code
    @return The syllabified result
*)
val syllabify : 
  sonority:Sonority.t -> 
  ipa:string -> 
  word:string -> 
  lang:string -> 
  syllabified