packages feed

phonetic-languages-simplified-examples-array 0.20.1.0 → 0.21.0.0

raw patch · 10 files changed

+168/−86 lines, 10 filesdep ~phonetic-languages-basisdep ~phonetic-languages-simplified-basedep ~phonetic-languages-simplified-examples-commonPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: phonetic-languages-basis, phonetic-languages-simplified-base, phonetic-languages-simplified-examples-common, phonetic-languages-simplified-properties-array, phonetic-languages-simplified-properties-array-common, string-interpreter

API changes (from Hackage documentation)

+ Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2: parsey0Choice :: String -> FlowSound
- Phonetic.Languages.GetTextualInfo: generalProc :: FilePath -> PermutationsType -> (Int, Int) -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()
+ Phonetic.Languages.GetTextualInfo: generalProc :: FilePath -> PermutationsType -> (Int, Int) -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> Bool -> String -> IO ()
- Phonetic.Languages.GetTextualInfo: getData3 :: [[[[Sound8]]] -> [[Double]]] -> PermutationsType -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
+ Phonetic.Languages.GetTextualInfo: getData3 :: [[[[Sound8]]] -> [[Double]]] -> PermutationsType -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Bool -> [String] -> IO ()
- Phonetic.Languages.Simple: print2 :: (Show a1, Show a2, Num a3, Ord a1, Ord a2, Eq a3) => a3 -> [Result2 ReadyForConstructionUkr a1 a2] -> IO ()
+ Phonetic.Languages.Simple: print2 :: (Show a, Show a, Num p, Ord a, Ord a, Eq p) => p -> [Result2 ReadyForConstructionUkr a a] -> IO ()
- Phonetic.Languages.Simple: show2 :: (Show a1, Show a2, Num a3, Ord a1, Ord a2, Eq a3) => a3 -> [Result2 ReadyForConstructionUkr a1 a2] -> String
+ Phonetic.Languages.Simple: show2 :: (Show a, Show a, Num p, Ord a, Ord a, Eq p) => p -> [Result2 ReadyForConstructionUkr a a] -> String
- Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2: chooseMax :: Ord c => Array Int (Int8, Bool) -> Array Int (Int8, Bool) -> Array Int (Int8, Bool) -> Array Int (Int8, Bool) -> Array Int ([Int8], Bool) -> Array Int ([Int8], Int8) -> Array Int (Int8, FlowSound -> Sound8) -> Array Int (Int8, Bool) -> Array Int ([Int8], Bool) -> Array Int ([Int8], Bool) -> Array Int ([Int8], Bool) -> Array Int (Int8, [Int8]) -> Array Int (Char, Int8) -> Array Int (Int8, [Int8]) -> Array Int (Char, Bool) -> Array Int (Char, Bool) -> Array Int (Int8, Bool) -> [[[[Sound8]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> String -> String -> FuncRep2 ReadyForConstructionUkr Double c
+ Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2: chooseMax :: Ord c => Array Int (Int8, Bool) -> Array Int (Int8, Bool) -> Array Int (Int8, Bool) -> Array Int (Int8, Bool) -> Array Int ([Int8], Bool) -> Array Int ([Int8], Int8) -> Array Int (Int8, FlowSound -> Sound8) -> Array Int (Int8, Bool) -> Array Int ([Int8], Bool) -> Array Int ([Int8], Bool) -> Array Int ([Int8], Bool) -> Array Int (Int8, [Int8]) -> Array Int (Char, Int8) -> Array Int (Int8, [Int8]) -> Array Int (Char, Bool) -> Array Int (Char, Bool) -> Array Int (Int8, Bool) -> [[[[Sound8]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> FlowSound -> String -> String -> FuncRep2 ReadyForConstructionUkr Double c

Files

CHANGELOG.md view
@@ -275,4 +275,19 @@  * The twentieth version revised A. Fixed issues with the rearrangements of the intervals. Some documentation improvements. +## 0.21.0.0 -- 2022-09-13++* The twenty-first version. Added the ability to search for the sum of periods of uniqueness not for all units marked with a number less than 100 (most of which are phonemes, +but among which there is also a soft sign designation for all consonants except "сь" and "ць"), but only for certain given units, among which phoneme types (e.g., vowels or +voiced consonants) can be predetermined, as one of the properties available for all applications.++lineVariantsG3: added the ability to change the program call arguments along with text in recursive mode, as well as changed the sorting and output order of lines in the detailed+multi-property mode with call parameters "+v 2".++propertiesTextG3: added the ability to read text directly from the input, not from the file, a possibility to 'write deencoded' text options (as it was earlier intorduced for +lineVariantsG3), as well as the statistics mode by syllables.++rewritePoemG3: has increased the number of possible sources to create a combined file from 7 to 14.++Fixed bug in logical stress documentation. The reasoned assumtpion was made how Taras Shevchenko had written the poem "Садок вишневий коло хати". 
GetInfo/Main.hs view
@@ -1,6 +1,6 @@ -- | -- Module      :  Main--- Copyright   :  (c) OleksandrZhabenko 2020-2021+-- Copyright   :  (c) OleksandrZhabenko 2020-2022 -- License     :  MIT -- Stability   :  Experimental -- Maintainer  :  olexandr543@yahoo.com@@ -19,7 +19,6 @@ module Main where  -import Phonetic.Languages.Array.Ukrainian.Common import Phonetic.Languages.GetTextualInfo import Data.Maybe (fromMaybe) import Text.Read (readMaybe)@@ -32,6 +31,7 @@ import CLI.Arguments.Parsing import CLI.Arguments.Get import Phonetic.Languages.Permutations.Represent+import Phonetic.Languages.Coeffs  main :: IO () main = do@@ -49,10 +49,11 @@                                   (Just n4,Just m4) -> if (m4 `rem` 7) < (n4 `rem` 7) then (n4 `rem` 7 + 1, m4 `rem` 7 + 1) else (0,0)                                   _ -> (0,0)      !coeffsWX = readCF . concat . getB "+x" . fst . takeBsR [("+x",1)] $ args0000 -- The command line argument that starts with \"+x\".-     (!lstW0,!args00) = takeAsR [("+b",0)] . snd . takeBsR [("+g",1),("+x",1)] $ args0000-     !lstW = oneA "+b" lstW0+     (!aspecs1,!args00) = takeAsR aSpecs . snd . takeBsR [("+g",1),("+x",1)] $ args0000+     !lstW = oneA "+b" aspecs1+     !syllablesStats = oneA "+s" aspecs1      (!mls,!args0) = takeCs1R fstCharsM cSpecs1 args00-     !multiples = getC "+m" mls -- Arguments for multiple metrices mode+     !multiples = getC "+m" mls -- Arguments for multiple properties mode      !args = filter (\xs -> all (/= ':') xs && all (/= '@') xs) args0      !coeffs = readCF . concat . take 1 $ args -- The first command line argument. If not sure, just enter \"1_\".      !lInes = filter (any (== ':')) args0@@ -64,9 +65,9 @@        !printLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 3 $ args)::(Maybe Int)) -- The fourth command line argument except those ones that are  RTS arguments. Set to 1 if you would like to print the current line within the information        !toOneLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 4 $ args)::(Maybe Int)) -- The fifth command line argument except those ones that are RTS arguments. Set to 1 if you would like to convert the text into one single line before applying to it the processment (it can be more conceptually consistent in such a case)        !choice = concat . drop 5 . take 6 $ args -- The sixth command line argument that controls what properties are used.-   generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples lInes coeffs coeffsWX file gzS printLine toOneLine choice+   generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples lInes coeffs coeffsWX file gzS printLine toOneLine syllablesStats choice   else do-   contents <- readFile file+   contents <- do (if file == "+i" then getContents else readFile file)    fLinesNIO (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) contents  else do   let !file = concat . take 1 $ args@@ -75,13 +76,13 @@        !printLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 2 $ args)::(Maybe Int))        !toOneLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 3 $ args)::(Maybe Int))        !choice = concat . drop 4 . take 5 $ args-   generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples lInes coeffs coeffsWX file gzS printLine toOneLine choice+   generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples lInes coeffs coeffsWX file gzS printLine toOneLine syllablesStats choice   else do-   contents <- readFile file+   contents <- do (if file == "+i" then getContents else readFile file)    fLinesNIO (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) contents  aSpecs :: CLSpecifications-aSpecs = [("+b",0)]+aSpecs = [("+b",0),("+s",0)]  aSpcs :: [String] -> Args aSpcs = fst . takeAsR aSpecs
Lines/Main.hs view
@@ -16,7 +16,6 @@ module Main where  -import Phonetic.Languages.Array.Ukrainian.Common import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2 import Text.Read (readMaybe) import Data.Maybe (fromMaybe)@@ -29,6 +28,7 @@ import CLI.Arguments.Parsing import CLI.Arguments.Get import Phonetic.Languages.Permutations.Represent+import Phonetic.Languages.Coeffs  -- | The function allows to rewrite the Ukrainian text in the file given as the first command line argument to a new file. In between, it is rewritten -- so that every last word on the lines is preserved at its position, and the rest of the line is rearranged using the specified other command line
Phonetic/Languages/GetTextualInfo.hs view
@@ -21,7 +21,7 @@ ) where  -import Phonetic.Languages.Array.Ukrainian.Common+--import Phonetic.Languages.Array.Ukrainian.Common import Data.SubG hiding (takeWhile,dropWhile) import System.IO import Control.Concurrent@@ -33,6 +33,7 @@ import GHC.Arr import Phonetic.Languages.Ukrainian.PrepareText import Numeric (showFFloat)+import Phonetic.Languages.Parsing import Phonetic.Languages.Filters import Data.Statistics.RulesIntervalsPlus import Data.MinMax.Preconditions@@ -53,6 +54,8 @@ import Phonetic.Languages.Permutations.Represent import Languages.Ukrainian.Data import Phonetic.Languages.Emphasis+import Languages.Phonetic.Ukrainian.Syllable.ArrInt8 (createSyllablesUkrS)+import Phonetic.Languages.Coeffs  {-| @ since 0.5.0.0 -- The meaning of the first command line argument (and 'Coeffs2' here everywhere in the module) depends on the 'String' argument -- whether it starts with \'w\', \'x\' or otherwise. In the first case it represents@@ -78,21 +81,26 @@  -> String  -> Int  -> Int+ -> Bool -- ^ Whether to print just the syllables statistics line-by-line  -> String  -> IO ()-generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples2 lInes coeffs coeffsWX file gzS printLine toOneLine choice+generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples2 lInes coeffs coeffsWX file gzS printLine toOneLine syllableStats choice  | null lInes = do     syllableDurationsDs <- readSyllableDurations fileDu-    contents <- readFile file-    let !flines-          | gr1 == 0 = fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) toOneLine contents-          | otherwise = prepareGrowTextMN gr1 gr2 . unlines . fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) toOneLine $ contents-    getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 flines+    contents0 <- do (if file == "+i" then getContents else readFile file)+    let !contsWss = map words . lines $ contents0+        !newconts = unlines . map (\lineswrdss -> if variations lineswrdss then unlines . map unwords . transformToVariations $ lineswrdss else unwords lineswrdss) $ contsWss+        !flines+          | gr1 == 0 = fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) toOneLine newconts -- contents+          | otherwise = prepareGrowTextMN gr1 gr2 . unlines . fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) toOneLine $ newconts -- contents+    getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 syllableStats flines  | otherwise = do     syllableDurationsDs <- readSyllableDurations fileDu-    contents <- readFile file-    let !flines = (if gr1 == 0 then id else prepareGrowTextMN gr1 gr2 . unlines) . fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) toOneLine . unlines . linesFromArgsG lInes . fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) 0 $ contents-    getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 flines+    contents0 <- do (if file == "+i" then getContents else readFile file)+    let !contsWss = map words . lines $ contents0+        !newconts = unlines . map (\lineswrdss -> if variations lineswrdss then unlines . map unwords . transformToVariations $ lineswrdss else unwords lineswrdss) $ contsWss+        !flines = (if gr1 == 0 then id else prepareGrowTextMN gr1 gr2 . unlines) . fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) toOneLine . unlines . linesFromArgsG lInes . fLinesN (if pairwisePermutations /= Phonetic.Languages.Permutations.Represent.P 0 then 10 else 7) 0 $ newconts -- contents+    getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 syllableStats flines  linesFromArgs1 :: Int -> String -> [String] -> [String] linesFromArgs1 n xs yss =@@ -113,9 +121,13 @@  -> Int  -> String  -> [String]+ -> Bool -- ^ Whether to just print syllable statistics line-by-line  -> [String]  -> IO ()-getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX gz printLine choice0 multiples3 zss = let choice = filter (/= 'a') choice0 in let !permsV4 = case pairwisePermutations of { Phonetic.Languages.Permutations.Represent.P 2 -> genPairwisePermutationsArrLN 10; Phonetic.Languages.Permutations.Represent.P 1 -> genElementaryPermutationsArrLN1 10; ~rrr -> genPermutationsArrL } in putStrLn (replicate (length multiples3 + 1) '\t' `mappend` show gz) >> mapM_ (process1Line syllableDurationsDs lstW coeffs coeffsWX gz printLine choice multiples3 permsV4) zss+getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX gz printLine choice0 multiples3 syllableStats zss = let choice = filter (/= 'a') choice0 in let !permsV4 = case pairwisePermutations of { Phonetic.Languages.Permutations.Represent.P 2 -> genPairwisePermutationsArrLN 10; Phonetic.Languages.Permutations.Represent.P 1 -> genElementaryPermutationsArrLN1 10; ~rrr -> genPermutationsArrL } in putStrLn (replicate (length multiples3 + 1) '\t' `mappend` show gz) >> +    mapM_ (\rs -> case syllableStats of+             True -> let tsss = createSyllablesUkrS rs in putStrLn ((show . length . concat $ tsss) `mappend` "\t" `mappend` (show . map length $ tsss) `mappend` (if printLine == 1 then '\t':rs else ""))+             _ -> process1Line syllableDurationsDs lstW coeffs coeffsWX gz printLine choice multiples3 permsV4 rs) zss  process1Line  :: [[[[Sound8]]] -> [[Double]]] -- ^ Whether to use the own provided durations.@@ -134,16 +146,17 @@     myThread <- forkIO (do      let !v2 = words v          !l2 = length v2 - 2+         !sels = parsey0Choice choice      if l2 >= (if lstW then 1 else 0) then do       let !permsV5 = decodeConstraint1 (fromMaybe (E 1) . readMaybeECG (l2 + 1) . showB (l2 + 2) $ lstW) .             unsafeAt permsV50 $ l2           ((!minE,!maxE),!data2) = runEval (parTuple2 rpar rpar (minMax11C . map (toTransPropertiesF'2 (if take 1 choice == "x"             || take 1 choice == "w" || (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["w","x"]))-              then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX choice ""-              else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choice "")) .+              then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX sels choice ""+              else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs sels choice "")) .                 map Str . uniquenessVariants2GNBL ' ' id id id permsV5 $ v2, toTransPropertiesF'2 (if take 1 choice == "x"-                  || take 1 choice == "w" then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX choice ""-                    else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choice "") . Str . unwords . subG " " $ v))+                  || take 1 choice == "w" then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX sels choice ""+                    else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs sels choice "") . Str . unwords . subG " " $ v))           (!wordsN,!intervalN) = (l2 + 2, intervalNRealFrac minE maxE gz data2)           !ratio = if maxE == 0.0 then 0.0 else 2.0 * data2 / (minE + maxE)       hPutStr stdout . showFFloat (precChoice choice) minE $ "\t"@@ -165,16 +178,16 @@     if l2 >= (if lstW then 1 else 0) then do      let !permsV5 = decodeConstraint1 (fromMaybe (E 1) . readMaybeECG (l2 + 1) . showB (l2 + 2) $ lstW) .             unsafeAt permsV50 $ l2-         rs = parMap rpar (\choiceMMs -> (minMax11C .+         rs = parMap rpar (\choiceMMs -> let sels = parsey0Choice choiceMMs in (minMax11C .            map (toTransPropertiesF'2 (if take 1 choiceMMs == "x" || take 1 choiceMMs == "w" ||-            (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["w","x"]))-             then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX choiceMMs ""-             else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choiceMMs "")) .+            (take 1 choiceMMs == "H" && (drop 1 (take 2 choiceMMs) `elem` ["w","x"]))+             then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX sels choiceMMs ""+             else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs sels choiceMMs "")) .               map Str . uniquenessVariants2GNBL ' ' id id id permsV5 $ v2,                toTransPropertiesF'2 (if take 1 choiceMMs == "x" || take 1 choiceMMs == "w" ||-                (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["w","x"]))-                 then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX choiceMMs ""-                 else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choiceMMs "") . Str .+                (take 1 choiceMMs == "H" && (drop 1 (take 2 choiceMMs) `elem` ["w","x"]))+                 then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffsWX sels choiceMMs ""+                 else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs sels choiceMMs "") . Str .                   unwords . subG " " $ v,gz)) multiples4          (!wordsN,!intervalNs) = (l2 + 2, map (\((!x,!y),!z,!t) -> intervalNRealFrac x y t z) rs)            in do
Phonetic/Languages/Lines.hs view
@@ -38,7 +38,8 @@ import Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties import Phonetic.Languages.Permutations.Represent import Languages.Ukrainian.Data-import Phonetic.Languages.Array.Ukrainian.Common+--import Phonetic.Languages.Array.Ukrainian.Common+import Phonetic.Languages.Coeffs import Phonetic.Languages.Emphasis  {-| @ since 0.5.0.0 -- The meaning of the first command line argument (and 'Coeffs2' here everywhere in the module)@@ -86,7 +87,7 @@         !l2 = (subtract 3) . length $ us     if compare l2 0 /= LT then do       let !perms2 = unsafeAt permsV $ l2-          minMaxTuples = let !frep20Zip = zip choices . map (\choice -> chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choice "") $ choices in+          minMaxTuples = let !frep20Zip = zip choices . map (\choice -> chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs (parsey0Choice choice) choice "") $ choices in             map (\(_,frep20) -> minMax11C . map (toPropertiesF'2 frep20 . Str) .               uniquenessVariants2GNPBL [] (concat . take 1 $ lasts) ' ' id id id perms2 . init $ us) frep20Zip       mapM_ (\(choice, (minE,maxE)) -> toFileStr (choice ++ "." ++ file ++ ".new.txt")@@ -97,7 +98,7 @@  compareFilesToOneCommon :: [FilePath] -> FilePath -> IO () compareFilesToOneCommon files file3 = do- contentss <- mapM ((\(j,ks) -> do {readFileIfAny ks >>= \fs -> return (j, zip [1..] . lines $ fs)})) . zip [1..7] . take 7 $ files+ contentss <- mapM ((\(j,ks) -> do {readFileIfAny ks >>= \fs -> return (j, zip [1..] . lines $ fs)})) . zip [1..7] . take 14 $ files  compareF contentss file3    where compareF :: [(Int,[(Int,String)])] -> FilePath -> IO ()          compareF ysss file3 = mapM_ (\i -> do@@ -126,7 +127,8 @@       where (!zss,!tss) = splitAt 1 xss             !rs = words . concat $ zss             !l = length rs-            !frep2 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choice ""+            !sels = parsey0Choice choice+            !frep2 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs sels choice ""             !ws = if compare l 3 == LT then unwords rs else (\rrrr -> fromMaybe "" . fromReadyFCUkrS $ rrrr).  line2 . maximumElR2 . map (toResultR2 frep2 . Str) .                uniquenessVariants2GNPBL [] (last rs) ' ' id id id (unsafeAt permsG1 (l - 3)) . init $ rs @@ -151,7 +153,8 @@             !l3 = (subtract 3) . length $ w2s             !rs = words . concat $ zss             !l = length rs-            !frep2 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs (unsafeSwapVecIWithMaxI minE maxE numberI intervNbrs) coeffs choice ""+            !sels = parsey0Choice choice+            !frep2 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs (unsafeSwapVecIWithMaxI minE maxE numberI intervNbrs) coeffs sels choice ""             !ws = if compare (length rs) 3 == LT then unwords rs else (\rrrr -> fromMaybe "" . fromReadyFCUkrS $ rrrr).  line2 . maximumElR2 .                     map (toResultR2 frep2 . Str) .                       uniquenessVariants2GNPBL [] (last rs) ' ' id id id (unsafeAt permsG1 (l - 3)) . init $ rs@@ -159,7 +162,7 @@              | compare l3 0 /= LT =                let !perms3 = unsafeAt permsG1 l3                    !v4 = init w2s-                   !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs choice "" in minMax11C . map (toPropertiesF'2 frep20 . Str) .+                   !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs id coeffs sels choice "" in minMax11C . map (toPropertiesF'2 frep20 . Str) .                       uniquenessVariants2GNPBL [] (last w2s) ' ' id id id perms3 $ v4              | otherwise = (0.0,0.0) 
Phonetic/Languages/Simple.hs view
@@ -18,7 +18,7 @@ module Phonetic.Languages.Simple where  import Data.Char-import Phonetic.Languages.Array.Ukrainian.Common+--import Phonetic.Languages.Array.Ukrainian.Common import Phonetic.Languages.Parsing import Numeric import Languages.UniquenessPeriods.Array.Constraints.Encoded (decodeLConstraints,readMaybeECG)@@ -40,6 +40,7 @@ import Text.Read (readMaybe) import Phonetic.Languages.Simplified.DeEnCoding import Phonetic.Languages.Simplified.SimpleConstraints+import Interpreter.ArgsConversion import Interpreter.StringConversion import Melodics.Ukrainian.ArrInt8 (Sound8) import Phonetic.Languages.Ukrainian.PrepareText (prepareTuneTextMN,isSpC,isUkrainianL)@@ -47,6 +48,7 @@ import Phonetic.Languages.Permutations.Represent import Languages.Ukrainian.Data import Phonetic.Languages.Emphasis+import Phonetic.Languages.Coeffs  forMultiplePropertiesF :: [String] -> [(String,[String])] forMultiplePropertiesF (xs:xss)@@ -200,10 +202,11 @@       !arg0 = concat . take 1 $ numericArgs       !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)       !choice = concat . take 1 $ textualArgs+      !sels = parsey0Choice choice       !intervalNmbrs = (\zs -> if null zs then [numberI] else L.nub zs) . L.sort . filter (<= numberI) .           map (\t -> fromMaybe numberI $ (readMaybe t::Maybe Int)) . drop 2 $ numericArgs   (if syllables then do weightsString3NIO syllablesVs (any (== 'a') choice) bs else return ([],[],Str [])) >>= \(syllDs,syllableDs,readys) -> do -   if compare l 2 == LT then let !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then syllableDs else syllableDurationsDs) id (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else  coeffs) choice bs+   if compare l 2 == LT then let !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then syllableDs else syllableDurationsDs) id (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else  coeffs) sels choice bs                                  !wwss = (:[]) . toResultR2 frep20 $ xs in     case recursiveMode of       True -> interactivePrintResultRecursive syllableDurationsDs (if any (== 'a') choice then syllableDs else sDs) pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX (convFSL bs . line2) wwss args lstW2 syllables syllablesVs verbose@@ -240,7 +243,7 @@        !argCs = catMaybes (fmap (readMaybeECG (l - 1)) . (showB l lstW2:) . drop 1 . dropWhile (/= "+a") .                   takeWhile (/= "-a") $ args0)    (syllDs,syllableDs,readys) <- do if syllables then weightsString3NIO syllablesVs (any id (map (any (== 'a')) choices)) bs else return ([],[],FSL [])-   if compare l 2 == LT then let !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') . concat . take 1 $ choices then syllableDs else syllableDurationsDs) id coeffs (concat . take 1 $ choices) bs+   if compare l 2 == LT then let !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') . concat . take 1 $ choices then syllableDs else syllableDurationsDs) id coeffs [] (concat . take 1 $ choices) bs                                  !wwss = (:[]) . toResultR2 frep20 $ xs in      case recursiveMode of        True -> interactivePrintResultRecursive syllableDurationsDs (if syllables then syllableDs else sDs) pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX (convFSL bs . line2) wwss args lstW2 syllables syllablesVs verbose@@ -338,15 +341,35 @@      stringInterpreted <- getLine      if null stringInterpreted then putStrLn ts >> return (Str ts,ts)      else do-       let !firstArgs = takeWhile (not . all isLetter) args-       strIntrpr <- convStringInterpreterIO stringInterpreted ts+       let (strI10,convArgs0) = break (== '+') stringInterpreted+           strI1 = filter (not . isSpace) strI10+           (convArgs1,convArgs) = splitAt 2 convArgs0+           cnvArgs = min 1 (fromMaybe 0 (readMaybe (drop 1 convArgs1)::Maybe Int))+           (fileDu1,pairwisePermutations1,nativeUkrainian1,jstL01,args01,coeffs1,coeffsWX1,args1,lstW1,syllables1,syllablesVs1,verbose1) = argsConversion convArgs+           nativeUkrainian2 +             | nativeUkrainian1 = nativeUkrainian1+             | otherwise = nativeUkrainian +           lstW3 = if lstW1 then lstW1 else lstW2+           jstL02 = if jstL01 then jstL01 else jstL0+--           !firstArgs = takeWhile (not . all isLetter) args2+           args02 = if cnvArgs > 0 && cnvArgs < 5 then args01 else args0+           args2 = if cnvArgs `elem` [1,2,5,6] then  args1 else args+           firstArgs = takeWhile (not . all  isLetter) args2+           coeffs2 = if isPair coeffs1 then coeffs1 else coeffs+           coeffsWX2 = if isPair coeffsWX1 then coeffsWX1 else coeffsWX+           syllables2 = if syllables1 then syllables1 else syllables+           syllablesVs2 = if syllables1 then syllablesVs1 else syllablesVs+           pairwisePermutations2 = if cnvArgs `elem` [1,3,5,7]  then pairwisePermutations1 else pairwisePermutations+           verbose2 = if verbose1 == 0 then verbose else verbose1+       strIntrpr <- convStringInterpreterIO strI1 ts+       syllableDurationsDs2 <- (if null fileDu1 then return syllableDurationsDs else readSyllableDurations fileDu1)        wordsNN <--         if pairwisePermutations /= P 0 then do-           putStrLn . messageInfo 8 $ nativeUkrainian+         if pairwisePermutations2 /= P 0 then do+           putStrLn . messageInfo 8 $ nativeUkrainian2            mStr <- getLine            let m = fromMaybe 10 (readMaybe mStr::Maybe Int) in return . take m . words $ strIntrpr          else return . take 7 . words $ strIntrpr-       generalProc2 syllableDurationsDs sDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX (firstArgs `mappend` wordsNN) lstW2 syllables syllablesVs verbose+       generalProc2 syllableDurationsDs2 sDs pairwisePermutations2 recursiveMode nativeUkrainian2 interactive jstL02 args02 coeffs2 coeffsWX2 (firstArgs `mappend` wordsNN) lstW3 syllables2 syllablesVs2 verbose2  printWarning :: Bool -> String -> IO String printWarning nativeUkrainian xs = do@@ -367,19 +390,20 @@  -> IO [Result2 ReadyForConstructionUkr Double Double] generalProcMs syllableDurationsDs sDs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice) syllables syllablesVs = do   let bs = unwords subs-  if compare numberI 2 == LT then let !frep2 = if any (\t -> t == 'x' || t == 'w') choice then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) id coeffsWX choice bs else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) id coeffs choice bs+      sels = parsey0Choice choice+  if compare numberI 2 == LT then let !frep2 = if any (\t -> t == 'x' || t == 'w') choice then chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) id coeffsWX sels choice bs else chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) id coeffs sels choice bs    in return . fst . (if any (== 'G') choice then partitioningR2 arg0 else maximumGroupsClassificationR_2 (fromMaybe 1 (readMaybe arg0::Maybe Int))) . map (toResultR2 frep2) . map Str .         uniquenessVariants2GNBL ' ' id id id perms $ subs   else do     let !variants1 = uniquenessVariants2GNBL ' ' id id id perms subs-        !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) id (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) choice bs+        !frep20 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) id (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) sels choice bs         (!minE,!maxE) = minMax11C . map (toPropertiesF'2 frep20) $ map Str variants1-        !frep2 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) choice bs+        !frep2 = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (if any (== 'a') choice then sDs else syllableDurationsDs) (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) sels choice bs     return . fst . (if any (== 'G') choice then partitioningR2 arg0 else maximumGroupsClassificationR_2 (fromMaybe 1 (readMaybe arg0::Maybe Int))) . map (toResultR2 frep2) $ map Str variants1  show2 verbose jjs@(R2  x y z:_) = show1 bs          where bs = L.sortBy (\(R2 xs d1 k1) (R2 ys d2 k2) -> case verbose of -              2 -> compare d2 d1+              2 -> if d2 == d1 then compare xs ys else compare d2 d1               1 -> compare xs ys               3 -> compare k2 k1               _ -> EQ) jjs 
Phonetic/Languages/Simplified/Array/Ukrainian/FuncRep2RelatedG2.hs view
@@ -13,7 +13,6 @@  import CaseBi.Arr import Phonetic.Languages.Basis-import Phonetic.Languages.Array.Ukrainian.Common import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Diverse import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Rhythmicity import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG21@@ -24,7 +23,10 @@ import GHC.Arr (Array, listArray) import GHC.Int (Int8) import Languages.Ukrainian.Data+import Data.List (sort)+import Data.Char (toLower) import Phonetic.Languages.Emphasis+import Phonetic.Languages.Coeffs  -- | 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@@ -50,11 +52,12 @@   -> [[[[Sound8]]] -> [[Double]]]   -> (Double -> c)   -> Coeffs2+  -> FlowSound   -> String   -> String -- ^ The starting 'String' which creates the order for the 'FSL' representation.   -> FuncRep2 ReadyForConstructionUkr Double c-chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs g coeffs choice bbs- | any (== 'G') choice = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs g coeffs (filter (/= 'G') choice) bbs+chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs g coeffs sels choice bbs+ | any (== 'G') choice = chooseMax tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsDs g coeffs sels (filter (/= 'G') choice) bbs  | take 1 choice == "H" || any (=='a') choice = procRhythmicity23FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g syllableDurationsDs choice coeffs bbs  | take 1 choice `elem` ["c","M","N"] || (take 1 choice >= "A" && take 1 choice <= "F") = procRhythmicity23FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g choice coeffs  | getBFst' (False, listArray (0,1187) . zip ["02y","02z","03y","03z","04y","04z","0y","0z","I01","I02","I03","I04","I11",@@ -134,23 +137,23 @@         "x12","x13","x14","x21","x22","x23","x24","x31","x32","x33","x34"] . replicate 3000 $ True) choice =            procRhythmicity23FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g choice coeffs  | otherwise =-    getBFstLSorted' (procBoth4InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs)-      [("y",procBothFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("y0",procDiverse2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 g),-       ("y2",procBoth2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("y3",procBoth3FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("y4",procBoth4FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("yy",procBothInvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("yy2",procBoth2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("yy3",procBoth3InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs),-       ("z",procBothFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("z2",procBoth2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("z3",procBoth3FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("z4",procBoth4FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("zz",procBothInvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("zz2",procBoth2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("zz3",procBoth3InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs),-       ("zz4", procBoth4InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs)] choice+    getBFstLSorted' (procBoth4InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels)+      [("y",procBothFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("y0",procDiverse2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 g sels),+       ("y2",procBoth2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("y3",procBoth3FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("y4",procBoth4FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("yy",procBothInvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("yy2",procBoth2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("yy3",procBoth3InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels),+       ("z",procBothFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("z2",procBoth2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("z3",procBoth3FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("z4",procBoth4FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("zz",procBothInvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("zz2",procBoth2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("zz3",procBoth3InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels),+       ("zz4", procBoth4InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 1.3 g coeffs sels)] . takeWhile (/= '.') $ choice  -- | Allows to choose precision in the Numeric.showFDouble function being given a choice parameter. precChoice :: String -> Maybe Int@@ -160,7 +163,7 @@     ("04z",Just 0),("0y",Just 0),("0z",Just 0),("H02y",Just 0),("H02z",Just 0),("H03y",Just 0),("H03z",Just 0),("H04y",Just 0),     ("H04z",Just 0),("H0y",Just 0),("H0z",Just 0),("Hy",Just 0),("Hy0",Just 0),("Hy2",Just 0),("Hy3",Just 0), ("Hy4",Just 0),     ("Hz",Just 0),("Hz0",Just 0),("Hz2",Just 0),("Hz3",Just 0), ("Hz4",Just 0), ("y",Just 0),("y0",Just 0),("y2",Just 0),-    ("y3",Just 0), ("y4",Just 0),("z",Just 0),("z0",Just 0),("z2",Just 0),("z3",Just 0), ("z4",Just 0)] choice+    ("y3",Just 0), ("y4",Just 0),("z",Just 0),("z0",Just 0),("z2",Just 0),("z3",Just 0), ("z4",Just 0)] . takeWhile (/= '.') $ choice  --------------------------------------------------- @@ -169,4 +172,15 @@               (39, чT),(41, шT),(43, фT), (45, кT),(47, пT),(49, сT tup8 tup9 tup10),(50, тT tup8 tup11 tup10),                 (52, хT),(54, сьT),(62, нтT),(63, стT),(64, тьT),(66, цьT)] +--------------------------------------------------- +parsey0Choice :: String -> FlowSound+parsey0Choice xs +  | getBFst' (False, listArray (0,24) . zip ["02y","02z","03y","03z","04y","04z","0y","0z","y","y0","y2","y3","y4","yy","yy2","yy3","yy4","z","z2","z3","z4","zz","zz2","zz3","zz4"] . replicate 25 $ True) ts = f . sort . filter (/= 101) . concatMap g . words . map (\c -> if c  == '.' then ' ' else toLower c) $ us+  | otherwise = []+    where (ts,us) = break (== '.') . filter (\c -> c /= 'H' && c /= 'G') $ xs+          g = getBFst' ([101::Sound8], listArray (0,41) (("sr",[27,28,38,3,34,36]):("vd",[8,10,15,17,19,21,23,25]) :("vs",[45,47,49,50,43,52,38,66,54,39,41]) :("vw",[1..6]) :map (\(k,t) -> (k,[t])) [("\1072",1),("\1073",15),("\1074",36),("\1075",21),("\1076",17),("\1076\1078",23),("\1076\1079",8),("\1077",2),("\1078",10),("\1079",25),("\1080",5),("\1081",27),("\1082",45),("\1083",28),("\1084",30),("\1085",32),("\1086",3),("\1087",47),("\1088",34),("\1089",49),("\1089\1100",54),("\1090",50),("\1091",4),("\1092",43),("\1093",52),("\1094",38),("\1094\1100",66),("\1095",39),("\1096",41),("\1097",55),("\1100",7),("\1102",56),("\1103",57),("\1108",58),("\1110",6),("\1111",59),("\1169",19),("\8217",61)]))+          f (x:ts@(y:xs)) +            | x == y = f ts+            | otherwise = x:f ts+          f xs = xs
README.md view
@@ -6,26 +6,36 @@ The short (possibly) instruction how to use the programs of the package phonetic-languages-simplified-examples-array in Ukrainian is here: -https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.1.pdf+https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.pdf +or: https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.html++in html format,+ or here: -(try https://web.archive.org/web/20220822182842/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.1.pdf+(try https://web.archive.org/web/20220913192723/https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.pdf -or https://web.archive.org/web/20220822182940/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.1.html+or https://web.archive.org/web/20220913192509/https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.html  in html format ).  The instruction in English is here: -https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.1.pdf+https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf +or:++https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html++in html format,+ or here: -(try https://web.archive.org/web/20220822183103/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.1.pdf+(try https://web.archive.org/web/20220913192921/https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf -or https://web.archive.org/web/20220822183226/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.1.html+or https://web.archive.org/web/20220913193012/https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html  in html format ).@@ -134,9 +144,9 @@  lineVariantsG3 3 a02y +s 2 хрущі над вишнями гудуть -lineVariantsG3 100.0_0.001 +m a01x 5 02y 20 -m +s 1 +v 3 якісь цікаві ми отримуємо результати+lineVariantsG3 100.0_0.001 +m ax01 5 02y 20 -m +s 1 +v 3 якісь цікаві ми отримуємо результати -lineVariantsG3 10.0_0.0 +m a01x 5 a02x 5 a03x 5 -m +s 3 +v 3 хрущі над вишнями гудуть+lineVariantsG3 10.0_0.0 +m ax01 5 ax02 5 ax03 5 -m +s 3 +v 3 хрущі над вишнями гудуть  lineVariantsG3 +r 3 as01 +s 1 +u малювати щось гарне це цікаве заняття @@ -187,6 +197,8 @@ "just\_text.txt" \^t  2)  propertiesTextG3:++propertiesTextG3 +i +s s 1 0 x02  propertiesTextG3 `<first argument>` \[`<WX argument>` `<whether to grow lines>`\] `<file with Ukrainian text>`
Simple/Main.hs view
@@ -11,7 +11,6 @@  module Main where -import Phonetic.Languages.Array.Ukrainian.Common import System.Environment (getArgs) import Phonetic.Languages.Simple import Interpreter.StringConversion (readFileIfAny)@@ -21,6 +20,7 @@ import CLI.Arguments.Parsing import CLI.Arguments.Get import Phonetic.Languages.Permutations.Represent+import Phonetic.Languages.Coeffs  -- | Prints the rearrangements with the \"property\" information for the Ukrainian language text.  main :: IO ()
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.20.1.0+version:             0.21.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. To present the created text you can use e. g. html-presentation-text package: https://hackage.haskell.org/package/html-presentation-text . 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 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.0.0, phonetic-languages-basis ==0.1.1.0, phonetic-languages-simplified-properties-array ==0.15.0.0, phonetic-languages-simplified-properties-array-common ==0.2.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.0.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.6.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0+  build-depends:       base >=4.8 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.1.0, phonetic-languages-basis ==0.2.0.0, phonetic-languages-simplified-properties-array ==0.16.0.0, phonetic-languages-simplified-properties-array-common ==0.3.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.1.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.7.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0   -- 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 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.0.0, phonetic-languages-basis ==0.1.1.0, phonetic-languages-simplified-properties-array ==0.15.0.0, phonetic-languages-simplified-properties-array-common ==0.2.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.0.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.6.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0  +  build-depends:       base >=4.8 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.1.0, phonetic-languages-basis ==0.2.0.0, phonetic-languages-simplified-properties-array ==0.16.0.0, phonetic-languages-simplified-properties-array-common ==0.3.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.1.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.7.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0   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 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.0.0, phonetic-languages-basis ==0.1.1.0, phonetic-languages-simplified-properties-array ==0.15.0.0, phonetic-languages-simplified-properties-array-common ==0.2.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.0.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.6.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0+  build-depends:       base >=4.8 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.1.0, phonetic-languages-basis ==0.2.0.0, phonetic-languages-simplified-properties-array ==0.16.0.0, phonetic-languages-simplified-properties-array-common ==0.3.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.1.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.7.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0   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 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.0.0, phonetic-languages-basis ==0.1.1.0, phonetic-languages-simplified-properties-array ==0.15.0.0, phonetic-languages-simplified-properties-array-common ==0.2.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.0.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.6.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0+  build-depends:       base >=4.8 && <5, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-simplified-base ==0.6.1.0, phonetic-languages-basis ==0.2.0.0, phonetic-languages-simplified-properties-array ==0.16.0.0, phonetic-languages-simplified-properties-array-common ==0.3.0.0, phonetic-languages-ukrainian-array ==0.9.3.0, phonetic-languages-filters-array ==0.5.0.0, uniqueness-periods-vector-stats ==0.3.0.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, subG == 0.5.3.0, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-permutations-array == 0.3.4.0, heaps >= 0.3.6.1 && <1,  phonetic-languages-constraints-array ==0.1.2.0, phonetic-languages-simplified-examples-common ==0.5.1.0, mmsyn2-array == 0.3.0.0, string-interpreter ==0.7.0.0, cli-arguments == 0.6.0.0, mmsyn2-array-ukrainian-data == 0.1.0.0, lists-flines == 0.1.2.0   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., GetInfo   default-language:    Haskell2010