packages feed

phonetic-languages-simplified-examples-array 0.14.1.0 → 0.15.0.0

raw patch · 8 files changed

+138/−72 lines, 8 filesdep ~phonetic-languages-simplified-basedep ~phonetic-languages-simplified-properties-arraydep ~ukrainian-phonetics-basic-arrayPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: phonetic-languages-simplified-base, phonetic-languages-simplified-properties-array, ukrainian-phonetics-basic-array

API changes (from Hackage documentation)

- Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: readUZPP2ToDouble :: String -> (Double, [(UZPP2, Double)])
- Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: uzpp2s :: [UZPP2]
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: readSound8ToDouble :: String -> (Double, [(Sound8, Double)])
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: sound8s :: FlowSound
- Phonetic.Languages.GetTextualInfo: getData3 :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
+ Phonetic.Languages.GetTextualInfo: getData3 :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
- Phonetic.Languages.GetTextualInfo: process1Line :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()
+ Phonetic.Languages.GetTextualInfo: process1Line :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()
- Phonetic.Languages.Lines: circle2 :: [[[[UZPP2]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]
+ Phonetic.Languages.Lines: circle2 :: [[[[Sound8]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]
- Phonetic.Languages.Lines: circle2I :: [[[[UZPP2]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> Int -> [Int] -> Double -> Double -> [String] -> [String]
+ Phonetic.Languages.Lines: circle2I :: [[[[Sound8]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> Int -> [Int] -> Double -> Double -> [String] -> [String]
- Phonetic.Languages.Simple: finalProc :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
+ Phonetic.Languages.Simple: finalProc :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
- Phonetic.Languages.Simple: generalProc2 :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO String
+ Phonetic.Languages.Simple: generalProc2 :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO String
- Phonetic.Languages.Simple: generalProc2G :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Bool -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
+ Phonetic.Languages.Simple: generalProc2G :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Bool -> Bool -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
- Phonetic.Languages.Simple: generalProcMMs :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [([Int], Int, Int, String)] -> [Array Int Int] -> [String] -> [String] -> Bool -> IO String
+ Phonetic.Languages.Simple: generalProcMMs :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [([Int], Int, Int, String)] -> [Array Int Int] -> [String] -> [String] -> Bool -> IO String
- Phonetic.Languages.Simple: generalProcMs :: [[[[UZPP2]]] -> [[Double]]] -> Coeffs2 -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int], Int, Int, String) -> IO [Result [] Char Double Double]
+ Phonetic.Languages.Simple: generalProcMs :: [[[[Sound8]]] -> [[Double]]] -> Coeffs2 -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int], Int, Int, String) -> IO [Result [] Char Double Double]
- Phonetic.Languages.Simple: interactivePrintResultRecursive :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
+ Phonetic.Languages.Simple: interactivePrintResultRecursive :: [[[[Sound8]]] -> [[Double]]] -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
- Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2: chooseMax :: Ord c => [[[[UZPP2]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
+ Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2: chooseMax :: Ord c => [[[[Sound8]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
- Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: readSyllableDurations :: FilePath -> IO [[[[UZPP2]]] -> [[Double]]]
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: readSyllableDurations :: FilePath -> IO [[[[Sound8]]] -> [[Double]]]

Files

CHANGELOG.md view
@@ -172,4 +172,8 @@  ## 0.14.1.0 -- 2021-11-01 -* The fourteenth version revised A. Fixed issues with doubling the input command line arguments to some extent. +* The fourteenth version revised A. Fixed issues with doubling the input command line arguments to some extent.++## 0.15.0.0 -- 2021-11-05++* The fifteenth version. Switched to the GHC.Int.Int8 representation. Some documentation improvements.
Phonetic/Languages/GetTextualInfo.hs view
@@ -29,24 +29,21 @@ import Data.List (sort) import Text.Read (readMaybe) import GHC.Arr-import Melodics.ByteString.Ukrainian.Arr import Phonetic.Languages.Ukrainian.PrepareText import Numeric (showFFloat) import Phonetic.Languages.Filters-import Data.Char (isAlpha) import Data.Statistics.RulesIntervalsPlus import Data.MinMax.Preconditions-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2+import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common+import Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2 import Phonetic.Languages.Simplified.StrictVG.Base import Phonetic.Languages.Permutations.Arr import Phonetic.Languages.Permutations.ArrMini import Phonetic.Languages.Simplified.DataG.Base-import Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2 import Languages.UniquenessPeriods.Array.Constraints.Encoded import Phonetic.Languages.Simplified.SimpleConstraints import Phonetic.Languages.Common-import qualified Languages.Phonetic.Ukrainian.Syllable.Arr as S (UZPP2)-import Phonetic.Languages.Ukrainian.PrepareText (prepareGrowTextMN, prepareTuneTextMN,isSpC,isUkrainianL)+import Melodics.Ukrainian.ArrInt8 (Sound8) import Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties  {-| @ since 0.5.0.0 -- The meaning of the first command line argument (and 'Coeffs2' here everywhere in the module)@@ -99,7 +96,7 @@ linesFromArgsG xss yss = let n = length yss in concatMap (\ts -> linesFromArgs1 n ts yss) xss  getData3- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool -- ^ Whether to use just pairwise permutations (if 'True') or the whole possible set of them (otherwise). The first corresponds to the quick evaluation mode.  -> Bool  -> Coeffs2@@ -113,7 +110,7 @@ getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX gz printLine choice multiples3 zss = let !permsV4 = if pairwisePermutations then genPairwisePermutationsArrLN 10 else genPermutationsArrL in putStrLn (replicate (length multiples3 + 1) '\t' `mappend` show gz) >> mapM_ (process1Line syllableDurationsDs lstW coeffs coeffsWX gz printLine choice multiples3 permsV4) zss  process1Line- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool  -> Coeffs2  -> Coeffs2
Phonetic/Languages/Lines.hs view
@@ -16,12 +16,11 @@ module Phonetic.Languages.Lines where  import Phonetic.Languages.Simplified.DeEnCoding (newLineEnding)-import System.IO-import Data.SubG import Data.MinMax.Preconditions import GHC.Arr-import Data.List (sort,nub,zip,zip3,zip4,zip5,zip6,zip7)-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2+import Data.List (sort,nub)+import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common+import Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2 import Phonetic.Languages.Simplified.StrictVG.Base import Phonetic.Languages.Permutations.Arr import Phonetic.Languages.Permutations.ArrMini@@ -29,13 +28,10 @@ import Text.Read (readMaybe) import Data.Maybe (fromMaybe) import Phonetic.Languages.Simplified.DataG.Base-import Data.Char (isDigit)-import Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2-import Data.Monoid (mappend) import Phonetic.Languages.Common import Interpreter.StringConversion-import qualified Languages.Phonetic.Ukrainian.Syllable.Arr as S (UZPP2)-import Phonetic.Languages.Ukrainian.PrepareText (prepareGrowTextMN, prepareTuneTextMN,isSpC,isUkrainianL)+import Melodics.Ukrainian.ArrInt8 (Sound8)+import Phonetic.Languages.Ukrainian.PrepareText (prepareGrowTextMN) import Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties  {-| @ since 0.5.0.0 -- The meaning of the first command line argument (and 'Coeffs2' here everywhere in the module)@@ -82,7 +78,7 @@     if compare l2 0 /= LT then do       let !perms2 = unsafeAt permsV $ l2           minMaxTuples = let !frep20Zip = zip choices . map (chooseMax syllableDurationsDs id coeffs) $ choices in-            map (\(choice,frep20) -> minMax11C . map (toPropertiesF' frep20) .+            map (\(_,frep20) -> minMax11C . map (toPropertiesF' frep20) .               uniquenessVariants2GNPBL [] (concat . take 1 $ lasts) ' ' id id id perms2 . init $ us) frep20Zip       mapM_ (\(choice, (minE,maxE)) -> toFileStr (choice ++ "." ++ file ++ ".new.txt")               (circle2I syllableDurationsDs coeffs permsV choice [] numberI intervalNmbrs minE maxE $@@ -99,7 +95,7 @@           putStr "Please, specify which variant to use as the result, "           putStrLn "maximum number is the quantity of the files from which the data is read: "           let strs = map (\(j,ks) -> (\ts -> if null ts then (j,"")-                      else let (k,rs) = head ts in  (j,rs)) .+                      else let (_,rs) = head ts in  (j,rs)) .                        filter ((== i) . fst) $ ks) ysss           mapM_ (\(i,xs) -> putStrLn $ show i ++ ":\t" ++ xs) strs           ch <- getLine@@ -108,7 +104,7 @@  -- | Processment without rearrangements. circle2- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Coeffs2  -> Array Int [Array Int Int]  -> String@@ -127,7 +123,7 @@  -- | Processment with rearrangements. circle2I- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Coeffs2  -> Array Int [Array Int Int]  -> String
Phonetic/Languages/Simple.hs view
@@ -20,11 +20,11 @@ import Languages.UniquenessPeriods.Array.Constraints.Encoded (decodeLConstraints,readMaybeECG) import GHC.Arr import Phonetic.Languages.Simplified.DataG.Base-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2 import Phonetic.Languages.Filters (unsafeSwapVecIWithMaxI) import Phonetic.Languages.Simplified.StrictVG.Base import Data.Char (isDigit,isAlpha,isLetter) import qualified Data.List  as L (span,sort,zip4,isPrefixOf,nub)+import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common import Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2 import Phonetic.Languages.Permutations.Arr import Phonetic.Languages.Permutations.ArrMini@@ -34,11 +34,9 @@ import Text.Read (readMaybe) import Phonetic.Languages.Simplified.DeEnCoding import Phonetic.Languages.Simplified.SimpleConstraints-import Phonetic.Languages.Common import Interpreter.StringConversion-import qualified Languages.Phonetic.Ukrainian.Syllable.Arr as S (UZPP2)-import Data.Monoid (mappend)-import Phonetic.Languages.Ukrainian.PrepareText (prepareGrowTextMN, prepareTuneTextMN,isSpC,isUkrainianL)+import Melodics.Ukrainian.ArrInt8 (Sound8)+import Phonetic.Languages.Ukrainian.PrepareText (prepareTuneTextMN,isSpC,isUkrainianL) import Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties  forMultiplePropertiesF :: [String] -> [(String,[String])]@@ -125,7 +123,7 @@  -} generalProc2G- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set.  -> Bool  -> Bool@@ -157,7 +155,7 @@ -- | -- @ since 0.3.0.0 The result is not 'IO' (), but 'IO' 'String'. The type also changed generally. generalProc2- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set.  -> Bool  -> Bool@@ -281,7 +279,7 @@      putStrLn ts >> return ts  interactivePrintResultRecursive- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set.  -> Bool  -> Bool@@ -326,7 +324,7 @@   getLine  generalProcMs- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Coeffs2  -> Coeffs2  -> [Array Int Int]@@ -353,7 +351,7 @@ -- | -- @ since 0.3.0.0 The result is not 'IO' (), but 'IO' 'String'. The type also changed generally. generalProcMMs- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool  -- ^ Whether to use just pairwise permutations, or the full universal set.  -> Bool  -> Bool@@ -386,7 +384,7 @@ -- | -- @ since 0.3.0.0 The result is not 'IO' (), but 'IO' 'String'. The type also changed generally. finalProc- :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.  -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set.  -> Bool  -> Bool
Phonetic/Languages/Simplified/Array/Ukrainian/FuncRep2RelatedG2.hs view
@@ -13,14 +13,19 @@  import CaseBi.Arr (getBFstLSorted') import Phonetic.Languages.Simplified.DataG.Base-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2-import qualified Languages.Phonetic.Ukrainian.Syllable.Arr as S (UZPP2)+import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Diverse+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Rhythmicity+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG21+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG22+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG23+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG24+import Melodics.Ukrainian.ArrInt8 (Sound8)  -- | Allows to choose the variant of the computations in case of usual processment. -- Since the 0.13.0.0 version there is a possibility to provide the list of durations specifications functions as the first -- argument.-chooseMax :: (Ord c) => [[[[S.UZPP2]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c+chooseMax :: (Ord c) => [[[[Sound8]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c chooseMax syllableDurationsDs g coeffs choice  | take 1 choice == "H" = procRhythmicity23FH 1.3 g syllableDurationsDs choice coeffs  | take 1 choice `elem` ["c","M","N"] || (take 1 choice >= "A" && take 1 choice <= "F") = procRhythmicity23F 1.3 g choice coeffs
Phonetic/Languages/Simplified/Array/Ukrainian/ReadProperties.hs view
@@ -12,39 +12,105 @@ module Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties where  import CaseBi.Arr (getBFstLSorted')-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2-import Languages.Phonetic.Ukrainian.Syllable.Double.Arr+import Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 import Text.Read (readMaybe) import Data.Maybe import Interpreter.StringConversion-import Languages.Phonetic.Ukrainian.Syllable.Arr (UZPP(..),UZPP2,PhoneticType(..))+import Melodics.Ukrainian.ArrInt8 -uzpp2s :: [UZPP2]-uzpp2s = [UZ 'A' D, UZ 'A' K, UZ 'B' D, UZ 'B' K, UZ 'C' S, UZ 'D' N, UZ 'E' L, UZ 'E' M, UZ 'F' L,-   UZ 'F' M, UZ 'a' W, UZ 'b' D, UZ 'b' K, UZ 'c' D, UZ 'd' D, UZ 'd' K, UZ 'e' W, UZ 'f' L,-   UZ 'f' M, UZ 'g' D, UZ 'g' K, UZ 'h' D, UZ 'h' K, UZ 'i' W, UZ 'j' D, UZ 'j' K, UZ 'k' L,-   UZ 'k' M, UZ 'l' S, UZ 'l' O, UZ 'm' S, UZ 'm' O, UZ 'n' S, UZ 'n' O, UZ 'o' W, UZ 'p' L,-   UZ 'p' M, UZ 'q' E, UZ 'r' S, UZ 'r' O, UZ 's' L, UZ 't' L, UZ 't' M, UZ 'u' W, UZ 'v' S,-   UZ 'v' O, UZ 'w' N, UZ 'x' L, UZ 'x' M, UZ 'y' W, UZ 'z' D, UZ 'z' K] +{-| [(-1,\"-\"),(1,\"\1072\"),(2,\"\1077\"),(3,\"\1086\"),(4,\"\1091\"),(5,\"\1080\"),(6,\"\1110\"),+(7,\"\1100\"),(8,\"\1076\1079\"),(10,\"\1078\"),(15,\"\1073\"),(17,\"\1076\"),(19,\"\1169\"),(21,\"\1075\"),+(23,\"\1076\1078\"),(25,\"\1079\"),(27,\"\1081\"),(28,\"\1083\"),(30,\"\1084\"),(32,\"\1085\"),(34,\"\1088\"),+(36,\"\1074\"),(38,\"\1094\"),(39,\"\1095\"),(41,\"\1096\"),(43,\"\1092\"),(45,\"\1082\"),(47,\"\1087\"),+(49,\"\1089\"),(50,\"\1090\"),(52,\"\1093\"),(54,\"\1089\1100\"),(66,\"\1094\1100\")]+@+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+@+-}+sound8s :: FlowSound+sound8s = [-1,1,2,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,+   43,44,45,46,47,48,49,50,51,52,53,54,66]+++ {-|-\"[UZ \'A\' D, UZ \'A\' K, UZ \'B\' D, UZ \'B\' K, UZ \'C\' S, UZ \'D\' N, UZ \'E\' L, UZ \'E\' M, UZ \'F\' L,-   UZ \'F\' M, UZ \'a\' W, UZ \'b\' D, UZ \'b\' K, UZ \'c\' D, UZ \'d\' D, UZ \'d\' K, UZ \'e\' W, UZ \'f\' L,-   UZ \'f\' M, UZ \'g\' D, UZ \'g\' K, UZ \'h\' D, UZ \'h\' K, UZ \'i\' W, UZ \'j\' D, UZ \'j\' K, UZ \'k\' L,-   UZ \'k\' M, UZ \'l\' S, UZ \'l\' O, UZ \'m\' S, UZ \'m\' O, UZ \'n\' S, UZ \'n\' O, UZ \'o\' W, UZ \'p\' L,-   UZ \'p\' M, UZ \'q\' E, UZ \'r\' S, UZ \'r\' O, UZ \'s\' L, UZ \'t\' L, UZ \'t\' M, UZ \'u\' W, UZ \'v\' S,-   UZ \'v\' O, UZ \'w\' N, UZ \'x\' L, UZ \'x\' M, UZ \'y\' W, UZ \'z\' D, UZ \'z\' K]\"+ The first number is the default value that corresponds usually to the word gap duration (and here is not important).-The next 52 'Double' numbers become the durations of the above specified 'UZPP2' values respectively, the order+The next 52 'Double' numbers become the durations of the above specified 'Sound8' values respectively, the order must be preserved (if you consider it important, well, it should be!). If some number in the file cannot be read as a 'Double' number the function uses the first one that can be instead (the default value). If no such is specified-at all, then the default number is 1.0 for all the 'UZPP2' sound representations that is hardly correct.+at all, then the default number is 1.0 for all the 'Sound8' sound representations that is hardly correct.  -}-readUZPP2ToDouble :: String -> (Double,[(UZPP2, Double)])-readUZPP2ToDouble xs- | null xs = (1.0,zip uzpp2s . replicate 10000 $ 1.0)+readSound8ToDouble :: String -> (Double,[(Sound8, Double)])+readSound8ToDouble xs+ | null xs = (1.0,zip sound8s . replicate 10000 $ 1.0)  | otherwise =     let wws = lines xs         dbls = map (\ks -> readMaybe ks::Maybe Double) wws@@ -53,8 +119,8 @@          | otherwise = fromJust . head . filter isJust $ dbls         dbSs = map (fromMaybe dbH) dbls         (firstD,lsts)-          | null dbls = (1.0,zip uzpp2s . replicate 10000 $ 1.0)-          | otherwise = (dbH,zip uzpp2s (dbSs `mappend` replicate 10000 1.0))+          | null dbls = (1.0,zip sound8s . replicate 10000 $ 1.0)+          | otherwise = (dbH,zip sound8s (dbSs `mappend` replicate 10000 1.0))             in (firstD,lsts)  divide2SDDs :: String -> [String]@@ -65,9 +131,9 @@            (kss,tss) = break (any (=='*')) wwss            rss = dropWhile (any (== '*')) tss -readSyllableDurations :: FilePath -> IO [[[[UZPP2]]] -> [[Double]]]+readSyllableDurations :: FilePath -> IO [[[[Sound8]]] -> [[Double]]] readSyllableDurations file = do   xs <- readFileIfAny file   let yss = take 9 . divide2SDDs $ xs-      readData = map readUZPP2ToDouble yss-  return . map (\(d,zs) -> syllableDurationsGD (getBFstLSorted' d zs)) $ readData+      readData = map readSound8ToDouble yss+  return . map (\(d,zs) -> syllableDurationsGDc (getBFstLSorted' d zs)) $ readData
README view
@@ -2,11 +2,11 @@ of the package phonetic-languages-simplified-examples-array in Ukrainian is here: -https://oleksandrzhabenko.github.io/uk/InstructionUkr.13.1.pdf+https://oleksandrzhabenko.github.io/uk/InstructionUkr.15.pdf  or here: -https://web.archive.org/web/20211023171852/https://oleksandrzhabenko.github.io/uk/InstructionUkr.13.1.pdf+https://web.archive.org/web/20211105211955/https://oleksandrzhabenko.github.io/uk/InstructionUkr.15.pdf  The instruction in English is here: @@ -14,7 +14,7 @@  or here: -http://web.archive.org/web/20211023172024/https://oleksandrzhabenko.github.io/uk/InstructionEng.13.1.pdf+https://web.archive.org/web/20211105212109/https://oleksandrzhabenko.github.io/uk/InstructionEng.15.pdf  Since the version 0.2.0.0 there exists also comparative mode for the rewritePoemG3 executable. It allows to
phonetic-languages-simplified-examples-array.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-examples-array-version:             0.14.1.0+version:             0.15.0.0 synopsis:            Helps to create Ukrainian texts with the given phonetic properties. description:         Uses more functionality of the arrays and lists. The vector-related functionality is removed and this made the executables and libraries much more lightweight. Deal the Ukrainian as one of the phonetic languages. For the brief introduction in English, please, refer to: https://functional-art.org/2020/papers/Poetry-OleksandrZhabenko.pdf. Since the version 0.3.0.0 the package has the multiple variations mode for @lineVariantsG3@ executable that allows to use modifications in the text, e. g. synonyms, paraphrases etc. homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array@@ -20,7 +20,7 @@   exposed-modules:     Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simple, Phonetic.Languages.Lines, Phonetic.Languages.GetTextualInfo, Phonetic.Languages.Parsing, Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties   -- other-modules:   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.3 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.11 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.5.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, mmsyn2-array >= 0.3 && <1, string-interpreter >=0.5.4.1 && <1+  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.4.2 && <1, phonetic-languages-simplified-base >=0.4.1 && <1, phonetic-languages-simplified-properties-array >=0.12 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.5.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, mmsyn2-array >= 0.3 && <1, string-interpreter >=0.5.4.1 && <1   -- hs-source-dirs:   default-language:    Haskell2010 @@ -28,7 +28,7 @@   main-is:             Main.hs   other-modules:       Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simple, Phonetic.Languages.Parsing, Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.3 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.11 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, phonetic-languages-plus >=0.5.1 && <1, subG >=0.4 && < 1, mmsyn2-array >= 0.3 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, string-interpreter >=0.5.4.1 && <1, mmsyn2-array >= 0.3 && <1+  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.4.2 && <1, phonetic-languages-simplified-base >=0.4.1 && <1, phonetic-languages-simplified-properties-array >=0.12 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, phonetic-languages-plus >=0.5.1 && <1, subG >=0.4 && < 1, mmsyn2-array >= 0.3 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, string-interpreter >=0.5.4.1 && <1, mmsyn2-array >= 0.3 && <1   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., Simple   default-language:    Haskell2010@@ -37,7 +37,7 @@   main-is:             Main.hs   other-modules:       Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Lines, Phonetic.Languages.Parsing, Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.3 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.11 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, phonetic-languages-plus >=0.5.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, mmsyn2-array >= 0.3 && <1, string-interpreter >=0.5.4.1 && <1+  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.4.2 && <1, phonetic-languages-simplified-base >=0.4.1 && <1, phonetic-languages-simplified-properties-array >=0.12 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, phonetic-languages-plus >=0.5.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, mmsyn2-array >= 0.3 && <1, string-interpreter >=0.5.4.1 && <1   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., Lines   default-language:    Haskell2010@@ -46,7 +46,7 @@   main-is:             Main.hs   other-modules:       Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.GetTextualInfo, Phonetic.Languages.Parsing, Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.3 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.11 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.5.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, mmsyn2-array >= 0.3 && <1, string-interpreter >=0.5.4.1 && <1+  build-depends:       base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.4.2 && <1, phonetic-languages-simplified-base >=0.4.1 && <1, phonetic-languages-simplified-properties-array >=0.12 && <1, phonetic-languages-ukrainian-array >=0.8 && <1, phonetic-languages-filters-array >=0.3 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.5.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-permutations-array >= 0.2 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-simplified-examples-common >=0.4 && <1, mmsyn2-array >= 0.3 && <1, string-interpreter >=0.5.4.1 && <1   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., GetInfo   default-language:    Haskell2010