1 # © 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html#License
4 # File: si_si_FONIPA.txt
8 # Sinhala pronunciation rules
11 # k ɡ ŋ ᵑɡ c ɟ ɲ ʈ ɖ ⁿɖ t d n ⁿd p b m ᵐb j r l w ʃ s h f
12 # ə əː a aː æ æː i iː u uː e eː o oː
15 # [1] Asanka Wasala, Ruvan Weerasinghe, and Kumudu Gamage:
16 # Sinhala Grapheme-to-Phoneme Conversion and Rules for Schwa Epenthesis.
17 # Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions,
18 # pages 890–897. http://www.aclweb.org/anthology/P06-2114
19 # Simplify ya + yansaya to plain ya after a consonant.
20 [\u0D9A-\u0DC6] \u0DCA (\u200D)? { ය\u0DCAය → ය;
21 # Delete ZWNJ and ZWJ to simplify further processing.
24 # Insert a schwa after every consonant that is not followed by a dependent vowel
27 ([\u0D9A-\u0DC6]) } [^\u0DCA-\u0DDF \u0DF2\u0DF3] → $1 ə;
28 # Pronunciation rules proper.
30 # fප is an alternative spelling of ෆ.
31 # This occurs e.g. in ඩේව\u0DD2ඩ\u0DCA කොපර\u0DCAfප\u0DD3ල\u0DCAඩ\u0DCA (David Copperfield)
32 # [see http://bradshawofthefuture.blogspot.com/2013/02/f.html].
34 # zස is seemingly the only way to unambiguously indicate a voiced /z/ sound.
35 # This occurs in e.g. ඇල\u0DCAzසය\u0DD2ම' රෝගය (Alzheimer's disease)
36 # [see https://si.wikipedia.org/wiki/ඇල\u0DCAzසය\u0DD2ම%27_රෝගය]
37 # or in zස\u0DD3බ\u0DCAරා (zebra) [see https://si.wikipedia.org/wiki/zස\u0DD3බ\u0DCAරා].
40 o → ŋ; # common substitution for anusvaraya
41 ඃ ([\u0D9A-\u0DC6]) → | $1 \u0DCA $1; # TODO: check which consonants geminate
60 ඖ → aw; # TODO: check if this is correct
72 ඥ → kɲ; # TODO: double-check
102 \u0DCA → ; # delete virama
116 ෞ → aw; # TODO: check if this is correct
120 # Heuristics for turning /ə/ into /a/. Based on [1].
121 $c=[k ɡ ŋ {ᵑɡ} c ɟ ɲ ʈ ɖ {ⁿɖ} t d n {ⁿd} p b m {ᵐb} j r l w ʃ s z h f];
125 $s sv { ə → ə; # exception (a)
126 $s k { ə } r → ə; # exception (b)
127 $s $c { ə } $s → ə; # exception (c)
132 $c r { ə } $c → a; # clause (a) and (b)
133 $c r { a } h → a; # clause (d), exception
134 $c r { a } $c → ə; # clause (c)
136 # The paper is unclear about what this rule means. The interpretation here
137 # assumes that "preceded" in the paper is a typo and should be read "followed".
139 [a e æ o ə] h { ə → a;
140 # Rules #4 through #7
142 ə } $c $c → a; # Rule #4
143 ə } [rbɖʈ] $s → ə; # Rule #5 exception
144 ə } $c $s → a; # Rule #5
145 ə } ji $s → a; # Rule #6
146 k { ə } [rl] u → a; # Rule #7
148 # Note that the paper doesn't say explicitly that this rule should be
149 # anchored at the beginning of a word, but the remarks before the rules
150 # seem to imply this.
152 $s k { a } l[aeo]ːj → ə; # Typo in paper: /j/ was /y/.
153 $s k { a } le[mh][ui] → ə;
154 $s k { alə } h[ui] → əle;
158 www+ → ww; # යෞව\u0DCAවන
159 [i {iː} e {eː} æ {æː} o {oː} a {aː}] { wu → w;
161 iji → iː; # perhaps: ij
162 [u {uː} e {eː} æ {æː} o {oː} a {aː}] { ji → j;