ukrainian-phonetics-basic-array 0.7.0.0 → 0.7.1.0
raw patch · 7 files changed
+85/−82 lines, 7 filesdep +intermediate-structuresdep −mmsyn5
Dependencies added: intermediate-structures
Dependencies removed: mmsyn5
Files
- CHANGELOG.md +4/−0
- LICENSE +1/−1
- Phladiprelio/Ukrainian/Melodics.hs +41/−73
- Phladiprelio/Ukrainian/Syllable.hs +5/−3
- Phladiprelio/Ukrainian/SyllableDouble.hs +12/−2
- README.md +18/−0
- ukrainian-phonetics-basic-array.cabal +4/−3
CHANGELOG.md view
@@ -68,3 +68,7 @@ * Seventh version. Switched to NoImplicitPrelude and Strict extensions. Updated the metadata and dependencies boundaries. Changed the names of the modules. +## 0.7.1.0 -- 2024-02-22++* Seventh version revised A. Some code improvements related to inlining. Switched to intermediate-structures instead of mmsyn5 as a dependency. Added README.md, devotion and Github repository with bug-tracker.+
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020-2023 Oleksandr Zhabenko+Copyright (c) 2020-2024 Oleksandr Zhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Phladiprelio/Ukrainian/Melodics.hs view
@@ -3,7 +3,7 @@ -- | -- Module : Phladiprelio.Ukrainian.Melodics--- Copyright : (c) OleksandrZhabenko 2021-2023+-- Copyright : (c) OleksandrZhabenko 2021-2024 -- License : MIT -- Maintainer : oleksandr.zhabenko@yahoo.com --@@ -62,74 +62,8 @@ type FlowSound = [Sound8] {-| The function that uses the following correspondence between the previous data type UZPP2 and the 'Sound8'.-@-UZ \'A\' D дз (plain) 8-UZ \'A\' K дз (palatalized) 9-UZ \'B\' D ж (plain) 10-UZ \'B\' K ж (semi-palatalized) 11-UZ \'C\' S й 27-UZ \'D\' N сь 54-UZ \'E\' L ч (plain) 39-UZ \'E\' M ч (semi-palatalized) 40-UZ \'F\' L ш (plain) 41-UZ \'F\' M ш (semi-palatalized) 42- G 55- H 56- I 57- J 58- K 59- L 60- M 61- N нт 62- O ст 63- P ть 64- Q дзь 12- R зь 13- S нь 65- T дь 14-UZ \'a\' W а 1-UZ \'b\' D б (plain) 15-UZ \'b\' K б (semi-palatalized) 16-UZ \'c\' D ц (plain) 38-UZ \'d\' D д (plain) 17-UZ \'d\' K д (palatalized) 18-UZ \'e\' W е 2-UZ \'f\' L ф (plain) 43-UZ \'f\' M ф (semi-palatalized) 44-UZ \'g\' D ґ (plain) 19-UZ \'g\' K ґ (semi-palatalized) 20-UZ \'h\' D г (plain) 21-UZ \'h\' K г (semi-palatalized) 22-UZ \'i\' W і 6-UZ \'j\' D дж (plain) 23-UZ \'j\' K дж (palatalized) 24-UZ \'k\' L к (plain) 45-UZ \'k\' M к (semi-palatalized) 46-UZ \'l\' S л (plain) 28-UZ \'l\' O л (palatalized) 29-UZ \'m\' S м (plain) 30-UZ \'m\' O м (semi-palatalized) 31-UZ \'n\' S н (plain) 32-UZ \'n\' O н (palatalized) 33-UZ \'o\' W о 3-UZ \'p\' L п (plain) 47-UZ \'p\' M п (semi-palatalized) 48-UZ \'q\' E ь 7-UZ \'r\' S р (plain) 34-UZ \'r\' O р (palatalized) 35-UZ \'s\' L с (plain) 49-UZ \'t\' L т (plain) 50-UZ \'t\' M т (palatalized) 51-UZ \'u\' W у 4-UZ \'v\' S в (plain) 36-UZ \'v\' O в (semi-palatalized) 37-UZ \'w\' N ць 66-UZ \'x\' L х (plain) 52-UZ \'x\' M х (semi-palatalized) 53-UZ \'y\' W и 5-UZ \'z\' D з (plain) 25-UZ \'z\' K з (palatalized) 26-@+See for more implementation information:+https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#ability-to-use-your-own-durations-of-representations-of-sounds-or-phonetic-phenomena Starting from the version 0.6.0.0: @@ -178,6 +112,7 @@ correctB . correctA tup12 . applyChanges tup7 . bsToCharUkr tup6 . createTuplesByAnalysis tup1 tup2 tup3 tup4 tup5 . secondConv tup14 . filterUkr tup13 . changeIotated tup16 . filter (\x -> isUkrainianLTup tup15 x || isSpace x || isControl x || isPunctuation x) . map toLower+{-# INLINE convertToProperUkrainianI8 #-} {-| A full variant of the 'convertToProperUkrainianI8' function with all the elements for the 'getBFst'' function being provided as 'Array' 'Int' (data tuple). Can be useful to reduce number of calculations in the complex usage scenarios.@@ -205,6 +140,7 @@ correctB . correctA tup12 . applyChanges tup7 . bsToCharUkr tup6 . createTuplesByAnalysis tup1 tup2 tup3 tup4 tup5 . secondConv tup14 . filterUkr tup13 . changeIotated tup16 . filter (\x -> isUkrainianLTup tup15 x || isSpace x || isControl x || isPunctuation x) . map toLower+{-# INLINE convertToProperUkrainianI8WithTuples #-} changeIotated :: Array Int (Char,Bool) -> String -> String changeIotated !tup16 (x:y:zs)@@ -215,9 +151,11 @@ filterUkr :: Array Int (Char,Int8) -> String -> FlowSound filterUkr tup13 = let !tup = (100, tup13) in map (getBFst' tup)+{-# INLINE filterUkr #-} secondConv :: Array Int (Int8,[Int8]) -> FlowSound -> FlowSound secondConv tup14 = concatMap (\y -> getBFst' ([y], tup14) y)+{-# INLINE secondConv #-} createTuplesByAnalysis :: Array Int (Int8,Bool) -> Array Int (Int8,Bool) -> Array Int (Int8,Bool) -> Array Int (Int8,Bool) -> Array Int ([Int8],Bool) -> FlowSound -> [FlowSound] createTuplesByAnalysis tup1 tup2 tup3 tup4 tup5 x@(h:ta)@@ -238,12 +176,12 @@ | otherwise = [t]:initialA tup3 tup4 tup5 ts initialA _ _ _ _ = [] - bsToCharUkr :: Array Int ([Int8],Int8) -> [FlowSound] -> FlowSound bsToCharUkr tup6 zs@(_:_) = map (g tup6) zs where g tup6 ts@(t:_) = getBFst' (t, tup6) ts g _ _ = 101 bsToCharUkr _ _ = []+{-# INLINE bsToCharUkr #-} applyChanges :: Array Int (Int8,FlowSound -> Sound8)@@ -253,29 +191,36 @@ where v = [] f x xs@(_:_) = getBFst' (\_ -> x, tup7) x xs:xs f x _ = [x]+{-# INLINE applyChanges #-} isVoicedObstruent :: FlowSound -> Bool isVoicedObstruent (x:_) = x > 7 && x < 27 isVoicedObstruent _ = False+{-# INLINE isVoicedObstruent #-} isVoicedObstruentH :: Array Int (Int8,Bool) -> FlowSound -> Bool isVoicedObstruentH tup8 (x:_) = getBFst' (False, tup8) x isVoicedObstruentH _ _ = False+{-# INLINE isVoicedObstruentH #-} isVoicedObstruentS :: FlowSound -> Bool isVoicedObstruentS (x:_) = x > 11 && x < 15 isVoicedObstruentS _ = False+{-# INLINE isVoicedObstruentS #-} isSoftDOrL :: Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Bool isSoftDOrL tup9 tup10 xs = getBFst' (False, tup9) (takeFromFT_ 2 xs) || getBFst' (False, tup10) (takeFromFT_ 1 xs)+{-# INLINE isSoftDOrL #-} isSoftDen :: Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Bool isSoftDen tup11 tup10 xs = getBFst' (False, tup11) (takeFromFT_ 2 xs) || getBFst' (False, tup10) (takeFromFT_ 1 xs)+{-# INLINE isSoftDen #-} гT :: FlowSound -> Sound8 гT (t:_) | t == 45 || t == 50 = 52 -- г х | otherwise = 21 гT _ = 21+{-# INLINE гT #-} дT :: FlowSound -> Sound8 дT t1@(_:_) | takeFromFT_ 1 t1 `elem` [[10],[39],[41]] = 23 -- д дж@@ -284,17 +229,20 @@ | takeFromFT_ 1 t1 `elem` [[25],[49],[38]] = 8 -- д дз | otherwise = 17 дT _ = 17+{-# INLINE дT #-} дзT :: Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Sound8 дзT tup9 tup10 t1@(_:_) | isSoftDOrL tup9 tup10 t1 = 12 -- дз дзь | otherwise = 8 дзT _ _ _ = 8+{-# INLINE дзT #-} жT :: FlowSound -> Sound8 жT t1@(_:_) | takeFromFT 2 t1 `elem` [[49,7],[38,7]] = 13 -- ж зь | takeFromFT 1 t1 `elem` [[54],[66]] = 13 | otherwise = 10 жT _ = 10+{-# INLINE жT #-} зT :: Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Sound8 зT tup9 tup10 t1@(_:_) | takeFromFT_ 1 t1 `elem` [[10],[39],[41]] || takeFromFT_ 2 t1 == [17,10] || takeFromFT_ 1 t1 == [23] = 10 -- з ж@@ -303,22 +251,26 @@ | takeFromFT 1 t1 `elem` [[49],[38]] || takeFromFT_ 1 t1 `elem` [[45],[47],[50],[43],[52]] = 49 -- з с | otherwise = 25 зT _ _ _ = 25+{-# INLINE зT #-} кT :: FlowSound -> Sound8 кT t1@(_:_) | isVoicedObstruent . takeFromFT_ 1 $ t1 = 19 | otherwise = 45 кT _ = 45+{-# INLINE кT #-} нтT :: FlowSound -> Sound8 нтT t1@(_:_) | takeFromFT 2 t1 == [49,50] || takeFromFT 1 t1 == [63] = 32 | takeFromFT 3 t1 == [49,7,45] || takeFromFT 2 t1 == [54,45] = 65 | otherwise = 62 нтT _ = 62+{-# INLINE нтT #-} пT :: FlowSound -> Sound8 пT t1@(_:_) | isVoicedObstruent . takeFromFT_ 1 $ t1 = 15 | otherwise = 47 пT _ = 47+{-# INLINE пT #-} сT :: Array Int (Int8,Bool) -> Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Sound8 сT tup8 tup9 tup10 t1@(_:_)@@ -329,6 +281,7 @@ | takeFromFT_ 1 t1 == [41] = 41 | otherwise = 49 сT _ _ _ _ = 49+{-# INLINE сT #-} стT :: FlowSound -> Sound8 стT t1@(_:_)@@ -338,11 +291,13 @@ | takeFromFT_ 1 t1 == [39] = 41 | otherwise = 63 стT _ = 63+{-# INLINE стT #-} сьT :: FlowSound -> Sound8 сьT t1@(_:_) | isVoicedObstruent . takeFromFT_ 1 $ t1 = 13 | otherwise = 54 сьT _ = 54+{-# INLINE сьT #-} тT :: Array Int (Int8,Bool) -> Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Sound8 тT tup8 tup11 tup10 t1@(_:_)@@ -355,22 +310,26 @@ | takeFromFT_ 1 t1 `elem` [[39],[41]] = 39 | otherwise = 50 тT _ _ _ _ = 50+{-# INLINE тT #-} тьT :: FlowSound -> Sound8 тьT t1@(_:_) | isVoicedObstruent . takeFromFT_ 1 $ t1 = 14 | takeFromFT_ 3 t1 == [49,7,1] || takeFromFT_ 2 t1 == [54,1] = 66 | otherwise = 64 тьT _ = 64+{-# INLINE тьT #-} фT :: FlowSound -> Sound8 фT t1@(_:_) | isVoicedObstruent . takeFromFT_ 1 $ t1 = 36 | otherwise = 43 фT _ = 43+{-# INLINE фT #-} хT :: FlowSound -> Sound8 хT t1@(_:_) | isVoicedObstruent . takeFromFT_ 1 $ t1 = 21 | otherwise = 52 хT _ = 52+{-# INLINE хT #-} цT :: Array Int (Int8,Bool) -> Array Int ([Int8],Bool) -> Array Int ([Int8],Bool) -> FlowSound -> Sound8 цT tup8 tup9 tup10 t1@(_:_)@@ -380,23 +339,27 @@ | isVoicedObstruentH tup8 . takeFromFT_ 1 $ t1 = 8 | otherwise = 38 цT _ _ _ _ = 38+{-# INLINE цT #-} цьT :: FlowSound -> Sound8 цьT t1@(_:_) | (isVoicedObstruent . takeFromFT_ 1 $ t1) && drop 1 (takeFromFT_ 2 t1) == [7] = 12 | otherwise = 66 цьT _ = 66+{-# INLINE цьT #-} чT :: FlowSound -> Sound8 чT t1@(_:_) | takeFromFT_ 2 t1 `elem` [[49,7],[38,7]] || takeFromFT_ 1 t1 `elem` [[54],[66]] = 66 | isVoicedObstruent . takeFromFT_ 1 $ t1 = 23 | otherwise = 39 чT _ = 39+{-# INLINE чT #-} шT :: FlowSound -> Sound8 шT t1@(_:_) | takeFromFT_ 2 t1 `elem` [[49,7],[38,7]] || takeFromFT_ 1 t1 `elem` [[54],[66]] = 54 | isVoicedObstruent . takeFromFT_ 1 $ t1 = 10 | otherwise = 41 шT _ = 41+{-# INLINE шT #-} takeFromFT :: Int -> FlowSound -> FlowSound takeFromFT n ts | if n < 1 then True else null ts = []@@ -417,12 +380,15 @@ takeFromFT_ :: Int -> FlowSound -> FlowSound takeFromFT_ n = takeFromFT n . filter (\t -> t > 0 && t < 100)+{-# INLINE takeFromFT_ #-} correctA :: Array Int (Int8,[Int8]) -> FlowSound -> FlowSound correctA tup12 = correctSomeW . separateSoftS tup12+{-# INLINE correctA #-} separateSoftS :: Array Int (Int8,[Int8]) -> FlowSound -> FlowSound separateSoftS tup12 = concatMap (\x -> getBFst' ([x], tup12) x)+{-# INLINE separateSoftS #-} correctSomeW :: FlowSound -> FlowSound correctSomeW (x:y:z:xs@(t:ys))@@ -436,12 +402,14 @@ correctB :: FlowSound -> FlowSound correctB ys@(x:xs)- | (length . filter (== 100) . takeFromFT2 6 $ ys) > 1 = map (\t -> if t >= 100 then 101 else t) (takeFromFT2 6 ys) ++ correctB (dropFromFT2 6 ys)+ | (length . filter (== 100) . takeFromFT2 6 $ ys) > 1 = map (\t -> if t >= 100 then 101 else t) (takeFromFT2 6 ys) `mappend` correctB (dropFromFT2 6 ys) | otherwise = (if x > 100 then 101 else x):correctB xs correctB _ = [] -- | Can be used to map the 'Sound8' representation and the mmsyn6ukr-array files with some recordings. linkFileNameI8 :: Sound8 -> Char-linkFileNameI8 x = getBFstLSorted' '0' ([(1,'A'),(2,'H'),(3,'Q'),(4,'W'),(5,'K'),(6,'e'),(7,'d'),(8,'G'),(10,'I'),(15,'B'),+linkFileNameI8 = getBFstLSorted' '0' ([(1,'A'),(2,'H'),(3,'Q'),(4,'W'),(5,'K'),(6,'e'),(7,'d'),(8,'G'),(10,'I'),(15,'B'), (17,'E'),(19,'f'),(21,'D'),(23,'F'),(25,'J'),(27,'L'),(28,'N'),(30,'O'),(32,'P'),(34,'S'),(36,'C'),(38,'Z'),(39,'b'),- (41,'c'),(43,'X'),(45,'M'),(47,'R'),(49,'T'),(50,'V'),(52,'Y'),(54,'U'),(60,'0'),(61,'0'),(66,'a')]) x+ (41,'c'),(43,'X'),(45,'M'),(47,'R'),(49,'T'),(50,'V'),(52,'Y'),(54,'U'),(60,'0'),(61,'0'),(66,'a')]) +{-# INLINE linkFileNameI8 #-}+
Phladiprelio/Ukrainian/Syllable.hs view
@@ -4,7 +4,7 @@ -- | -- Module : Phladiprelio.Ukrainian.Syllable--- Copyright : (c) Oleksandr Zhabenko 2021-2023+-- Copyright : (c) Oleksandr Zhabenko 2021-2024 -- License : MIT -- Stability : Experimental -- Maintainer : oleksandr.zhabenko@yahoo.com@@ -50,7 +50,7 @@ import Phladiprelio.Ukrainian.Melodics import CaseBi.Arr import GHC.Int-import Data.List.InnToOut.Basic (mapI)+import Data.IntermediateStructures1 (mapI) import Data.Maybe (mapMaybe) @@ -231,6 +231,7 @@ (28,False),(30,False),(32,False),(34,False),(36,False),(39,False),(41,False),(43,False),(45,False),(47,False), (50,False),(52,False)]) . min x $ y | otherwise = True+{-# INLINE notEqC #-} -- | Binary function-predicate 'notEqC' checks whether its arguments are not the same consonant sound representations (not taking palatalization into account). notEqCTup :: Array Int (Int8,Bool) -> Sound8 -> Sound8 -> Bool@@ -248,6 +249,7 @@ | x == y = False | abs (x - y) == 1 = getBFst' (True, tup17) . min x $ y | otherwise = True+{-# INLINE notEqCTup #-} -- | Function 'representProlonged' converts duplicated consequent in the syllable consonants -- so that they are represented by just one 'Sound8'. After applying the function to the list of 'Sound8' being a syllable all groups of duplicated consequent consonants@@ -266,7 +268,7 @@ (30,"\1084"),(31,"\1084"),(32,"\1085"),(33,"\1085"),(34,"\1088"),(35,"\1088"),(36,"\1074"),(37,"\1074"),(38,"\1094"), (39,"\1095"),(40,"\1095"),(41,"\1096"),(42,"\1096"),(43,"\1092"),(44,"\1092"),(45,"\1082"),(46,"\1082"),(47,"\1087"), (48,"\1087"),(49,"\1089"),(50,"\1090"),(51,"\1090"),(52,"\1093"),(53,"\1093"),(54,"\1089\1100"),(66,"\1094\1100")]-{-# INLINABLE showS8 #-}+{-# INLINE showS8 #-} showFS :: FlowSound -> String showFS = concatMap showS8 -- Probably, it is better to transform several consequent spaces into the combination smth like \", \" (but not in this version)
Phladiprelio/Ukrainian/SyllableDouble.hs view
@@ -2,7 +2,7 @@ {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Phladiprelio.Ukrainian.SyllableDouble--- Copyright : (c) Oleksandr Zhabenko 2021-2023+-- Copyright : (c) Oleksandr Zhabenko 2021-2024 -- License : MIT -- Stability : Experimental -- Maintainer : oleksandr.zhabenko@yahoo.com@@ -23,16 +23,20 @@ s0DuratD1 :: Sound8 -> Double s0DuratD1 = getBFstLSorted' 0.051020 [(1,0.138231),(2,9.3605e-2),(3,0.116463),(4,0.10907),(5,9.9955e-2),(6,9.415e-2),(7,2.0227e-2),(8,5.5601e-2),(9,5.5601e-2),(10,7.0658e-2),(11,7.0658e-2),(15,5.7143e-2),(16,5.7143e-2),(17,7.2063e-2),(18,7.2063e-2),(19,6.2948e-2),(20,6.2948e-2),(21,7.6825e-2),(22,7.6825e-2),(23,4.8934e-2),(24,4.8934e-2),(25,5.6054e-2),(26,5.6054e-2),(27,5.7143e-2),(28,6.4036e-2),(29,6.4036e-2),(30,7.737e-2),(31,7.737e-2),(32,7.424e-2),(33,7.424e-2),(34,4.9206e-2),(35,4.9206e-2),(36,8.2268e-2),(37,8.2268e-2),(38,5.3061e-2),(39,5.7596e-2),(40,5.7596e-2),(41,6.6077e-2),(42,6.6077e-2),(43,6.2268e-2),(44,6.2268e-2),(45,4.5351e-2),(46,4.5351e-2),(47,0.13483),(48,0.13483),(49,7.4603e-2),(50,0.110658),(51,0.110658),(52,7.7188e-2),(53,7.7188e-2),(54,7.4558e-2),(66,8.9342e-2)]+{-# INLINE s0DuratD1 #-} -- | s0DuratD2 :: Sound8 -> Double s0DuratD2 = getBFstLSorted' 0.06408817 [(1,0.27161466),(2,0.27192511),(3,0.28539351),(4,0.25250039),(5,0.2050935),(6,0.20026538),(7,2.218624e-2),(8,7.729654e-2),(9,7.729654e-2),(10,8.048113e-2),(11,8.048113e-2),(15,0.10977617),(16,0.10977617),(17,6.58655e-2),(18,6.58655e-2),(19,7.751571e-2),(20,7.751571e-2),(21,5.392745e-2),(22,5.392745e-2),(23,8.900757e-2),(24,8.900757e-2),(25,6.099951e-2),(26,6.099951e-2),(27,8.226452e-2),(28,0.11159399),(29,0.11159399),(30,0.14303837),(31,0.14303837),(32,5.639178e-2),(33,5.639178e-2),(34,6.354637e-2),(35,6.354637e-2),(36,8.404524e-2),(37,8.404524e-2),(38,5.616409e-2),(39,0.12541547),(40,0.12541547),(41,0.12838476),(42,0.12838476),(43,0.15776219),(44,0.15776219),(45,4.91782e-2),(46,4.91782e-2),(47,9.603085e-2),(48,9.603085e-2),(49,5.294375e-2),(50,5.047358e-2),(51,5.047358e-2),(52,7.905155e-2),(53,7.905155e-2),(54,7.512999e-2),(66,7.835033e-2)]+{-# INLINE s0DuratD2 #-} s0DuratD3 :: Sound8 -> Double s0DuratD3 = getBFstLSorted' 0.05779993 [(1,0.25872483),(2,0.22876537),(3,0.25423777),(4,0.20243791),(5,0.19849003),(6,0.19777405),(7,1.943042e-2),(8,8.453724e-2),(9,8.453724e-2),(10,9.996042e-2),(11,9.996042e-2),(15,0.13787716),(16,0.13787716),(17,7.437409e-2),(18,7.437409e-2),(19,7.985903e-2),(20,7.985903e-2),(21,0.10289067),(22,0.10289067),(23,0.10039843),(24,0.10039843),(25,6.643842e-2),(26,6.643842e-2),(27,0.10975353),(28,0.1090645),(29,0.1090645),(30,0.14576594),(31,0.14576594),(32,6.084464e-2),(33,6.084464e-2),(34,5.937718e-2),(35,5.937718e-2),(36,7.798724e-2),(37,7.798724e-2),(38,5.901357e-2),(39,0.11906522),(40,0.11906522),(41,0.13985258),(42,0.13985258),(43,0.15880087),(44,0.15880087),(45,5.893304e-2),(46,5.893304e-2),(47,0.10765654),(48,0.10765654),(49,6.247632e-2),(50,6.03912e-2),(51,6.03912e-2),(52,0.13526622),(53,0.13526622),(54,8.190674e-2),(66,7.8444e-2)]+{-# INLINE s0DuratD3 #-} s0DuratD4 :: Sound8 -> Double s0DuratD4 = getBFstLSorted' 0.14160713 [(1,0.20859653),(2,0.21194045),(3,0.2089092),(4,0.19826109),(5,0.20249813),(6,0.20167924),(7,1.957491e-2),(8,8.508446e-2),(9,8.508446e-2),(10,0.17053331),(11,0.17053331),(15,7.768941e-2),(16,7.768941e-2),(17,0.12987485),(18,0.12987485),(19,0.14343568),(20,0.14343568),(21,0.22822145),(22,0.22822145),(23,0.16712392),(24,0.16712392),(25,8.566847e-2),(26,8.566847e-2),(27,6.241711e-2),(28,0.16563571),(29,0.16563571),(30,0.2694089),(31,0.2694089),(32,0.13174949),(33,0.13174949),(34,5.978079e-2),(35,5.978079e-2),(36,9.572877e-2),(37,9.572877e-2),(38,5.705798e-2),(39,0.21173804),(40,0.21173804),(41,0.24441358),(42,0.24441358),(43,0.19044721),(44,0.19044721),(45,0.10747824),(46,0.10747824),(47,5.737927e-2),(48,5.737927e-2),(49,0.10201693),(50,0.18138075),(51,0.18138075),(52,0.26765448),(53,0.26765448),(54,0.12159184),(66,7.663289e-2)]+{-# INLINE s0DuratD4 #-} class (Eq a) => SyllableDurations4 a where sDuratsD :: a -> Double@@ -42,7 +46,7 @@ syllableDurationsGDc :: (a -> Double) -> [[[a]]] -> [[Double]] syllableDurationsGDc g = map (map (k g)) where k f = foldl' (\y x -> f x + y) 0- {-# INLINABLE syllableDurationsGDc #-}+ {-# INLINE syllableDurationsGDc #-} instance SyllableDurations4 Sound8 where sDuratsD = s0DuratD1@@ -53,15 +57,21 @@ -- | General variant of the 'syllableDurationsD' function. syllableDurationsGD :: (Sound8 -> Double) -> [[[Sound8]]] -> [[Double]] syllableDurationsGD g = syllableDurationsGDc g+{-# INLINE syllableDurationsGD #-} syllableDurationsD :: [[[Sound8]]] -> [[Double]] syllableDurationsD = syllableDurationsGDc s0DuratD1+{-# INLINE syllableDurationsD #-} syllableDurationsD2 :: [[[Sound8]]] -> [[Double]] syllableDurationsD2 = syllableDurationsGDc s0DuratD2+{-# INLINE syllableDurationsD2 #-} syllableDurationsD3 :: [[[Sound8]]] -> [[Double]] syllableDurationsD3 = syllableDurationsGDc s0DuratD3+{-# INLINE syllableDurationsD3 #-} syllableDurationsD4 :: [[[Sound8]]] -> [[Double]] syllableDurationsD4 = syllableDurationsGDc s0DuratD4+{-# INLINE syllableDurationsD4 #-}+
+ README.md view
@@ -0,0 +1,18 @@+ Devotion+ ========++The author would like to devote this project to support the [Foundation Gastrostars](https://gastrostars.nl).++On the 21/02/2024 there is an International Mother Tongue Day — that is Ukrainian for the author of the package. ++All support is welcome, including donations for the needs of the Ukrainian army, IDPs and refugees. ++If you would like to share some financial support with the Foundation Gastrostars, please, contact the mentioned foundation+using the URL:++[Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or ++[Donation Page](https://gastrostars.nl/doneren)+
ukrainian-phonetics-basic-array.cabal view
@@ -2,10 +2,11 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: ukrainian-phonetics-basic-array-version: 0.7.0.0+version: 0.7.1.0 synopsis: A library to work with the basic Ukrainian phonetics and syllable segmentation. description: 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. Since 0.4.0.0 version switched to the more optimized Int8-based functionality. The old modules with bytestring dependencies since the 0.6.0.0 version moved to the other package ukrainian-phonetics-basic-array-bytestring to reduce the actual dependencies for the phonetic languages concerning packages. homepage: https://hackage.haskell.org/package/ukrainian-phonetics-basic-array+bug-reports: https://github.com/Oleksandr-Zhabenko/ukrainian-phonetics-basic-array/issues license: MIT license-file: LICENSE author: OleksandrZhabenko@@ -13,13 +14,13 @@ copyright: Oleksandr Zhabenko category: Language build-type: Simple-extra-source-files: CHANGELOG.md+extra-source-files: CHANGELOG.md, README.md cabal-version: >=1.10 library exposed-modules: Phladiprelio.Ukrainian.Syllable, Phladiprelio.Ukrainian.Melodics, Phladiprelio.Ukrainian.SyllableDouble -- other-modules: other-extensions: DeriveDataTypeable, FlexibleInstances, TypeSynonymInstances, NoImplicitPrelude, Strict- build-depends: base >=4.13 && <5, mmsyn2-array ==0.3.1.1, mmsyn5 ==0.6.0.0, ukrainian-phonetics-common ==0.2.0.0+ build-depends: base >=4.13 && <5, mmsyn2-array ==0.3.1.1, intermediate-structures == 0.1.1.0, ukrainian-phonetics-common ==0.2.0.0 -- hs-source-dirs: default-language: Haskell2010