packages feed

phonetic-languages-simplified-generalized-properties-array 0.10.1.0 → 0.11.0.0

raw patch · 5 files changed

+349/−52 lines, 5 filesdep +lists-flinesdep +mmsyn2-arraydep ~phonetic-languages-basisPVP ok

version bump matches the API change (PVP)

Dependencies added: lists-flines, mmsyn2-array

Dependency ranges changed: phonetic-languages-basis

API changes (from Hackage documentation)

+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: PhoPaaW :: ([[[PRS]]] -> [[Double]]) -> MappingFunctionPL
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: SaaW :: ([[[Int8]]] -> [[Double]]) -> MappingFunctionPL
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: data MappingFunctionPL
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: fromPhoPaaW :: MappingFunctionPL -> Maybe ([[[PRS]]] -> [[Double]])
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: fromSaaW :: MappingFunctionPL -> Maybe ([[[Int8]]] -> [[Double]])
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: isPhoPaaW :: MappingFunctionPL -> Bool
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: isSaaW :: MappingFunctionPL -> Bool
+ Phonetic.Languages.EmphasisG: FSLG :: [[[Int8]]] -> ReadyForConstructionPL
+ Phonetic.Languages.EmphasisG: StrG :: String -> ReadyForConstructionPL
+ Phonetic.Languages.EmphasisG: SyG :: ![PRS] -> !Int8 -> !Double -> SyllWeightsG
+ Phonetic.Languages.EmphasisG: [order] :: SyllWeightsG -> !Int8
+ Phonetic.Languages.EmphasisG: [point] :: SyllWeightsG -> ![PRS]
+ Phonetic.Languages.EmphasisG: [weight] :: SyllWeightsG -> !Double
+ Phonetic.Languages.EmphasisG: convF1 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> [[FlowSoundG]]
+ Phonetic.Languages.EmphasisG: convF3 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> [([String], [[Int8]], [FlowSoundG])]
+ Phonetic.Languages.EmphasisG: convF3W :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> [(String, [[Int8]])]
+ Phonetic.Languages.EmphasisG: convFI :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> String -> [[[Int8]]]
+ Phonetic.Languages.EmphasisG: convFSL :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> ReadyForConstructionPL -> String
+ Phonetic.Languages.EmphasisG: data ReadyForConstructionPL
+ Phonetic.Languages.EmphasisG: data SyllWeightsG
+ Phonetic.Languages.EmphasisG: fromReadyFCPLF :: ReadyForConstructionPL -> Maybe [[[Int8]]]
+ Phonetic.Languages.EmphasisG: fromReadyFCPLS :: ReadyForConstructionPL -> Maybe String
+ Phonetic.Languages.EmphasisG: helper1F :: [Int8] -> [[[Int8]]]
+ Phonetic.Languages.EmphasisG: helper2F :: [b] -> [a] -> [c] -> [[d]] -> [([b], [a], [c])]
+ Phonetic.Languages.EmphasisG: instance GHC.Classes.Eq Phonetic.Languages.EmphasisG.ReadyForConstructionPL
+ Phonetic.Languages.EmphasisG: instance GHC.Classes.Ord Phonetic.Languages.EmphasisG.ReadyForConstructionPL
+ Phonetic.Languages.EmphasisG: instance GHC.Show.Show Phonetic.Languages.EmphasisG.SyllWeightsG
+ Phonetic.Languages.EmphasisG: isFSL :: ReadyForConstructionPL -> Bool
+ Phonetic.Languages.EmphasisG: isStr :: ReadyForConstructionPL -> Bool
+ Phonetic.Languages.EmphasisG: showFSG :: FlowSoundG -> String
+ Phonetic.Languages.EmphasisG: showR :: ReadyForConstructionPL -> String
+ Phonetic.Languages.EmphasisG: type FlowSoundG = [PRS]
+ Phonetic.Languages.EmphasisG: weightStringIO :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> IO ([[FlowSoundG]], [SyllWeightsG], [[[Int8]]])
+ Phonetic.Languages.EmphasisG: weightStringNIO :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Int -> String -> IO ([[FlowSoundG]], [[SyllWeightsG]], [[[Int8]]])
+ Phonetic.Languages.EmphasisG: weightSyllAIO :: Bool -> FlowSoundG -> IO Double
+ Phonetic.Languages.EmphasisG: weightSyllablesIO :: [FlowSoundG] -> IO [SyllWeightsG]
+ Phonetic.Languages.EmphasisG: weights2SyllableDurationsD :: [SyllWeightsG] -> [[[Int8]]] -> [[Double]]
+ Phonetic.Languages.EmphasisG: weights2SyllableDurationsDArr :: [SyllWeightsG] -> Array Int (Int8, Double)
+ Phonetic.Languages.EmphasisG: weightsString3IO :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Bool -> String -> IO ([[FlowSoundG]], [[[[Int8]]] -> [[Double]]], ReadyForConstructionPL)
+ Phonetic.Languages.EmphasisG: weightsString3NIO :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Int -> Bool -> String -> IO ([[FlowSoundG]], [[[[Int8]]] -> [[Double]]], ReadyForConstructionPL)
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2F :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> ([[[PRS]]] -> [[Double]]) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2F :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> MappingFunctionPL -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2FF :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Double -> (Double -> c) -> ([[[PRS]]] -> [[Double]]) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2FF :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Double -> (Double -> c) -> MappingFunctionPL -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2FG :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([Double] -> Double) -> (Double -> c) -> ([[[PRS]]] -> [[Double]]) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2FG :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([Double] -> Double) -> (Double -> c) -> MappingFunctionPL -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2InvF :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> ([[[PRS]]] -> [[Double]]) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2InvF :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> MappingFunctionPL -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2InvFF :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Double -> (Double -> c) -> ([[[PRS]]] -> [[Double]]) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2InvFF :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> Double -> (Double -> c) -> MappingFunctionPL -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2InvFG :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([Double] -> Double) -> (Double -> c) -> ([[[PRS]]] -> [[Double]]) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procB2InvFG :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([Double] -> Double) -> (Double -> c) -> MappingFunctionPL -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procDiverse2F :: Ord c => GWritingSystemPRPLX -> String -> (Double -> c) -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procDiverse2F :: Ord c => GWritingSystemPRPLX -> String -> (Double -> c) -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procDiverse2I :: Ord c => GWritingSystemPRPLX -> String -> (Int16 -> c) -> FuncRep2 String Int16 c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procDiverse2I :: Ord c => GWritingSystemPRPLX -> String -> (Int16 -> c) -> FuncRep2 ReadyForConstructionPL Int16 c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procRhythm23F :: Ord c => (Double -> c) -> String -> (String -> Coeffs2 -> String -> Double) -> Coeffs2 -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procRhythm23F :: Ord c => (Double -> c) -> String -> (String -> Coeffs2 -> ReadyForConstructionPL -> Double) -> Coeffs2 -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesFuncRepG2: procRhythmicity23F :: Ord c => Double -> (Double -> c) -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> String -> Coeffs2 -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> FuncRep2 String Double c
+ Phonetic.Languages.Array.General.PropertiesFuncRepG2: procRhythmicity23F :: Ord c => Double -> (Double -> c) -> (Double -> String -> MappingFunctionPL) -> String -> Coeffs2 -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicity :: Double -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> Coeffs2 -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> Double
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicity :: Double -> String -> (Double -> String -> MappingFunctionPL) -> Coeffs2 -> String -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ReadyForConstructionPL -> Double
- Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicity0Fi :: ([[[PRS]]] -> [[Double]]) -> Double -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> Double
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicity0Fi :: MappingFunctionPL -> Double -> String -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ReadyForConstructionPL -> Double
- Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicity0i :: ([[[PRS]]] -> [[Double]]) -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> Double
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicity0i :: MappingFunctionPL -> String -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ReadyForConstructionPL -> Double
- Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicityG :: ([[[PRS]]] -> [[Double]]) -> ([[Double]] -> Double) -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> Double
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicityG :: MappingFunctionPL -> ([[Double]] -> Double) -> String -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ReadyForConstructionPL -> Double
- Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicityKFi :: ([[[PRS]]] -> [[Double]]) -> Double -> Double -> Double -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> Double
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicityKFi :: MappingFunctionPL -> Double -> Double -> Double -> String -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ReadyForConstructionPL -> Double
- Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicityKi :: ([[[PRS]]] -> [[Double]]) -> Double -> Double -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> String -> Double
+ Phonetic.Languages.Array.General.PropertiesSyllablesG2: rhythmicityKi :: MappingFunctionPL -> Double -> Double -> String -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ReadyForConstructionPL -> Double

Files

ChangeLog.md view
@@ -99,3 +99,10 @@ ## 0.10.1.0 -- 2022-05-31  * Tenth version revised A. Removed the unneeded dependency of phonetic-languages-simplified-base.++## 0.11.0.0 -- 2022-08-09++* Eleventh version. Added the new module Phonetic.Languages.EmphasisG. Switched to the +new model of computations with the possibly two modes instead of just one -- PhoPaaW and +SaaW. Some code improvements.+
Phonetic/Languages/Array/General/PropertiesFuncRepG2.hs view
@@ -50,6 +50,7 @@ import Data.Phonetic.Languages.Syllables hiding (D) import Data.Maybe (fromMaybe,mapMaybe) import Data.Monoid (mappend)+import Phonetic.Languages.EmphasisG  #ifdef __GLASGOW_HASKELL__ #if __GLASGOW_HASKELL__==708@@ -63,8 +64,11 @@   -> String -- ^ Actually is the \' \':us ++ vs in the following functions where in the definition is us and vs 'String's. See the   -- source code of the module.   -> (Int16 -> c)-  -> FuncRep2 String Int16 c-procDiverse2I wrs zs g = D (diverse2GL zs . concatMap string1 . stringToXG wrs) g+  -> FuncRep2 ReadyForConstructionPL Int16 c+procDiverse2I wrs zs g = +  D (\x -> case x of+             StrG xs -> diverse2GL zs . concatMap string1 . stringToXG wrs $ xs+             FSLG tsss -> 1) g {-# INLINE procDiverse2I #-}  procDiverse2F@@ -72,8 +76,11 @@   -> String -- ^ Actually is the \' \':us ++ vs in the following functions where in the definition is us and vs 'String's. See the   -- source code of the module.   -> (Double -> c)-  -> FuncRep2 String Double c-procDiverse2F wrs zs g = D (int2Double . fromEnum . diverse2GL zs . concatMap string1 . stringToXG wrs) g+  -> FuncRep2 ReadyForConstructionPL Double c+procDiverse2F wrs zs g = +  D (\x ->case x of+           StrG xs -> int2Double . fromEnum . diverse2GL zs . concatMap string1 . stringToXG wrs $ xs+           FSLG _ -> 1.0) g {-# INLINE procDiverse2F #-}  --------------------------------------------------------------------------------------------@@ -99,12 +106,16 @@   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.   -> ([Double] -> Double)   -> (Double -> c)-  -> ([[[PRS]]] -> [[Double]])+  -> MappingFunctionPL   -> Coeffs2-  -> FuncRep2 String Double c-procB2FG wrs ks arr gs us vs h1 h g coeffs = let zs = ' ':us `mappend` vs in D (\xs -> let ys = concatMap string1 . stringToXG wrs . map (\x -> if x == '-' then ' ' else x) $ xs in-  ((int2Double . fromEnum . diverse2GL zs $ ys)*(h1 . mconcat . g . map (divSylls . reSyllableCntnts ks gs . groupSnds .-    str2PRSs arr) . words1 . mapMaybe (f us vs) $ ys))) h+  -> FuncRep2 ReadyForConstructionPL Double c+procB2FG wrs ks arr gs us vs h1 h g coeffs =  +  D (\t -> case t of+             StrG xs -> let ys = concatMap string1 . stringToXG wrs $ xs in+                                ((int2Double . fromEnum . diverse2GL zs $ ys)*(h1 . mconcat . (fromMaybe (const [[-5.0]])  (fromPhoPaaW g)) . map (divSylls . reSyllableCntnts ks gs . +                                 groupSnds . str2PRSs arr) . words1 . mapMaybe (f us vs) $ ys))+             FSLG tsss -> h1 . mconcat . (fromMaybe (const [[-6.0]]) (fromSaaW g)) $ tsss) h+                  where  zs = ' ':us `mappend` vs {-# INLINE procB2FG #-}  procB2F@@ -115,9 +126,9 @@   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.   -> (Double -> c)-  -> ([[[PRS]]] -> [[Double]])+  -> MappingFunctionPL   -> Coeffs2-  -> FuncRep2 String Double c+  -> FuncRep2 ReadyForConstructionPL Double c procB2F wrs ks arr gs us vs h g coeffs = procB2FG wrs ks arr gs us vs (eval23Coeffs coeffs) h g coeffs {-# INLINE procB2F #-} @@ -130,9 +141,9 @@   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.   -> Double    -> (Double -> c)-  -> ([[[PRS]]] -> [[Double]])+  -> MappingFunctionPL   -> Coeffs2-  -> FuncRep2 String Double c+  -> FuncRep2 ReadyForConstructionPL Double c procB2FF wrs ks arr gs us vs k h g coeffs = procB2FG wrs ks arr gs us vs (eval23CoeffsF k coeffs) h g coeffs {-# INLINE procB2FF #-} @@ -145,15 +156,19 @@   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.   -> ([Double] -> Double)   -> (Double -> c)-  -> ([[[PRS]]] -> [[Double]])+  -> MappingFunctionPL   -> Coeffs2-  -> FuncRep2 String Double c-procB2InvFG wrs ks arr gs us vs h1 h g coeffs = let zs = ' ':us `mappend` vs in D (\xs ->-  let !ys = concatMap string1 . stringToXG wrs . map (\x -> if x == '-' then ' ' else x) $ xs-      !z = diverse2GL zs ys in if z == 0 then  (h1 . mconcat . g . map (divSylls . reSyllableCntnts ks gs . groupSnds .-         str2PRSs arr) . words1 . mapMaybe (f us vs) $ ys) ** 2.0-        else  ((h1 . mconcat . g . map (divSylls . reSyllableCntnts ks gs . groupSnds . str2PRSs arr) . words1 .-          mapMaybe (f us vs) $ ys) / (int2Double . fromEnum $ z))) h+  -> FuncRep2 ReadyForConstructionPL Double c+procB2InvFG wrs ks arr gs us vs h1 h g coeffs = +  D (\t -> case t of+             StrG xs ->+               let !ys = concatMap string1 . stringToXG wrs $ xs+                   !z = diverse2GL zs ys in if z == 0 then  (h1 . mconcat . (fromMaybe (const [[-5.0]]) (fromPhoPaaW g)) . map (divSylls . reSyllableCntnts ks gs . groupSnds .+                         str2PRSs arr) . words1 . mapMaybe (f us vs) $ ys) ** 2.0+                           else  ((h1 . mconcat . (fromMaybe (const [[-5.0]]) (fromPhoPaaW g)) . map (divSylls . reSyllableCntnts ks gs . groupSnds . str2PRSs arr) . words1 .+                              mapMaybe (f us vs) $ ys) / (int2Double . fromEnum $ z))+             FSLG tsss -> h1 . mconcat . (fromMaybe (const [[-6.0]]) (fromSaaW g)) $ tsss) h+                   where  zs = ' ':us `mappend` vs {-# INLINE procB2InvFG #-}  procB2InvF@@ -164,9 +179,9 @@   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.   -> (Double -> c)-  -> ([[[PRS]]] -> [[Double]])+  -> MappingFunctionPL   -> Coeffs2-  -> FuncRep2 String Double c+  -> FuncRep2 ReadyForConstructionPL Double c procB2InvF wrs ks arr gs us vs h g coeffs = procB2InvFG wrs ks arr gs us vs (eval23Coeffs coeffs) h g coeffs {-# INLINE procB2InvF #-} @@ -179,9 +194,9 @@   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.   -> Double   -> (Double -> c)-  -> ([[[PRS]]] -> [[Double]])+  -> MappingFunctionPL   -> Coeffs2-  -> FuncRep2 String Double c+  -> FuncRep2 ReadyForConstructionPL Double c procB2InvFF wrs ks arr gs us vs k h g coeffs = procB2InvFG wrs ks arr gs us vs (eval23CoeffsF k coeffs) h g coeffs {-# INLINE procB2InvFF #-} @@ -190,16 +205,16 @@ procRhythm23F   :: (Ord c) => (Double -> c)   -> String-  -> (String -> Coeffs2 -> String -> Double)+  -> (String -> Coeffs2 -> ReadyForConstructionPL -> Double)   -> Coeffs2-  -> FuncRep2 String Double c+  -> FuncRep2 ReadyForConstructionPL Double c procRhythm23F h choice g coeffs = D (g choice coeffs) h {-# INLINE procRhythm23F #-}  procRhythmicity23F   :: (Ord c) => Double   -> (Double -> c)-  -> (Double -> String -> ([[[PRS]]] -> [[Double]]))+  -> (Double -> String -> MappingFunctionPL)   -> String   -> Coeffs2   -> GWritingSystemPRPLX@@ -208,8 +223,9 @@   -> SegmentRulesG   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.-  -> FuncRep2 String Double c-procRhythmicity23F k g h choice coeffs wrs ks arr hs us vs = D (rhythmicity k choice h coeffs wrs ks arr hs us vs) g+  -> String -- ^ The starting 'String' which defines the line to be constructed+  -> FuncRep2 ReadyForConstructionPL Double c+procRhythmicity23F k g h choice coeffs wrs ks arr hs us vs bbs = D (rhythmicity k choice h coeffs bbs wrs ks arr hs us vs) g {-# INLINE procRhythmicity23F #-}  -------------------------------------------------------------@@ -224,3 +240,5 @@   where ts = dropWhile (== ' ') xs         (w, s'') = break (== ' ') ts {-# NOINLINE words1 #-}++
Phonetic/Languages/Array/General/PropertiesSyllablesG2.hs view
@@ -27,6 +27,12 @@   , fstCF   , sndCF   , readCF+  -- * Mapping function data type+  , MappingFunctionPL(..)+  , isPhoPaaW+  , isSaaW+  , fromPhoPaaW+  , fromSaaW   -- * Rhythmicity properties (semi-empirical)   -- ** Simple one   , rhythmicity0i@@ -52,8 +58,10 @@ import Rhythmicity.PolyRhythm import Data.Phonetic.Languages.Base import Data.Phonetic.Languages.Syllables-import Data.Maybe (isNothing,fromMaybe)+import Data.Maybe (isNothing,fromMaybe,fromJust) import Text.Read (readMaybe)+import Phonetic.Languages.EmphasisG+import GHC.Int (Int8)  #ifdef __GLASGOW_HASKELL__ #if __GLASGOW_HASKELL__==708@@ -103,10 +111,31 @@ eval23KF k k2 k3 = evalRhythmicity23KF k k2 k3 . mconcat {-# INLINE eval23KF #-} +--------------------------------------------------------------------------------------------++data MappingFunctionPL = PhoPaaW ([[[PRS]]] -> [[Double]]) | SaaW ([[[Int8]]] -> [[Double]])++isPhoPaaW :: MappingFunctionPL -> Bool+isPhoPaaW (PhoPaaW _) = True+isPhoPaaW _ = False++isSaaW :: MappingFunctionPL -> Bool+isSaaW (SaaW _) = True+isSaaW _ = False++fromPhoPaaW :: MappingFunctionPL -> Maybe ([[[PRS]]] -> [[Double]])+fromPhoPaaW (PhoPaaW f) = Just f+fromPhoPaaW _ = Nothing++fromSaaW :: MappingFunctionPL -> Maybe ([[[Int8]]] -> [[Double]])+fromSaaW (SaaW f) = Just f+fromSaaW _ = Nothing+ rhythmicityG-  :: ([[[PRS]]] -> [[Double]])-- ^ A function that specifies the syllables durations, analogue of the+  :: MappingFunctionPL-- ^ A function that specifies the syllables durations, analogue of the   -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.   -> ([[Double]] -> Double) -- ^ Usually some kind of flattening of the double list into a single value.+  -> String -- ^ The starting 'String' which creates the order for the 'FSLG' representation   -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.   -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon   -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.@@ -114,18 +143,24 @@   -> SegmentRulesG   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.-  -> String+  -> ReadyForConstructionPL   -> Double-rhythmicityG f g wrs ks arr hs us vs xs- | null xs = 0.0- | otherwise = g . f . createSyllablesPL wrs ks arr hs us vs $ xs+rhythmicityG f g bbs wrs ks arr hs us vs xs@(FSLG tsss)+ | null tsss = -1.0+ | isSaaW f = g . (fromJust (fromSaaW f)) $ tsss+ | otherwise = -3.0+rhythmicityG f g bbs wrs ks arr hs us vs xs@(StrG ys)+ | null ys = -2.0+ | isPhoPaaW f = g . (fromJust (fromPhoPaaW f)) . createSyllablesPL wrs ks arr hs us vs $ ys+ | otherwise = g . (fromJust (fromSaaW f)) . convFI wrs ks arr hs us vs bbs $ ys {-# INLINE rhythmicityG #-}  -------------------------------------------------------  rhythmicity0i-  :: ([[[PRS]]] -> [[Double]]) -- ^ A function that specifies the syllables durations, analogue of the+  :: MappingFunctionPL -- ^ A function that specifies the syllables durations, analogue of the   -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.+  -> String    -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.   -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon   -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.@@ -133,18 +168,19 @@   -> SegmentRulesG   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.-  -> String+  -> ReadyForConstructionPL   -> Double-rhythmicity0i f = rhythmicityG f eval23+rhythmicity0i f = rhythmicityG f eval23  {-# INLINE rhythmicity0i #-}  -------------------------------------------------------  rhythmicityKi-  :: ([[[PRS]]] -> [[Double]]) -- ^ A function that specifies the syllables durations, analogue of the+  :: MappingFunctionPL -- ^ A function that specifies the syllables durations, analogue of the   -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.   -> Double   -> Double+  -> String   -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.   -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon   -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.@@ -152,7 +188,7 @@   -> SegmentRulesG   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.-  -> String+  -> ReadyForConstructionPL   -> Double rhythmicityKi f k2 k3 = rhythmicityG f (eval23K k2 k3) {-# INLINE rhythmicityKi #-}@@ -160,9 +196,10 @@ --------------------------------------------------------  rhythmicity0Fi-  :: ([[[PRS]]] -> [[Double]]) -- ^ A function that specifies the syllables durations, analogue of the+  :: MappingFunctionPL -- ^ A function that specifies the syllables durations, analogue of the   -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.   -> Double+  -> String   -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.   -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon   -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.@@ -170,7 +207,7 @@   -> SegmentRulesG   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.-  -> String+  -> ReadyForConstructionPL   -> Double rhythmicity0Fi f k = rhythmicityG f (eval23F k) {-# INLINE rhythmicity0Fi #-}@@ -178,11 +215,12 @@ --------------------------------------------------------  rhythmicityKFi-  :: ([[[PRS]]] -> [[Double]]) -- ^ A function that specifies the syllables durations, analogue of the+  :: MappingFunctionPL -- ^ A function that specifies the syllables durations, analogue of the   -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.   -> Double   -> Double   -> Double+  -> String   -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.   -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon   -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.@@ -190,7 +228,7 @@   -> SegmentRulesG   -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.   -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.-  -> String+  -> ReadyForConstructionPL   -> Double rhythmicityKFi f k k2 k3 = rhythmicityG f (eval23KF k k2 k3) {-# INLINE rhythmicityKFi #-}@@ -207,10 +245,11 @@  -- \"zz\", \"zz2\", \"zz3\", \"zz4\" or some other one (that is the default one). Since the version 0.3.0.0 you  -- can also use \"w\" or \"x\"-based lines. Specifies the applied properties  -- to get the result. The \"z\"-line uses \'F\' functions.-  -> (Double -> String -> ([[[PRS]]] -> [[Double]]))-- ^ The function that is needed in the 'procRhythmicity23F' function.+  -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function.  -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and  -- depends on two parameters.   -> Coeffs2+  -> String   -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.   -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon   -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.@@ -218,7 +257,7 @@   -> SegmentRulesG   -> String   -> String-  -> String+  -> ReadyForConstructionPL   -> Double rhythmicity k choice h CF0  | choice `elem` ["0z","02z","03z","04z"] = rhythmicity0Fi f k@@ -257,7 +296,7 @@      | otherwise -> rhythmicity0i f  | otherwise = rhythmicity0i f      where f = h k choice-           w0F ch rh = rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat)+           w0F ch rh = rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat)             x0F ch rh = rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 ch rh . mconcat)            {-# INLINE w0F #-}            {-# INLINE x0F #-}@@ -272,7 +311,7 @@  | take 1 choice == "x" = if    | choice `elem` ["x01","x02","x03","x04"] -> x0F (Ch 1 1 4) (Rhythm 1 1 2)    | choice `elem` ["x11","x12","x13","x14"] -> x0F (Ch 1 0 4) (Rhythm 2 1 1)-   | choice `elem` ["x21","x22","x23","x24"] -> x0F (Ch 0 1 4) (Rhythm 1 2 1)+   | choice `elem` ["x21","x22","x23","x24"] -> x0F (Ch 0 1 4) (Rhythm 1 2 1)     | choice `elem` ["x31","x32","x33","x34"] -> x0F (Ch 0 0 4) (Rhythm 1 1 2)    | otherwise -> x0F (Ch 1 0 4) (Rhythm 1 1 2)  | take 1 choice == "c" || (take 1 choice >= "A" && take 1 choice <= "Z" && take 1 choice `notElem` ["G","H"]) = rhythmicity k choice h CF0@@ -315,3 +354,5 @@    | xs == "b" || xs == "e" = rhythmicityPolyWeightedLEF3    | xs == "d" || xs == "f" = rhythmicityPolyWeightedLEF30    | otherwise = rhythmicityPoly++
+ Phonetic/Languages/EmphasisG.hs view
@@ -0,0 +1,231 @@+{-# LANGUAGE BangPatterns #-}++++module Phonetic.Languages.EmphasisG where++import Data.Phonetic.Languages.Base+import Data.Phonetic.Languages.Syllables+import GHC.Int+import Data.Maybe (fromMaybe)+import Text.Read (readMaybe)+import Data.Char (toUpper)+import GHC.Arr+import Data.List (scanl',intersperse)+import CaseBi.Arr+import Data.Foldable (foldl')+import CaseBi.Arr (getBFst',getBFstLSorted')+import Data.Lists.FLines (newLineEnding)+import Data.Traversable (traverse)+import Control.Applicative+import System.IO++data SyllWeightsG = SyG {+  point :: ![PRS]+  , order :: !Int8 -- Is intended to begin at -128 up to 127 (maximum 256 entries).+  , weight :: !Double+}++showFSG :: FlowSoundG -> String+showFSG = map charS+{-# INLINE showFSG #-}++type FlowSoundG = [PRS]++instance Show SyllWeightsG where+  show (SyG ps i w) = showFSG ps `mappend` (' ':show i) `mappend` (' ':show w) `mappend` newLineEnding++weightSyllablesIO :: [FlowSoundG] -> IO [SyllWeightsG]+weightSyllablesIO = traverse (\(i,xs) -> (\d1 -> (SyG xs i d1)) <$> weightSyllAIO False xs)  . zip ([-128..127]::[Int8])++weightStringIO +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> String +  -> IO ([[FlowSoundG]],[SyllWeightsG],[[[Int8]]])+weightStringIO wrs ks arr hs us vs xs = weightSyllablesIO fss >>= \zs -> pure (tsss, zs, helper1F . scanl' (+) (-128::Int8) . map (fromIntegral . length) $ tsss)+  where tsss = createSyllablesPL wrs ks arr hs us vs xs+        fss = [ ts | tss <- tsss , ts <- tss ]++weightStringNIO +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> Int +  ->  String +  -> IO ([[FlowSoundG]],[[SyllWeightsG]],[[[Int8]]])+weightStringNIO wrs ks arr hs us vs n xs = traverse (\_-> weightSyllablesIO fss) [1..n] >>= \zss -> pure (tsss, zss, helper1F . scanl' (+) (-128::Int8) . map (fromIntegral . length) $ tsss)+  where tsss = createSyllablesPL wrs ks arr hs us vs xs+        fss = [ ts | tss <- tsss , ts <- tss ]++weights2SyllableDurationsDArr :: [SyllWeightsG] -> Array Int (Int8,Double)+weights2SyllableDurationsDArr xs = listArray (0,l-1) . map (\(SyG _ i w) -> (i,w)) $ xs+  where l = length xs++weights2SyllableDurationsD :: [SyllWeightsG] -> [[[Int8]]] -> [[Double]]+weights2SyllableDurationsD xs = map (map (k (getBFst' (4.0, weights2SyllableDurationsDArr xs))))+  where k f = foldl' (\y x -> f x + y) 0+{-# INLINE weights2SyllableDurationsD #-}++helper1F :: [Int8] -> [[[Int8]]]+helper1F (x:y:ys) = map (:[]) [x..y-1]:helper1F (y:ys)+helper1F _ = []++weightSyllAIO :: Bool -> FlowSoundG -> IO Double+weightSyllAIO upper xs+  | null xs = pure 4.0+  | otherwise = +    (\d -> fromMaybe 4.0 (readMaybe d::Maybe Double)) <$> (hPutStr stderr ("?  " `mappend` ((if upper then map toUpper else id) . showFSG $ xs) `mappend` "   ") *> getLine) -- Well, definitely it should not be 'stderr' here, but 'stdout' gives some strange behaviour, probably related to optimizations or some strange 'Handle' behaviour. (?)+++data ReadyForConstructionPL = StrG String | FSLG [[[Int8]]] deriving (Eq,Ord)++showR :: ReadyForConstructionPL -> String+showR (StrG xs) = xs+showR (FSLG tsss) = show tsss++isStr :: ReadyForConstructionPL -> Bool+isStr (StrG _) = True+isStr _ = False++isFSL :: ReadyForConstructionPL -> Bool+isFSL (FSLG _) = True+isFSL _ = False++fromReadyFCPLS :: ReadyForConstructionPL -> Maybe String+fromReadyFCPLS (StrG xs) = Just xs+fromReadyFCPLS _ = Nothing++fromReadyFCPLF :: ReadyForConstructionPL -> Maybe [[[Int8]]]+fromReadyFCPLF (FSLG xsss) = Just xsss+fromReadyFCPLF _ = Nothing++helper2F :: [b] -> [a] -> [c] -> [[d]] -> [([b],[a],[c])]+helper2F vs xs ys tss = let (us,ks,rs) = unzip3 . zip3 vs xs $ ys in+  helper2F' us ks rs tss+    where helper2F' us@(_:_) ks@(_:_) rs@(_:_) tss@(ts:wss) =+            let l = length ts+                (wws,vvs) = splitAt l us+                (qs,ps) = splitAt l ks+                (ns,ms) = splitAt l rs+                in (wws,qs,ns):helper2F' vvs ps ms wss+          helper2F' _ _ _ _ = []+ +convF1 +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> String +  -> [[FlowSoundG]]+convF1 wrs ks arr hs us vs xs+ | null xs = []+ | otherwise = [ tss | tss <- createSyllablesPL wrs ks arr hs us vs xs ]++convF3 +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> String +  -> [([String],[[Int8]],[FlowSoundG])]+convF3 wrs ks arr hs us vs xs+ | null xs = [([],[],[])]+ | otherwise = helper2F (concatMap (map showFSG) tsss) (map (:[]) ([-128..127]::[Int8])) [ ts | tss <- qss, ts <- tss ] qss+    where tsss = createSyllablesPL wrs ks arr hs us vs xs+          qss = [ tss | tss <- tsss ]++convF3W +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> String +  -> [(String,[[Int8]])]+convF3W wrs ks arr hs us vs xs+ | null xs = [([],[])]+ | otherwise = zipWith (\(_,ys,_) ts -> (ts,ys)) (convF3 wrs ks arr hs us vs xs) . words $ xs++convFI +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> String +  -> String +  -> [[[Int8]]]+convFI wrs ks arr hs us vs ts = map f . words+  where !f = getBFstL' [] (convF3W wrs ks arr hs us vs ts)++convFSL +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> String +  -> ReadyForConstructionPL +  -> String+convFSL wrs ps arr hs us vs ts r@(StrG xs) = concat . concat . intersperse [" "] . map (\(ks,_,_)-> ks) . convF3 wrs ps arr hs us vs $ xs+   where js =  unzip . map (\(rs,ps,_) -> (ps,rs)) . convF3 wrs ps arr hs us vs $ ts+convFSL wrs ps arr hs us vs ts r@(FSLG tsss) =  concat . concat . intersperse [" "] . map (map (getBFstLSorted' " " ks) ) $ tsss+   where js = unzip . map (\(rs,ps,_) -> (ps,rs)) . convF3 wrs ps arr hs us vs $ ts+         ks = zip (concat . fst $ js) (concat . snd $ js)++weightsString3IO +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> Bool +  -> String +  -> IO ([[FlowSoundG]],[[[[Int8]]] -> [[Double]]],ReadyForConstructionPL)+weightsString3IO wrs ps arr hs us vs bool bs + | bool = do+   (syllDs1,sylws,fsls0) <- weightStringIO wrs ps arr hs us vs bs+   let syllableDurationsD2s = [weights2SyllableDurationsD sylws]+   return (syllDs1,syllableDurationsD2s,FSLG fsls0) + | otherwise = return ([],[],FSLG [])++weightsString3NIO +  :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+  -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+      -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+  -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+  -> SegmentRulesG+  -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package.+  -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package.+  -> Int +  -> Bool +  -> String +  -> IO ([[FlowSoundG]],[[[[Int8]]] -> [[Double]]],ReadyForConstructionPL)+weightsString3NIO wrs ps arr hs us vs n bool bs + | bool = (\(syllDs1,sylws,fsls0) -> (syllDs1,map weights2SyllableDurationsD sylws,FSLG fsls0)) <$> weightStringNIO wrs ps arr hs us vs n bs+ | otherwise = pure ([],[],FSLG [])+    
phonetic-languages-simplified-generalized-properties-array.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-generalized-properties-array-version:             0.10.1.0+version:             0.11.0.0 synopsis:            Some 'properties' of the phonetic languages approach text. description:         Generalizes the functionality of the https://hackage.haskell.org/package/phonetic-languages-simplified-properties-array homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-generalized-properties-array@@ -18,9 +18,9 @@ cabal-version:       >=1.10  library-  exposed-modules:     Phonetic.Languages.Array.General.PropertiesFuncRepG2, Phonetic.Languages.Array.General.PropertiesSyllablesG2+  exposed-modules:     Phonetic.Languages.Array.General.PropertiesFuncRepG2, Phonetic.Languages.Array.General.PropertiesSyllablesG2, Phonetic.Languages.EmphasisG   -- other-modules:   other-extensions:    CPP, BangPatterns, MultiWayIf-  build-depends:       base >=4.8 && <5, phonetic-languages-basis ==0.1.0.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-phonetics-basics ==0.9.0.0+  build-depends:       base >=4.8 && <5, phonetic-languages-basis ==0.1.1.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-phonetics-basics ==0.9.0.0, lists-flines ==0.1.2.0, mmsyn2-array ==0.3.0.0   -- hs-source-dirs:   default-language:    Haskell2010