1 -- | Taubert, S. (2025). pinyin-to-ipa (Version 1.0.0) [Computer software]. https://doi.org/10.5281/zenodo.15229718
2 module Language.Chinese.Pinyin where
4 import Data.Map.Strict qualified as Map
6 import Worksheets.Utils.Prelude
8 initialMapping :: Map ShortText [ShortText]
11 , "c" := ["tsʰ"] -- tsʰ
12 , "ch" := ["ʈʂʰ"] -- tʂʰ
30 , "zh" := ["ʈʂ"] -- tʂ
31 -- w and y only occur in non-strict initials
33 -- "y" := ["j",), ("ɥ"]
35 & mapFromListCheckingDuplicates
37 initials = initialMapping & Map.keys
39 -- | Note: Syllabic consonants may also arise as a result of weak syllable reduction.
40 -- Syllabic nasal consonants are also heard in certain interjections;
41 -- pronunciations of such words include [m], [n], [ŋ], [hm], [hŋ].
42 syllabicConsonantMappings :: Map ShortText [ShortText]
43 syllabicConsonantMappings =
45 , "hng" := ["h", "ŋ0"]
50 & mapFromListCheckingDuplicates
52 syllabicConsonants = syllabicConsonantMappings & Map.keys