ukrainian-phonetics-basic-array 0.1.1.0 → 0.1.2.0
raw patch · 4 files changed
+55/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Languages.Phonetic.Ukrainian.Syllable.Arr: syllableDurations4 :: [[[UZPP2]]] -> [[Float]]
+ Languages.Phonetic.Ukrainian.Syllable.Arr: uzpp2Durat4 :: UZPP2 -> Float
+ Languages.Phonetic.Ukrainian.Syllable.Double.Arr: syllableDurationsD4 :: [[[UZPP2]]] -> [[Double]]
+ Languages.Phonetic.Ukrainian.Syllable.Double.Arr: uzpp2DuratD4 :: UZPP2 -> Double
Files
- CHANGELOG.md +4/−0
- Languages/Phonetic/Ukrainian/Syllable/Arr.hs +30/−1
- Languages/Phonetic/Ukrainian/Syllable/Double/Arr.hs +20/−1
- ukrainian-phonetics-basic-array.cabal +1/−1
CHANGELOG.md view
@@ -10,3 +10,7 @@ * First version revised A. Changed the dependency boundaries to fix the array usage issue. Please, update to the new version to avoid the misusage. +## 0.1.2.0 -- 2021-01-27++* First version revised B. Added new variants of the sound representation durations to the Languages.Phonetic.Ukrainian.Syllable.Double.Arr and Languages.Phonetic.Ukrainian.Syllable.Arr modules.+Some documentation improvements.
Languages/Phonetic/Ukrainian/Syllable/Arr.hs view
@@ -3,7 +3,7 @@ -- | -- Module : Languages.Phonetic.Ukrainian.Syllable.Arr--- Copyright : (c) OleksandrZhabenko 2020+-- Copyright : (c) OleksandrZhabenko 2020-2021 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com@@ -186,6 +186,7 @@ ("и", 0.099955), ("й", 0.057143), ("к", 0.045351), ("л", 0.064036), ("м", 0.077370), ("н", 0.074240), ("о", 0.116463), ("п", 0.134830), ("р", 0.049206), ("с", 0.074603), ("сь", 0.074558), ("т", 0.110658), ("у", 0.109070), ("ф", 0.062268), ("х", 0.077188), ("ц", 0.053061), ("ць", 0.089342), ("ч", 0.057596), ("ш", 0.066077), ("ь", 0.020227), ("і", 0.094150), ("ґ", 0.062948)]+{-# DEPRECATED str2Durat1 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} -- | Just another possible duration approximation obtained by usage of the @r-glpk-phonetic-languages-ukrainian-durations@ package -- https://hackage.haskell.org/package/r-glpk-phonetic-languages-ukrainian-durations.@@ -203,6 +204,7 @@ (UZ 'r' O, 0.06354637), (UZ 's' L, 0.05294375), (UZ 't' L, 0.05047358), (UZ 't' M, 0.05047358), (UZ 'u' W, 0.25250039), (UZ 'v' S, 0.08404524), (UZ 'v' O, 0.08404524), (UZ 'w' N, 0.07835033), (UZ 'x' L, 0.07905155), (UZ 'x' M, 0.07905155), (UZ 'y' W, 0.20509350), (UZ 'z' D, 0.06099951), (UZ 'z' K, 0.06099951)]+{-# DEPRECATED uzpp2Durat2 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} uzpp2Durat1 :: UZPP2 -> Float uzpp2Durat1 = getBFstLSorted' 0.051020 [(UZ 'A' D, 0.055601), (UZ 'A' K, 0.055601), (UZ 'B' D, 0.070658), (UZ 'B' K, 0.070658), (UZ 'C' S, 0.057143), (UZ 'D' N, 0.074558),@@ -212,6 +214,7 @@ (UZ 'm' S, 0.077370), (UZ 'm' O, 0.077370), (UZ 'n' S, 0.074240), (UZ 'n' O, 0.074240), (UZ 'o' W, 0.116463), (UZ 'p' L, 0.134830), (UZ 'p' M, 0.134830), (UZ 'q' E, 0.020227), (UZ 'r' S, 0.049206), (UZ 'r' O, 0.049206), (UZ 's' L, 0.074603), (UZ 't' L, 0.110658), (UZ 't' M, 0.110658), (UZ 'u' W, 0.109070), (UZ 'v' S, 0.082268), (UZ 'v' O, 0.082268), (UZ 'w' N, 0.089342), (UZ 'x' L, 0.077188), (UZ 'x' M, 0.077188), (UZ 'y' W, 0.099955), (UZ 'z' D, 0.056054), (UZ 'z' K, 0.056054)]+{-# DEPRECATED uzpp2Durat1 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} uzpp2Durat3 :: UZPP2 -> Float uzpp2Durat3 = getBFstLSorted' 0.05779993 [(UZ 'A' D, 0.08453724), (UZ 'A' K, 0.08453724),@@ -228,20 +231,46 @@ (UZ 't' M, 0.06039120), (UZ 'u' W, 0.20243791), (UZ 'v' S, 0.07798724), (UZ 'v' O, 0.07798724), (UZ 'w' N, 0.07844400), (UZ 'x' L, 0.13526622), (UZ 'x' M, 0.13526622), (UZ 'y' W, 0.19849003), (UZ 'z' D, 0.06643842), (UZ 'z' K, 0.06643842)]+{-# DEPRECATED uzpp2Durat3 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} +uzpp2Durat4 :: UZPP2 -> Float+uzpp2Durat4 = getBFstLSorted' 0.14160713 [(UZ 'A' D, 0.08508446), (UZ 'A' K, 0.08508446), (UZ 'B' D, 0.17053331),+ (UZ 'B' K, 0.17053331), (UZ 'C' S, 0.06241711), (UZ 'D' N, 0.12159184), (UZ 'E' L, 0.21173804), (UZ 'E' M, 0.21173804),+ (UZ 'F' L, 0.24441358), (UZ 'F' M, 0.24441358), (UZ 'a' W, 0.20859653), (UZ 'b' D, 0.07768941),+ (UZ 'b' K, 0.07768941), (UZ 'c' D, 0.05705798), (UZ 'd' D, 0.12987485), (UZ 'd' K, 0.12987485),+ (UZ 'e' W, 0.21194045), (UZ 'f' L, 0.19044721), (UZ 'f' M, 0.19044721), (UZ 'g' D, 0.14343568),+ (UZ 'g' K, 0.14343568), (UZ 'h' D, 0.22822145), (UZ 'h' K, 0.22822145), (UZ 'i' W, 0.20167924),+ (UZ 'j' D, 0.16712392), (UZ 'j' K, 0.16712392), (UZ 'k' L, 0.10747824), (UZ 'k' M, 0.10747824),+ (UZ 'l' S, 0.16563571), (UZ 'l' O, 0.16563571), (UZ 'm' S, 0.26940890), (UZ 'm' O, 0.26940890),+ (UZ 'n' S, 0.13174949), (UZ 'n' O, 0.13174949), (UZ 'o' W, 0.20890920), (UZ 'p' L, 0.05737927),+ (UZ 'p' M, 0.05737927), (UZ 'q' E, 0.01957491), (UZ 'r' S, 0.05978079), (UZ 'r' O, 0.05978079),+ (UZ 's' L, 0.10201693), (UZ 't' L, 0.18138075), (UZ 't' M, 0.18138075), (UZ 'u' W, 0.19826109),+ (UZ 'v' S, 0.09572877), (UZ 'v' O, 0.09572877), (UZ 'w' N, 0.07663289), (UZ 'x' L, 0.26765448),+ (UZ 'x' M, 0.26765448), (UZ 'y' W, 0.20249813), (UZ 'z' D, 0.08566847), (UZ 'z' K, 0.08566847)]+{-# DEPRECATED uzpp2Durat4 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-}+ -- | General variant of the 'syllableDurations' function with the arbitrary 'uzpp2Durat1'-like function. syllableDurationsG :: (UZPP2 -> Float) -> [[[UZPP2]]] -> [[Float]] syllableDurationsG g = fmap (fmap (sum . fmap g)) {-# INLINABLE syllableDurationsG #-}+{-# DEPRECATED syllableDurationsG "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} -- | Returns list of lists, every inner one of which contains approximate durations of the Ukrainian syllables. syllableDurations :: [[[UZPP2]]] -> [[Float]] syllableDurations = syllableDurationsG uzpp2Durat1+{-# DEPRECATED syllableDurations "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} -- | Likewise 'syllableDurations', but uses 'uzpp2Durat2' instead of 'uzpp2Durat1'. syllableDurations2 :: [[[UZPP2]]] -> [[Float]] syllableDurations2 = syllableDurationsG uzpp2Durat2+{-# DEPRECATED syllableDurations2 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-} -- | Likewise 'syllableDurations', but uses 'uzpp2Durat3' instead of 'uzpp2Durat1'. syllableDurations3 :: [[[UZPP2]]] -> [[Float]] syllableDurations3 = syllableDurationsG uzpp2Durat3+{-# DEPRECATED syllableDurations3 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-}++-- | Likewise 'syllableDurations', but uses 'uzpp2Durat4' instead of 'uzpp2Durat1'.+syllableDurations4 :: [[[UZPP2]]] -> [[Float]]+syllableDurations4 = syllableDurationsG uzpp2Durat4+{-# DEPRECATED syllableDurations4 "Please, if possible, use the corresponding functions from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module." #-}
Languages/Phonetic/Ukrainian/Syllable/Double/Arr.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Languages.Phonetic.Ukrainian.Syllable.Double.Arr--- Copyright : (c) OleksandrZhabenko 2020+-- Copyright : (c) OleksandrZhabenko 2020-2021 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com@@ -64,6 +64,21 @@ (UZ 'w' N, 0.07844400), (UZ 'x' L, 0.13526622), (UZ 'x' M, 0.13526622), (UZ 'y' W, 0.19849003), (UZ 'z' D, 0.06643842), (UZ 'z' K, 0.06643842)] +uzpp2DuratD4 :: UZPP2 -> Double+uzpp2DuratD4 = getBFstLSorted' 0.14160713 [(UZ 'A' D, 0.08508446), (UZ 'A' K, 0.08508446), (UZ 'B' D, 0.17053331),+ (UZ 'B' K, 0.17053331), (UZ 'C' S, 0.06241711), (UZ 'D' N, 0.12159184), (UZ 'E' L, 0.21173804), (UZ 'E' M, 0.21173804),+ (UZ 'F' L, 0.24441358), (UZ 'F' M, 0.24441358), (UZ 'a' W, 0.20859653), (UZ 'b' D, 0.07768941),+ (UZ 'b' K, 0.07768941), (UZ 'c' D, 0.05705798), (UZ 'd' D, 0.12987485), (UZ 'd' K, 0.12987485),+ (UZ 'e' W, 0.21194045), (UZ 'f' L, 0.19044721), (UZ 'f' M, 0.19044721), (UZ 'g' D, 0.14343568),+ (UZ 'g' K, 0.14343568), (UZ 'h' D, 0.22822145), (UZ 'h' K, 0.22822145), (UZ 'i' W, 0.20167924),+ (UZ 'j' D, 0.16712392), (UZ 'j' K, 0.16712392), (UZ 'k' L, 0.10747824), (UZ 'k' M, 0.10747824),+ (UZ 'l' S, 0.16563571), (UZ 'l' O, 0.16563571), (UZ 'm' S, 0.26940890), (UZ 'm' O, 0.26940890),+ (UZ 'n' S, 0.13174949), (UZ 'n' O, 0.13174949), (UZ 'o' W, 0.20890920), (UZ 'p' L, 0.05737927),+ (UZ 'p' M, 0.05737927), (UZ 'q' E, 0.01957491), (UZ 'r' S, 0.05978079), (UZ 'r' O, 0.05978079),+ (UZ 's' L, 0.10201693), (UZ 't' L, 0.18138075), (UZ 't' M, 0.18138075), (UZ 'u' W, 0.19826109),+ (UZ 'v' S, 0.09572877), (UZ 'v' O, 0.09572877), (UZ 'w' N, 0.07663289), (UZ 'x' L, 0.26765448),+ (UZ 'x' M, 0.26765448), (UZ 'y' W, 0.20249813), (UZ 'z' D, 0.08566847), (UZ 'z' K, 0.08566847)]+ -- | General variant of the 'syllableDurationsD' function with the arbitrary 'uzpp2DuratD1'-like function. syllableDurationsGD :: (UZPP2 -> Double) -> [[[UZPP2]]] -> [[Double]] syllableDurationsGD g = fmap (fmap (sum . fmap g))@@ -80,3 +95,7 @@ -- | Likewise 'syllableDurations', but uses 'uzpp2DuratD3' instead of 'uzpp2DuratD1'. syllableDurationsD3 :: [[[UZPP2]]] -> [[Double]] syllableDurationsD3 = syllableDurationsGD uzpp2DuratD3++-- | Likewise 'syllableDurations', but uses 'uzpp2DuratD4' instead of 'uzpp2DuratD1'.+syllableDurationsD4 :: [[[UZPP2]]] -> [[Double]]+syllableDurationsD4 = syllableDurationsGD uzpp2DuratD4
ukrainian-phonetics-basic-array.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: ukrainian-phonetics-basic-array-version: 0.1.1.0+version: 0.1.2.0 synopsis: A library to work with the basic Ukrainian phonetics and syllable segmentation. description: A library to work with the basic Ukrainian phonetics and syllable segmentation. Rewritten from the mmsyn6ukr and mmsyn7s packages. Comparing to the ukrainian-phonetics-basic package, all the vector-related functionality removed, it also removed from the dependencies and the mmsyn2 is changed to mmsyn2-array. homepage: https://hackage.haskell.org/package/ukrainian-phonetics-basic-array