phonetic-languages-simplified-examples-array 0.12.1.0 → 0.13.0.0
raw patch · 11 files changed
+373/−138 lines, 11 filesdep ~phonetic-languages-permutations-arraydep ~phonetic-languages-simplified-basedep ~phonetic-languages-simplified-examples-commonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-permutations-array, phonetic-languages-simplified-base, phonetic-languages-simplified-examples-common, phonetic-languages-simplified-properties-array, string-interpreter
API changes (from Hackage documentation)
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: divide2SDDs :: String -> [String]
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: readSyllableDurations :: FilePath -> IO [[[[UZPP2]]] -> [[Double]]]
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: readUZPP2ToDouble :: String -> (Double, [(UZPP2, Double)])
+ Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties: uzpp2s :: [UZPP2]
- Phonetic.Languages.GetTextualInfo: generalProc :: (Int, Int) -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()
+ Phonetic.Languages.GetTextualInfo: generalProc :: FilePath -> Bool -> (Int, Int) -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()
- Phonetic.Languages.GetTextualInfo: getData3 :: Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
+ Phonetic.Languages.GetTextualInfo: getData3 :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
- Phonetic.Languages.GetTextualInfo: process1Line :: Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()
+ Phonetic.Languages.GetTextualInfo: process1Line :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()
- Phonetic.Languages.Lines: circle2 :: Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]
+ Phonetic.Languages.Lines: circle2 :: [[[[UZPP2]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]
- Phonetic.Languages.Lines: circle2I :: Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> Int -> [Int] -> Double -> Double -> [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: generalProcessment :: (Int, Int) -> Coeffs2 -> [String] -> [String] -> Int -> FilePath -> IO ()
+ Phonetic.Languages.Lines: generalProcessment :: FilePath -> Bool -> (Int, Int) -> Coeffs2 -> [String] -> [String] -> Int -> FilePath -> IO ()
- Phonetic.Languages.Simple: finalProc :: Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO 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: generalProc2 :: Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [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: generalProc2G :: Bool -> Bool -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
+ Phonetic.Languages.Simple: generalProc2G :: [[[[UZPP2]]] -> [[Double]]] -> Bool -> Bool -> Bool -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
- Phonetic.Languages.Simple: generalProc3G :: [String] -> String -> Int -> Bool -> Bool -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
+ Phonetic.Languages.Simple: generalProc3G :: FilePath -> Bool -> [String] -> String -> Int -> Bool -> Bool -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
- Phonetic.Languages.Simple: generalProcMMs :: Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [([Int], Int, Int, String)] -> [Array Int Int] -> [String] -> [String] -> Bool -> IO String
+ 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: generalProcMs :: Coeffs2 -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int], Int, Int, String) -> IO [Result [] Char Double Double]
+ Phonetic.Languages.Simple: generalProcMs :: [[[[UZPP2]]] -> [[Double]]] -> Coeffs2 -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int], Int, Int, String) -> IO [Result [] Char Double Double]
- Phonetic.Languages.Simple: interactivePrintResultRecursive :: Bool -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
+ Phonetic.Languages.Simple: interactivePrintResultRecursive :: [[[[UZPP2]]] -> [[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 => (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
+ Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2: chooseMax :: Ord c => [[[[UZPP2]]] -> [[Double]]] -> (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
Files
- CHANGELOG.md +7/−0
- GetInfo/Main.hs +9/−6
- Lines/Main.hs +11/−4
- Phonetic/Languages/GetTextualInfo.hs +70/−17
- Phonetic/Languages/Lines.hs +44/−19
- Phonetic/Languages/Simple.hs +108/−72
- Phonetic/Languages/Simplified/Array/Ukrainian/FuncRep2RelatedG2.hs +10/−4
- Phonetic/Languages/Simplified/Array/Ukrainian/ReadProperties.hs +73/−0
- README +24/−2
- Simple/Main.hs +8/−5
- phonetic-languages-simplified-examples-array.cabal +9/−9
CHANGELOG.md view
@@ -152,3 +152,10 @@ ## 0.12.1.0 -- 2021-09-15 * The twelth version revised A. Fixed issues in the documentation for the installation and upgrading processes.++## 0.13.0.0 -- 2021-10-14++* The thirteenth version. Added the possibility to provide the user-defined (read from the file with Haskell-like+syntaxis) functions to define the syllable durations. Added also the possibility to use just pairwise permutations+instead of the full universal set of them. Updated the dependency boundaries and the documentation+appropriately. Fixed the issue with not properly documented (re-)installation process for the package(s).
GetInfo/Main.hs view
@@ -29,8 +29,11 @@ main :: IO () main = do- args0000 <- getArgs- let !args000 = filter (\ts -> take 2 ts /= "+x" && take 2 ts /= "+g") args0000+ args50 <- getArgs+ let !args0000 = filter (/= "+p") . (\xss -> takeWhile (/= "+d") xss `mappend` drop 2 (takeWhile (/= "+d") xss)) $ args50+ !pairwisePermutations = any (== "+p") args50+ !fileDu = concat . drop 1 . take 2 . dropWhile (/= "+d") $ args50+ !args000 = filter (\ts -> take 2 ts /= "+x" && take 2 ts /= "+g") args0000 !growing = filter ((== "+g") . (take 2)) args0000 (!gr1,!gr2) | null growing = (0,0)@@ -55,10 +58,10 @@ !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 (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 choice else do contents <- readFile file- fLinesIO contents+ fLinesNIO (if pairwisePermutations then 10 else 7) contents else do let !file = concat . take 1 $ args if null numbersJustPrint then do@@ -66,7 +69,7 @@ !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 (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 choice else do contents <- readFile file- fLinesIO contents+ fLinesNIO (if pairwisePermutations then 10 else 7) contents
Lines/Main.hs view
@@ -45,10 +45,17 @@ -- -- @ since 0.12.0.0 -- You can run the comparative mode on the up to 7 different files simultaneously.+-- @ since 0.13.0.0+-- You can provide your own durations and use just pairwise permutations for quick (though not complete) evaluation. main :: IO () main = do- args00 <- getArgs- let multiple = if null . filter (== "+m") $ args00 then 0 else 1+ args50 <- getArgs+ let args00 = filter (/= "+p") . (\xss -> takeWhile (/= "+d") xss `mappend` drop 2 (takeWhile (/= "+d") xss)) $ args50+ pairwisePermutations = any (== "+p") args50+ fileDu = concat . drop 1 . take 2 . dropWhile (/= "+d") $ args50+ multiple+ | null . filter (== "+m") $ args00 = 0+ | otherwise = 1 args0 | multiple == 1 = takeWhile (/= "+m") args00 `mappend` drop 1 (dropWhile (/= "-m") args00) | otherwise = args00@@ -80,7 +87,7 @@ | otherwise = drop 2 . take 3 $ args0 !numberI = fromMaybe 1 (readMaybe (concat . take 1 $ numericArgs)::Maybe Int) !file = concat . drop 1 . take 2 $ args0- generalProcessment (gr1,gr2) coeffs numericArgs choices numberI file+ generalProcessment fileDu pairwisePermutations (gr1,gr2) coeffs numericArgs choices numberI file else do let !numericArgs = filter (all isDigit) . drop 2 $ args0 !choices@@ -88,4 +95,4 @@ | otherwise = drop 1 . take 2 $ args0 !numberI = fromMaybe 1 (readMaybe (concat . take 1 $ numericArgs)::Maybe Int) !file = concat . take 1 $ args0- generalProcessment (gr1,gr2) coeffs numericArgs choices numberI file+ generalProcessment fileDu pairwisePermutations (gr1,gr2) coeffs numericArgs choices numberI file
Phonetic/Languages/GetTextualInfo.hs view
@@ -39,11 +39,15 @@ import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2 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 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) depends on the 'String' argument -- whether it starts with \'w\', \'x\' or otherwise. In the first case it represents@@ -56,18 +60,34 @@ Besides there are new lines of the arguments for the 'String' argument that can begin with \"c\", \"s\", \"t\", \"u\", \"v\", \"C\", \"N\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\" and \"Z\" letters. For more information, please, refer to the 'Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2.rhythmicity'. -}-generalProc :: (Int,Int) -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()-generalProc (gr1,gr2) lstW multiples2 lInes coeffs coeffsWX file gzS printLine toOneLine choice+generalProc+ :: FilePath -- ^ Whether to use the own provided durations from the file specified here. Uses the 'readSyllableDurations' function.+ -> 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.+ -> (Int,Int)+ -> Bool+ -> [String]+ -> [String]+ -> Coeffs2+ -> Coeffs2+ -> FilePath+ -> String+ -> Int+ -> Int+ -> String+ -> IO ()+generalProc fileDu pairwisePermutations (gr1,gr2) lstW multiples2 lInes coeffs coeffsWX file gzS printLine toOneLine choice | null lInes = do+ syllableDurationsDs <- readSyllableDurations fileDu contents <- readFile file let !flines- | gr1 == 0 = fLines toOneLine contents- | otherwise = prepareGrowTextMN gr1 gr2 . unlines . fLines toOneLine $ contents- getData3 lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 flines+ | gr1 == 0 = fLinesN (if pairwisePermutations then 10 else 7) toOneLine contents+ | otherwise = prepareGrowTextMN gr1 gr2 . unlines . fLinesN (if pairwisePermutations then 10 else 7) toOneLine $ contents+ getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 flines | otherwise = do+ syllableDurationsDs <- readSyllableDurations fileDu contents <- readFile file- let !flines = (if gr1 == 0 then id else prepareGrowTextMN gr1 gr2 . unlines) . fLines toOneLine . unlines . linesFromArgsG lInes . fLines 0 $ contents- getData3 lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 flines+ let !flines = (if gr1 == 0 then id else prepareGrowTextMN gr1 gr2 . unlines) . fLinesN (if pairwisePermutations then 10 else 7) toOneLine . unlines . linesFromArgsG lInes . fLinesN (if pairwisePermutations then 10 else 7) 0 $ contents+ getData3 syllableDurationsDs pairwisePermutations lstW coeffs coeffsWX (getIntervalsNS lstW gzS flines) printLine choice multiples2 flines linesFromArgs1 :: Int -> String -> [String] -> [String] linesFromArgs1 n xs yss =@@ -78,11 +98,33 @@ linesFromArgsG :: [String] -> [String] -> [String] linesFromArgsG xss yss = let n = length yss in concatMap (\ts -> linesFromArgs1 n ts yss) xss -getData3 :: Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()-getData3 lstW coeffs coeffsWX gz printLine choice multiples3 zss = let !permsV4 = genPermutationsArrL in putStrLn (replicate (length multiples3 + 1) '\t' `mappend` show gz) >> mapM_ (process1Line lstW coeffs coeffsWX gz printLine choice multiples3 permsV4) zss+getData3+ :: [[[[S.UZPP2]]] -> [[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+ -> Coeffs2+ -> Int+ -> Int+ -> String+ -> [String]+ -> [String]+ -> IO ()+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 :: Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()-process1Line lstW coeffs coeffsWX gz printLine choice multiples4 !permsV50 v+process1Line+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Bool+ -> Coeffs2+ -> Coeffs2+ -> Int+ -> Int+ -> String+ -> [String]+ -> Array Int [Array Int Int]+ -> String+ -> IO ()+process1Line syllableDurationsDs lstW coeffs coeffsWX gz printLine choice multiples4 !permsV50 v | null multiples4 = bracket (do { myThread <- forkIO (do let !v2 = words v@@ -90,8 +132,13 @@ 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' (if take 1 choice == "x" || take 1 choice == "w" then chooseMax id coeffsWX choice else chooseMax id coeffs choice)) .- uniquenessVariants2GNBL ' ' id id id permsV5 $ v2, toTransPropertiesF' (if take 1 choice == "x" || take 1 choice == "w" then chooseMax id coeffsWX choice else chooseMax id coeffs choice) . unwords . subG " 01-" $ v))+ ((!minE,!maxE),!data2) = runEval (parTuple2 rpar rpar (minMax11C . map (toTransPropertiesF' (if take 1 choice == "x"+ || take 1 choice == "w" || (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["w","x"]))+ then chooseMax syllableDurationsDs id coeffsWX choice+ else chooseMax syllableDurationsDs id coeffs choice)) .+ uniquenessVariants2GNBL ' ' id id id permsV5 $ v2, toTransPropertiesF' (if take 1 choice == "x"+ || take 1 choice == "w" then chooseMax syllableDurationsDs id coeffsWX choice+ else chooseMax syllableDurationsDs id coeffs choice) . unwords . subG " 01-" $ 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"@@ -114,10 +161,16 @@ let !permsV5 = decodeConstraint1 (fromMaybe (E 1) . readMaybeECG (l2 + 1) . showB (l2 + 2) $ lstW) . unsafeAt permsV50 $ l2 rs = parMap rpar (\choiceMMs -> (minMax11C .- map (toTransPropertiesF' (if take 1 choiceMMs == "x" || take 1 choiceMMs == "w" then chooseMax id coeffsWX choiceMMs else chooseMax id coeffs choiceMMs)) .- uniquenessVariants2GNBL ' ' id id id permsV5 $ v2,- toTransPropertiesF' (if take 1 choiceMMs == "x" || take 1 choiceMMs == "w" then chooseMax id coeffsWX choiceMMs else chooseMax id coeffs choiceMMs) .- unwords . subG " 01-" $ v,gz)) multiples4+ map (toTransPropertiesF' (if take 1 choiceMMs == "x" || take 1 choiceMMs == "w" ||+ (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["w","x"]))+ then chooseMax syllableDurationsDs id coeffsWX choiceMMs+ else chooseMax syllableDurationsDs id coeffs choiceMMs)) .+ uniquenessVariants2GNBL ' ' id id id permsV5 $ v2,+ toTransPropertiesF' (if take 1 choiceMMs == "x" || take 1 choiceMMs == "w" ||+ (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["w","x"]))+ then chooseMax syllableDurationsDs id coeffsWX choiceMMs+ else chooseMax syllableDurationsDs id coeffs choiceMMs) .+ unwords . subG " 01-" $ v,gz)) multiples4 (!wordsN,!intervalNs) = (l2 + 2, map (\((!x,!y),!z,!t) -> intervalNRealFrac x y t z) rs) in do hPutStr stdout (show (wordsN::Int))
Phonetic/Languages/Lines.hs view
@@ -24,16 +24,19 @@ import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2 import Phonetic.Languages.Simplified.StrictVG.Base import Phonetic.Languages.Permutations.Arr+import Phonetic.Languages.Permutations.ArrMini import Phonetic.Languages.Filters (unsafeSwapVecIWithMaxI) import Text.Read (readMaybe) import Data.Maybe (fromMaybe)-import Phonetic.Languages.Ukrainian.PrepareText 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 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) depends on the 'String' argument -- whether it starts with \'w\', \'x\' or otherwise. In the first case it represents@@ -49,16 +52,28 @@ on the given list of choices for the properties given as the second ['String'] argument. Every new file is being saved with the choice prefix. -}-generalProcessment :: (Int,Int) -> Coeffs2 -> [String] -> [String] -> Int -> FilePath -> IO ()-generalProcessment (gr1,gr2) coeffs numericArgs choices numberI file = do+generalProcessment+ :: FilePath -- ^ Whether to use the own provided durations from the file specified here. Uses the 'readSyllableDurations' function.+ -> 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.+ -> (Int,Int)+ -> Coeffs2+ -> [String]+ -> [String]+ -> Int+ -> FilePath -- ^ The file with the text in Ukranian to be rewritten.+ -> IO ()+generalProcessment fileDu pairwisePermutations (gr1,gr2) coeffs numericArgs choices numberI file = do+ syllableDurationsDs <- readSyllableDurations fileDu contents <- readFile file- let !permsV = genPermutationsArrL+ let !permsV+ | pairwisePermutations = genPairwisePermutationsArrLN 10+ | otherwise = genPermutationsArrL !flines- | gr1 == 0 = fLines 0 contents- | otherwise = prepareGrowTextMN gr1 gr2 . unlines . fLines 0 $ contents+ | gr1 == 0 = fLinesN (if pairwisePermutations then 10 else 7) 0 contents+ | otherwise = prepareGrowTextMN gr1 gr2 . unlines . fLinesN (if pairwisePermutations then 10 else 7) 0 $ contents !lasts = map (\ts -> if null . words $ ts then [] else last . words $ ts) flines if compare numberI 2 == LT then- mapM_ (\choice -> toFileStr (choice ++ "." ++ file ++ ".new.txt") (circle2 coeffs permsV choice [] $ flines)) choices+ mapM_ (\choice -> toFileStr (choice ++ "." ++ file ++ ".new.txt") (circle2 syllableDurationsDs coeffs permsV choice [] $ flines)) choices else do let !intervalNmbrs = (\vs -> if null vs then [numberI] else nub vs) . sort . filter (<= numberI) . map (\t -> fromMaybe numberI (readMaybe t::Maybe Int)) . drop 2 $ numericArgs@@ -66,12 +81,14 @@ !l2 = (subtract 3) . length $ us if compare l2 0 /= LT then do let !perms2 = unsafeAt permsV $ l2- minMaxTuples = let !frep20Zip = zip choices . map (chooseMax id coeffs) $ choices in+ minMaxTuples = let !frep20Zip = zip choices . map (chooseMax syllableDurationsDs id coeffs) $ choices in map (\(choice,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 coeffs permsV choice [] numberI intervalNmbrs minE maxE $ flines)) . zip choices $ minMaxTuples+ mapM_ (\(choice, (minE,maxE)) -> toFileStr (choice ++ "." ++ file ++ ".new.txt")+ (circle2I syllableDurationsDs coeffs permsV choice [] numberI intervalNmbrs minE maxE $+ flines)) . zip choices $ minMaxTuples else mapM_ (\choice -> toFileStr (choice ++ "." ++ file ++ ".new.txt") ((concat . take 1 $ flines):- (circle2I coeffs permsV choice [] numberI intervalNmbrs 0.0 0.0 . drop 1 $ flines))) choices+ (circle2I syllableDurationsDs coeffs permsV choice [] numberI intervalNmbrs 0.0 0.0 . drop 1 $ flines))) choices compareFilesToOneCommon :: [FilePath] -> FilePath -> IO () compareFilesToOneCommon files file3 = do@@ -90,20 +107,28 @@ toFileStr file3 ((\us -> if null us then [""] else [snd . head $ us]) . filter ((== choice2) . fst) $ strs)) [1..] -- | Processment without rearrangements.-circle2 :: Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]-circle2 coeffs permsG1 choice yss xss+circle2+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Coeffs2+ -> Array Int [Array Int Int]+ -> String+ -> [String]+ -> [String]+ -> [String]+circle2 syllableDurationsDs coeffs permsG1 choice yss xss | null xss = yss- | otherwise = circle2 coeffs permsG1 choice (yss `mappend` [ws]) tss+ | otherwise = circle2 syllableDurationsDs coeffs permsG1 choice (yss `mappend` [ws]) tss where (!zss,!tss) = splitAt 1 xss !rs = words . concat $ zss !l = length rs- !frep2 = chooseMax id coeffs choice+ !frep2 = chooseMax syllableDurationsDs id coeffs choice !ws = if compare l 3 == LT then unwords rs else line . maximumElR . map (toResultR frep2) . uniquenessVariants2GNPBL [] (last rs) ' ' id id id (unsafeAt permsG1 (l - 3)) . init $ rs -- | Processment with rearrangements. circle2I- :: Coeffs2+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String]@@ -113,15 +138,15 @@ -> Double -> [String] -> [String]-circle2I coeffs permsG1 choice yss numberI intervNbrs minE maxE xss+circle2I syllableDurationsDs coeffs permsG1 choice yss numberI intervNbrs minE maxE xss | null xss = yss- | otherwise = circle2I coeffs permsG1 choice (yss `mappend` [ws]) numberI intervNbrs minE1 maxE1 tss+ | otherwise = circle2I syllableDurationsDs coeffs permsG1 choice (yss `mappend` [ws]) numberI intervNbrs minE1 maxE1 tss where (!zss,!tss) = splitAt 1 xss !w2s = words . concat . take 1 $ tss !l3 = (subtract 3) . length $ w2s !rs = words . concat $ zss !l = length rs- !frep2 = chooseMax (unsafeSwapVecIWithMaxI minE maxE numberI intervNbrs) coeffs choice+ !frep2 = chooseMax syllableDurationsDs (unsafeSwapVecIWithMaxI minE maxE numberI intervNbrs) coeffs choice !ws = if compare (length rs) 3 == LT then unwords rs else line . maximumElR . map (toResultR frep2) . uniquenessVariants2GNPBL [] (last rs) ' ' id id id (unsafeAt permsG1 (l - 3)) . init $ rs@@ -129,7 +154,7 @@ | compare l3 0 /= LT = let !perms3 = unsafeAt permsG1 l3 !v4 = init w2s- !frep20 = chooseMax id coeffs choice in minMax11C . map (toPropertiesF' frep20) .+ !frep20 = chooseMax syllableDurationsDs id coeffs choice in minMax11C . map (toPropertiesF' frep20) . uniquenessVariants2GNPBL [] (last w2s) ' ' id id id perms3 $ v4 | otherwise = (0.0,0.0)
Phonetic/Languages/Simple.hs view
@@ -10,11 +10,11 @@ -- Maintainer : olexandr543@yahoo.com -- -- The library functions for the lineVariantsG3 executable. Since 0.4.0.0 version it supports printing of the informational--- messages both in English and Ukrainian.+-- messages both in English and Ukrainian. Since the 0.13.0.0 version there is the possibility to provide custom durations+-- instead of the default predefined ones. module Phonetic.Languages.Simple where -import CaseBi.Arr (getBFstL') import Phonetic.Languages.Parsing import Numeric import Languages.UniquenessPeriods.Array.Constraints.Encoded (decodeLConstraints,readMaybeECG)@@ -27,6 +27,7 @@ import qualified Data.List as L (span,sort,zip4,isPrefixOf,nub) import Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2 import Phonetic.Languages.Permutations.Arr+import Phonetic.Languages.Permutations.ArrMini import Data.SubG hiding (takeWhile,dropWhile) import Data.Maybe import Data.MinMax.Preconditions@@ -35,8 +36,10 @@ 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 Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties forMultiplePropertiesF :: [String] -> [(String,[String])] forMultiplePropertiesF (xs:xss)@@ -49,7 +52,9 @@ {-| Is used to organize the most complex processment -- for multiple sources and probably recursively. -} generalProc3G- :: [String]+ :: FilePath -- ^ Whether to use the own provided durations from the file specified here.+ -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set.+ -> [String] -> String -- ^ If empty, the function is just 'generalProc2G' with the arguments starting from the first 'Bool' here. -> Int -> Bool@@ -63,27 +68,32 @@ -> [String] -> Bool -> IO ()-generalProc3G textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW- | null textProcessment0 = generalProc2G recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW- | null textProcessmentFss = mapM_ (\_ -> do -- interactive training mode- putStrLn . messageInfo 7 $ nativeUkrainian- lineA <- getLine- generalProc2G recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 (fullArgsConvertTextualSimple mightNotUkrWord lineA args0) coeffs coeffsWX (fullArgsConvertTextualSimple mightNotUkrWord lineA args) lstW) [0..]- | textProcessment1 `elem` [21,31,41,51,61,71] =- mapM_ (mapM_ (\tss -> generalProc2G recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0- (fullArgsConvertTextualSimple mightNotUkrWord tss args0) coeffs coeffsWX- (fullArgsConvertTextualSimple mightNotUkrWord tss args) lstW) .- prepareTuneTextMN m 1 . unwords . lines) textProcessmentFss- | textProcessment1 `elem` [20,30,40,50,60,70] =- mapM_ (mapM_ (\tss -> generalProc2G recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0- (fullArgsConvertTextualSimple mightNotUkrWord tss args0) coeffs coeffsWX- (fullArgsConvertTextualSimple mightNotUkrWord tss args) lstW) . lines) textProcessmentFss- | otherwise =- mapM_ (mapM_ (\tss -> generalProc2G recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0- (fullArgsConvertTextualSimple mightNotUkrWord tss args0) coeffs coeffsWX- (fullArgsConvertTextualSimple mightNotUkrWord tss args) lstW) .- prepareTuneTextMN 7 1 . unwords . lines) textProcessmentFss- where m = quot textProcessment1 10+generalProc3G fileDu pairwisePermutations textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW = do+ syllableDurationsDs <- readSyllableDurations fileDu+ generalProc3G' syllableDurationsDs pairwisePermutations textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW+ where generalProc3G' syllableDurationsDs pairwisePermutations textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW+ | null textProcessment0 = generalProc2G syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW+ | null textProcessmentFss = mapM_ (\_ -> do -- interactive training mode+ putStrLn . messageInfo 7 $ nativeUkrainian+ lineA <- getLine+ generalProc2G syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 (fullArgsConvertTextualSimple mightNotUkrWord lineA args0) coeffs coeffsWX (fullArgsConvertTextualSimple mightNotUkrWord lineA args) lstW) [0..]+ | otherwise =+ mapM_ (\js -> do+ let !kss = lines js+ if pairwisePermutations then do+ putStrLn . messageInfo 8 $ nativeUkrainian+ mStr <- getLine+ let !m = fromMaybe 10 (readMaybe mStr::Maybe Int)+ !wss = prepareTuneTextMN m 1 . unwords $ kss+ mapM_ (\tss -> generalProc2G syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 (fullArgsConvertTextualSimple mightNotUkrWord tss args0) coeffs coeffsWX+ (fullArgsConvertTextualSimple mightNotUkrWord tss args) lstW) wss+ else do+ let !wss+ | textProcessment1 `elem` [20,30,40,50,60,70] = kss+ | otherwise = prepareTuneTextMN (if textProcessment1 `elem` [21,31,41,51,61] then m else 7) 1 . unwords $ kss+ mapM_ (\tss -> generalProc2G syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 (fullArgsConvertTextualSimple mightNotUkrWord tss args0) coeffs coeffsWX+ (fullArgsConvertTextualSimple mightNotUkrWord tss args) lstW) wss) textProcessmentFss+ m = quot textProcessment1 10 {-| If 'False' then it might be the Ukrainian word in the phonetic languages approach. If 'True', it is not. Is an example of the predicate inside the 'fullArgsConvertTextual' function for the Ukrainian language.@@ -98,11 +108,6 @@ {-# INLINE mightNotUkrWord #-} -- | Is taken from the @mmsyn6ukr@ package version 0.8.1.0 so that the amount of dependencies are reduced (and was slightly modified).-{-isUkrainianL :: Char -> Bool-isUkrainianL y | (y >= '\1040' && y <= '\1065') || (y >= '\1070' && y <= '\1097') = True- | otherwise = getBFstL' False (map (\x -> (x, True)) $ "\1028\1030\1031\1068\1100\1102\1103\1108\1110\1111\1168\1169\8217") y- -}- isUkrainianN x = isUkrainianL x || isSpC x {-|@@ -121,8 +126,10 @@ -} generalProc2G- :: Bool+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set. -> Bool+ -> Bool -> FilePath -> Bool -> Bool@@ -132,17 +139,17 @@ -> [String] -> Bool -> IO ()-generalProc2G recursiveMode nativeUkrainian toFile1 interactive jstL0 args0 coeffs coeffsWX args lstW2+generalProc2G syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian toFile1 interactive jstL0 args0 coeffs coeffsWX args lstW2 | variations args = do let !zsss = transformToVariations args print zsss- variantsG <- mapM (\xss -> generalProc2 recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX xss lstW2) zsss- (if recursiveMode then interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX id variantsG args lstW2+ variantsG <- mapM (\xss -> generalProc2 syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX xss lstW2) zsss+ (if recursiveMode then interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX id variantsG args lstW2 else interactivePrintResult nativeUkrainian id variantsG) >>= \rs -> case toFile1 of "" -> return () ~fileName -> appendFile fileName (rs `mappend` newLineEnding)- | otherwise = generalProc2 recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX args lstW2 >>=+ | otherwise = generalProc2 syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX args lstW2 >>= \rs -> case toFile1 of "" -> return ()@@ -151,22 +158,24 @@ -- | -- @ since 0.3.0.0 The result is not 'IO' (), but 'IO' 'String'. The type also changed generally. generalProc2- :: Bool+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set. -> Bool -> Bool -> Bool+ -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO String-generalProc2 recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX args lstW2 = do+generalProc2 syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX args lstW2 = do let !argMss = take 5 . filter (not . null) . forMultiplePropertiesF . drop 1 . dropWhile (/= "+m") . takeWhile (/= "-m") $ args0 if null argMss then do let (!numericArgs,!textualArgs) = L.span (all isDigit) $ args- !xs = concat . take 1 . fLines 0 . unwords . drop 1 $ textualArgs+ !xs = concat . take 1 . prepareTuneTextMN (if pairwisePermutations then 10 else 7) 1 . unwords . drop 1 $ textualArgs !l = length . words $ xs !argCs = catMaybes (fmap (readMaybeECG (l - 1)) . (showB l lstW2:) . drop 1 . dropWhile (/= "+a") . takeWhile (/= "-a") $ args0)@@ -176,24 +185,26 @@ !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 compare l 2 == LT then let !frep20- | take 1 choice == "x" || take 1 choice == "w" = chooseMax id coeffsWX choice- | otherwise = chooseMax id coeffs choice+ | take 1 choice == "x" || take 1 choice == "w" || (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["x","w"]))= chooseMax syllableDurationsDs id coeffsWX choice+ | otherwise = chooseMax syllableDurationsDs id coeffs choice !wwss = (:[]) . toResultR frep20 $ xs in case recursiveMode of- True -> interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2+ True -> interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2 _ -> if interactive then interactivePrintResult nativeUkrainian line wwss else print1el jstL0 choice wwss else do let !subs = subG " 01-" xs- if null argCs then let !perms = genPermutationsL l in do- temp <- generalProcMs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)- if recursiveMode then interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line temp args lstW2+ if null argCs then let !perms+ | pairwisePermutations = genPairwisePermutationsLN l+ | otherwise = genPermutationsL l in do+ temp <- generalProcMs syllableDurationsDs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)+ if recursiveMode then interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line temp args lstW2 else if interactive then interactivePrintResult nativeUkrainian line temp else print1el jstL0 choice temp else do correct <- printWarning nativeUkrainian xs if correct == "n" then putStrLn (messageInfo 1 nativeUkrainian) >> return "" -- for the multiple variations mode (with curly brackets and slash in the text) the program does not stop here, but the variation is made empty and is proposed further as a variant.- else let !perms = decodeLConstraints argCs . genPermutationsL $ l in do- temp <- generalProcMs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)- if recursiveMode then interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line temp args lstW2+ else let !perms = decodeLConstraints argCs . (if pairwisePermutations then genPairwisePermutationsLN else genPermutationsL) $ l in do+ temp <- generalProcMs syllableDurationsDs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)+ if recursiveMode then interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line temp args lstW2 else if interactive then interactivePrintResult nativeUkrainian line temp else print1el jstL0 choice temp else do let !choices = map fst argMss@@ -204,23 +215,25 @@ (\zs -> if null zs then [numberI] else L.nub zs) . L.sort . filter (<= numberI) . map (\t -> fromMaybe numberI $ (readMaybe t::Maybe Int)) . drop 2 $ us) $ numericArgss !argsZipped = L.zip4 intervalNmbrss arg0s numberIs choices- !xs = concat . take 1 . fLines 0 . unwords $ args+ !xs = concat . take 1 . prepareTuneTextMN (if pairwisePermutations then 10 else 7) 1 . unwords $ args !l = length . words $ xs !argCs = catMaybes (fmap (readMaybeECG (l - 1)) . (showB l lstW2:) . drop 1 . dropWhile (/= "+a") . takeWhile (/= "-a") $ args0)- if compare l 2 == LT then let !frep20 = chooseMax id coeffs (concat . take 1 $ choices)+ if compare l 2 == LT then let !frep20 = chooseMax syllableDurationsDs id coeffs (concat . take 1 $ choices) !wwss = (:[]) . toResultR frep20 $ xs in case recursiveMode of- True -> interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2+ True -> interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2 _ -> if interactive then interactivePrintResult nativeUkrainian line wwss else print1el jstL0 (concat . take 1 $ choices) wwss else do let !subs = subG " 01-" xs- if null argCs then let !perms = genPermutationsL l in- generalProcMMs recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2+ if null argCs then let !perms+ | pairwisePermutations = genPairwisePermutationsLN l+ | otherwise = genPermutationsL l in+ generalProcMMs syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2 else do correct <- printWarning nativeUkrainian xs if correct == "n" then putStrLn (messageInfo 1 nativeUkrainian) >> return "" -- for the multiple variations mode (with curly brackets and slash in the text) the program does not stop here, but the variation is made empty and is proposed further as a variant.- else let !perms = decodeLConstraints argCs . genPermutationsL $ l in generalProcMMs recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2+ else let !perms = decodeLConstraints argCs . (if pairwisePermutations then genPairwisePermutationsLN else genPermutationsL) $ l in generalProcMMs syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2 {-| -- @ since 0.4.0.0@@ -235,6 +248,7 @@ | n == 5 = "(/ Ви вказали властивості(ість) та діапазон(и) для них такі, що для даних слів та їх сполучень варіантів немає. Спробуйте змінити параметри виклику програми (бібліотеки) /)" | n == 6 = "Якщо бажаєте запустити програму (функцію) рекурсивно, змінюючи сполучення слів та букв, введіть тут закодований рядок інтерпретатора. Якщо бажаєте не використовувати програму (функцію) рекурсивно, просто натисніть Enter. " | n == 7 = "Введіть, будь ласка, рядок слів для аналізу. "+ | n == 8 = "Введіть, будь ласка, кількість слів чи їх сполучень, які програма розглядатиме як один рядок для аналізу. " | otherwise = "Ви вказали лише один варіант властивостей. " messageInfo n False | n == 1 = "You stopped the program, please, if needed, run it again with better arguments. "@@ -244,6 +258,7 @@ | n == 5 = "(/ You have specified properties / property and the range(s) so that for the words and their concatenations there are no variants available. Try to change the call parameters /)" | n == 6 = "If you would like to run the program (call the function) recursively with changes for the words or letter connections then, please, enter here the encoded string of the interpreter. If you would NOT like to use it recursively, then just press Enter." | n == 7 = "Please, input the text line for analysis. "+ | n == 8 = "Please, input the number of words or their concatenations that the program takes as one line for analysis. " | otherwise = "You have specified just one variant of the properties. " -- |@@ -267,10 +282,12 @@ putStrLn ts >> return ts interactivePrintResultRecursive- :: Bool+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set. -> Bool -> Bool -> Bool+ -> Bool -> [String] -> Coeffs2 -> Coeffs2@@ -279,7 +296,7 @@ -> [String] -> Bool -> IO String-interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX f xss args lstW2+interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX f xss args lstW2 | null xss = (putStrLn . messageInfo 5 $ nativeUkrainian) >> return "" | otherwise = do let !datas = map (\(idx,str) -> show idx `mappend` ('\t' : str)) . trans232 . map f $ xss@@ -294,9 +311,15 @@ if null stringInterpreted then putStrLn ts >> return ts else do let strIntrpr = convStringInterpreter stringInterpreted ts- wordsNN = take 7 . words $ strIntrpr !firstArgs = takeWhile (not . all isLetter) args- generalProc2 recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX (firstArgs `mappend` wordsNN) lstW2+ putStrLn strIntrpr+ wordsNN <-+ if pairwisePermutations then do+ putStrLn . messageInfo 8 $ nativeUkrainian+ mStr <- getLine+ let m = fromMaybe 10 (readMaybe mStr::Maybe Int) in return . take m . words $ strIntrpr+ else return . take 7 . words $ strIntrpr+ generalProc2 syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX (firstArgs `mappend` wordsNN) lstW2 printWarning :: Bool -> String -> IO String printWarning nativeUkrainian xs = do@@ -305,29 +328,39 @@ getLine generalProcMs- :: Coeffs2+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations. -> Coeffs2+ -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int],Int,Int,String) -> IO [Result [] Char Double Double]-generalProcMs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice) = do- if compare numberI 2 == LT then let !frep2 = if take 1 choice == "x" || take 1 choice == "w" then chooseMax id coeffsWX choice else chooseMax id coeffs choice- in return . fst . maximumGroupsClassificationR arg0 . map (toResultR frep2) . uniquenessVariants2GNBL ' ' id id id perms $ subs+generalProcMs syllableDurationsDs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice) = do+ if compare numberI 2 == LT then let !frep2 = if take 1 choice == "x" || take 1 choice == "w" || (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["x","w"])) then chooseMax syllableDurationsDs id coeffsWX choice else chooseMax syllableDurationsDs id coeffs choice+ in return . fst . maximumGroupsClassificationR arg0 . map (toResultR frep2) .+ uniquenessVariants2GNBL ' ' id id id perms $ subs else do let !variants1 = uniquenessVariants2GNBL ' ' id id id perms subs- !frep20 = if take 1 choice == "x" || take 1 choice == "w" then chooseMax id coeffsWX choice else chooseMax id coeffs choice+ !frep20+ | take 1 choice == "x" || take 1 choice == "w" ||+ (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["x","w"])) = chooseMax syllableDurationsDs id coeffsWX choice+ | otherwise = chooseMax syllableDurationsDs id coeffs choice (!minE,!maxE) = minMax11C . map (toPropertiesF' frep20) $ variants1- !frep2 = if take 1 choice == "x" || take 1 choice == "w" then chooseMax (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) coeffsWX choice else chooseMax (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) coeffs choice+ !frep2+ | take 1 choice == "x" || take 1 choice == "w" ||+ (take 1 choice == "H" && (drop 1 (take 2 choice) `elem` ["x","w"])) = chooseMax syllableDurationsDs (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) coeffsWX choice+ | otherwise = chooseMax syllableDurationsDs (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) coeffs choice return . fst . maximumGroupsClassificationR arg0 . map (toResultR frep2) $ variants1 -- | -- @ since 0.3.0.0 The result is not 'IO' (), but 'IO' 'String'. The type also changed generally. generalProcMMs- :: Bool+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set. -> Bool -> Bool -> Bool+ -> Bool -> [String] -> Coeffs2 -> Coeffs2@@ -337,15 +370,15 @@ -> [String] -> Bool -> IO String-generalProcMMs recursiveMode nativeUkrainian interactiveMM jstL0 args0 coeffs coeffsWX rs perms subs args lstW2 =+generalProcMMs syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactiveMM jstL0 args0 coeffs coeffsWX rs perms subs args lstW2 = case length rs of 0 -> putStrLn (messageInfo 4 nativeUkrainian) >> return "" 1 -> putStrLn (messageInfo 5 nativeUkrainian) >> do- temp <- generalProcMs coeffs coeffsWX perms subs (head rs)- finalProc recursiveMode nativeUkrainian interactiveMM jstL0 args0 coeffs coeffsWX line temp args lstW2+ temp <- generalProcMs syllableDurationsDs coeffs coeffsWX perms subs (head rs)+ finalProc syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactiveMM jstL0 args0 coeffs coeffsWX line temp args lstW2 _ -> do- genVariants <- mapM (generalProcMs coeffs coeffsWX perms subs) rs- finalProc recursiveMode nativeUkrainian interactiveMM jstL0 args0 coeffs coeffsWX id (foldlI . map (map line) $ genVariants) args lstW2+ genVariants <- mapM (generalProcMs syllableDurationsDs coeffs coeffsWX perms subs) rs+ finalProc syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactiveMM jstL0 args0 coeffs coeffsWX id (foldlI . map (map line) $ genVariants) args lstW2 foldlI :: [[String]] -> [String] foldlI (xs:ys:xss) = foldlI (intersectInterResults xs ys : xss)@@ -355,10 +388,12 @@ -- | -- @ since 0.3.0.0 The result is not 'IO' (), but 'IO' 'String'. The type also changed generally. finalProc- :: Bool+ :: [[[[S.UZPP2]]] -> [[Double]]] -- ^ Whether to use the own provided durations.+ -> Bool -- ^ Whether to use just pairwise permutations, or the full universal set. -> Bool -> Bool -> Bool+ -> Bool -> [String] -> Coeffs2 -> Coeffs2@@ -367,9 +402,10 @@ -> [String] -> Bool -> IO String-finalProc recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX f xss args lstW2- | recursiveMode = interactivePrintResultRecursive recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX f xss args lstW2- | otherwise = if interactive then interactivePrintResult nativeUkrainian f xss else putStrLn ts >> return ts+finalProc syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX f xss args lstW2+ | recursiveMode = interactivePrintResultRecursive syllableDurationsDs pairwisePermutations recursiveMode nativeUkrainian interactive jstL0 args0 coeffs coeffsWX f xss args lstW2+ | interactive = interactivePrintResult nativeUkrainian f xss+ | otherwise = putStrLn ts >> return ts where ts = concatMap (\t -> f t `mappend` newLineEnding) xss -- |
Phonetic/Languages/Simplified/Array/Ukrainian/FuncRep2RelatedG2.hs view
@@ -15,10 +15,14 @@ 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) -- | Allows to choose the variant of the computations in case of usual processment.-chooseMax :: (Ord c) => (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c-chooseMax g coeffs choice+-- 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 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 | getBFstL' False (zip ["02y","02z","03y","03z","04y","04z","0y","0z","I01","I02","I03","I04","I11", "I12","I12","I13","I14","I21","I22","I23","I24","I31","I32","I33","I34","I41","I42","I43","I44",@@ -107,5 +111,7 @@ -- | Allows to choose precision in the Numeric.showFDouble function being given a choice parameter. precChoice :: String -> Maybe Int precChoice = getBFstL' (Just 4) [("02y",Just 0),("02z",Just 0),("03y",Just 0),("03z",Just 0),("04y",Just 0),- ("04z",Just 0),("0y",Just 0),("0z",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)]+ ("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)]
+ Phonetic/Languages/Simplified/Array/Ukrainian/ReadProperties.hs view
@@ -0,0 +1,73 @@+-- |+-- Module : Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties+-- Copyright : (c) OleksandrZhabenko 2021+-- License : MIT+-- Stability : Experimental+-- Maintainer : olexandr543@yahoo.com+--+-- Functions to read the properties data from the files with the special Haskell-like syntaxis.++{-# LANGUAGE BangPatterns #-}++module Phonetic.Languages.Simplified.Array.Ukrainian.ReadProperties where++import CaseBi.Arr (getBFstL')+import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2+import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2+import Languages.Phonetic.Ukrainian.Syllable.Double.Arr+import Text.Read (readMaybe)+import Data.Maybe+import Interpreter.StringConversion+import Languages.Phonetic.Ukrainian.Syllable.Arr (UZPP(..),UZPP2,PhoneticType(..))++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]++{-|+\"[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+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.++-}+readUZPP2ToDouble :: String -> (Double,[(UZPP2, Double)])+readUZPP2ToDouble xs+ | null xs = (1.0,zip uzpp2s . replicate 10000 $ 1.0)+ | otherwise =+ let wws = lines xs+ dbls = map (\ks -> readMaybe ks::Maybe Double) wws+ dbH+ | null dbls || all isNothing dbls = 1.0+ | 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))+ in (firstD,lsts)++divide2SDDs :: String -> [String]+divide2SDDs ys+ | null tss = [unlines kss]+ | otherwise = unlines kss : divide2SDDs (unlines rss)+ where wwss = lines ys+ (kss,tss) = break (any (=='*')) wwss+ rss = dropWhile (any (== '*')) tss++readSyllableDurations :: FilePath -> IO [[[[UZPP2]]] -> [[Double]]]+readSyllableDurations file = do+ xs <- readFileIfAny file+ let yss = take 9 . divide2SDDs $ xs+ readData = map readUZPP2ToDouble yss+ return . map (\(d,zs) -> syllableDurationsGD (getBFstL' d zs)) $ readData
README view
@@ -2,12 +2,20 @@ of the package phonetic-languages-simplified-examples-array in Ukrainian is here: -https://oleksandrzhabenko.github.io/uk/InstructionUkr.12.1.pdf+https://oleksandrzhabenko.github.io/uk/InstructionUkr.13.pdf +or here:++https://web.archive.org/web/20211014194920/https://oleksandrzhabenko.github.io/uk/InstructionUkr.13.pdf+ The instruction in English is here: -https://oleksandrzhabenko.github.io/uk/InstructionEng.12.1.pdf+https://oleksandrzhabenko.github.io/uk/InstructionEng.13.pdf +or here:++https://web.archive.org/web/20211014195109/https://oleksandrzhabenko.github.io/uk/InstructionEng.13.pdf+ Since the version 0.2.0.0 there exists also comparative mode for the rewritePoemG3 executable. It allows to create from two files with the text variants the new one.@@ -44,6 +52,15 @@ Since the version 0.8.0.0 added new weighted properties. +Since the version 0.13.0.0 added the pairwise permutations+mode (with +p command line argument) where just pairwise+permutations are used and the length of the line can be+up to 10 words or their concatenations.+Besides added the possibility to specify your own durations+using the +d <path to the file with ordered durations>+command line arguments. They are used with H... properties,+e. g. Hw04, Hw02, Hx36 etc.+ * Examples of usage 1) lineVariantsG3:@@ -146,3 +163,8 @@ compatible with the contstraints so should be used not simultaneously with them (because they change their meaning).++Since the 0.13.0.0 version there is the possibility also to provide your+own functions for the syllable durations. They are read from the file with+special Haskell-like syntaxis. For more information, please, refer to the+instructions above.
Simple/Main.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Main--- Copyright : (c) OleksandrZhabenko 2020+-- Copyright : (c) OleksandrZhabenko 2020-2021 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com@@ -33,8 +33,11 @@ -- ask you additional question before proceeding. The \"+m\" ... \"-m\" and \"+a\" ... \"-a\" groups must not mutually intersect one another. main :: IO () main = do- args0000 <- getArgs- let args000 = filter (not . null) (takeWhile (\xs -> take 2 xs /= "*t") args0000 `mappend` (drop 1 . dropWhile (\xs -> take 2 xs /= "^t") $ args0000))+ args50 <- getArgs+ let args0000 = filter (/= "+p") . (\xss -> takeWhile (/= "+d") xss `mappend` drop 2 (takeWhile (/= "+d") xss)) $ args50+ pairwisePermutations = any (== "+p") args50+ fileDu = concat . drop 1 . take 2 . dropWhile (/= "+d") $ args50+ args000 = filter (not . null) (takeWhile (\xs -> take 2 xs /= "*t") args0000 `mappend` (drop 1 . dropWhile (\xs -> take 2 xs /= "^t") $ args0000)) textProcessmentFssFs = drop 1 . dropWhile (\xs -> take 2 xs /= "*t") . takeWhile (\xs -> take 2 xs /= "^t") $ args0000 textProcessment0 = concat . filter (\xs -> take 2 xs == "*t") $ args0000 textProcessment1 = fromMaybe 70 (readMaybe (drop 2 textProcessment0)::Maybe Int)@@ -56,5 +59,5 @@ coeffsWX = readCF . drop 2 . concat . take 1 . filter (\xs -> take 2 xs == "+x") $ args00 -- The command line argument that starts with \"+x\". textProcessmentFss0 <- mapM (readFileIfAny) textProcessmentFssFs let textProcessmentFss = filter (not . null) textProcessmentFss0- if isPair coeffs then generalProc3G textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW- else generalProc3G textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW+ if isPair coeffs then generalProc3G fileDu pairwisePermutations textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW+ else generalProc3G fileDu pairwisePermutations textProcessmentFss textProcessment0 textProcessment1 recursiveMode nativeUkrainian toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW
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.12.1.0+version: 0.13.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@@ -17,36 +17,36 @@ cabal-version: >=1.10 library- exposed-modules: Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simple, Phonetic.Languages.Lines, Phonetic.Languages.GetTextualInfo, Phonetic.Languages.Parsing+ 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.1.2 && <1, phonetic-languages-simplified-base >=0.1 && <1, phonetic-languages-simplified-properties-array >=0.8.1 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.4.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-permutations-array >= 0.1 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-simplified-examples-common >=0.1.4 && <1, mmsyn2-array >= 0.1.3 && <1, string-interpreter >=0.5.2 && <1+ build-depends: base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.1.2 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.9.2 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.4.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.2 && <1, mmsyn2-array >= 0.1.3 && <1, string-interpreter >=0.5.4.1 && <1 -- hs-source-dirs: default-language: Haskell2010 executable lineVariantsG3 main-is: Main.hs- other-modules: Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simple, Phonetic.Languages.Parsing+ 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.1.2 && <1, phonetic-languages-simplified-base >=0.1 && <1, phonetic-languages-simplified-properties-array >=0.8.1 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-plus >=0.4.1 && <1, subG >=0.4 && < 1, mmsyn2-array >= 0.1.3 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-permutations-array >= 0.1 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-simplified-examples-common >=0.1.4 && <1, string-interpreter >=0.5.2 && <1, mmsyn2-array >= 0.1.3 && <1+ build-depends: base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.1.2 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.9.2 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-plus >=0.4.1 && <1, subG >=0.4 && < 1, mmsyn2-array >= 0.1.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.2 && <1, string-interpreter >=0.5.4.1 && <1, mmsyn2-array >= 0.1.3 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Simple default-language: Haskell2010 executable rewritePoemG3 main-is: Main.hs- other-modules: Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Lines, Phonetic.Languages.Parsing+ 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.1.2 && <1, phonetic-languages-simplified-base >=0.1 && <1, phonetic-languages-simplified-properties-array >=0.8.1 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-plus >=0.4.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.1 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-simplified-examples-common >=0.1.4 && <1, mmsyn2-array >= 0.1.3 && <1, string-interpreter >=0.5.2 && <1+ build-depends: base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.1.2 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.9.2 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-plus >=0.4.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.2 && <1, mmsyn2-array >= 0.1.3 && <1, string-interpreter >=0.5.4.1 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Lines default-language: Haskell2010 executable propertiesTextG3 main-is: Main.hs- other-modules: Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.GetTextualInfo, Phonetic.Languages.Parsing+ 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.1.2 && <1, phonetic-languages-simplified-base >=0.1 && <1, phonetic-languages-simplified-properties-array >=0.8.1 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.4.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.9.1 && <1, phonetic-languages-permutations-array >= 0.1 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, phonetic-languages-simplified-examples-common >=0.1.4 && <1, mmsyn2-array >= 0.1.3 && <1+ build-depends: base >=4.8 && <4.16, ukrainian-phonetics-basic-array >=0.1.2 && <1, phonetic-languages-simplified-base >=0.3 && <1, phonetic-languages-simplified-properties-array >=0.9.2 && <1, phonetic-languages-ukrainian-array >=0.6.1 && <1, phonetic-languages-filters-array >=0.1 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.4.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.2 && <1, mmsyn2-array >= 0.1.3 && <1, string-interpreter >=0.5.4.1 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., GetInfo default-language: Haskell2010