packages feed

phonetic-languages-simplified-generalized-examples-array 0.8.1.0 → 0.9.0.0

raw patch · 6 files changed

+163/−36 lines, 6 filesdep +string-interpreterdep ~phonetic-languages-simplified-generalized-properties-arrayPVP ok

version bump matches the API change (PVP)

Dependencies added: string-interpreter

Dependency ranges changed: phonetic-languages-simplified-generalized-properties-array

API changes (from Hackage documentation)

+ Phonetic.Languages.General.Simple: interactivePrintResultRecursive :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
- Phonetic.Languages.General.Simple: finalProc :: Bool -> (a -> String) -> [a] -> IO String
+ Phonetic.Languages.General.Simple: finalProc :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
- Phonetic.Languages.General.Simple: generalProc2 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO String
+ Phonetic.Languages.General.Simple: generalProc2 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO String
- Phonetic.Languages.General.Simple: generalProc2G :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> FilePath -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
+ Phonetic.Languages.General.Simple: generalProc2G :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> FilePath -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
- Phonetic.Languages.General.Simple: generalProcMMs :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Bool -> Coeffs2 -> Coeffs2 -> [([Int], Int, Int, String)] -> [Array Int Int] -> [String] -> IO String
+ Phonetic.Languages.General.Simple: generalProcMMs :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [([Int], Int, Int, String)] -> [Array Int Int] -> [String] -> [String] -> Bool -> IO String

Files

ChangeLog.md view
@@ -96,3 +96,11 @@  * Eigth version revised A. Fixed issue with the wrong order and, therefore, mapping for different choices and the corresponding properties in the module Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2.++## 0.9.0.0 -- 2021-08-16++* Ninth version. Added new properties that try to increase the importance of the ending of the line and decrease+the importance of the beginning of the line. Added new dependency of string-interpreter. Added the possibility+to run Phonetic.Languages.General.Simple module functions in the recursive interactive mode. It is not+compatible with the contstraints so should be used not simultaneously with them (because they change their meaning).+Some documentation improvements.
Phonetic/Languages/General/Simple.hs view
@@ -26,7 +26,7 @@ import Phonetic.Languages.Simplified.StrictVG.Base import Data.Phonetic.Languages.Base import Data.Phonetic.Languages.PrepareText-import Data.Char (isDigit,isAlpha)+import Data.Char (isDigit,isAlpha,isLetter) import qualified Data.List  as L (span,sort,zip4,isPrefixOf,nub) import Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2 import Phonetic.Languages.Permutations.Arr@@ -38,6 +38,7 @@ import Phonetic.Languages.General.SimpleConstraints import Phonetic.Languages.General.Common import Data.Phonetic.Languages.Syllables+import Interpreter.StringConversion (convStringInterpreter)   forMultiplePropertiesF :: [String] -> [(String,[String])]@@ -68,6 +69,7 @@  -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.  -> String  -> FilePath+ -> Bool -- ^ Whether to run in the recursive mode.  -> Bool  -> Bool  -> [String]@@ -76,16 +78,17 @@  -> [String]  -> Bool  -> IO ()-generalProc2G wrs ks arr gs js vs h qs ysss ws toFile1 interactive jstL0 args0 coeffs coeffsWX args lstW2+generalProc2G wrs ks arr gs js vs h qs ysss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2  | variations args = do     let !zsss = transformToVariations args     print zsss-    variantsG <- mapM (\xss -> generalProc2 wrs ks arr gs js vs h qs ysss ws interactive jstL0 args0 coeffs coeffsWX xss lstW2) zsss-    interactivePrintResult id variantsG >>= \rs ->+    variantsG <- mapM (\xss -> generalProc2 wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX xss lstW2) zsss+    (if recursiveMode then interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX id variantsG args lstW2+     else interactivePrintResult id variantsG) >>= \rs ->       case toFile1 of        "" -> return ()        ~fileName -> appendFile fileName (rs `mappend` newLineEnding)- | otherwise = generalProc2 wrs ks arr gs js vs h qs ysss ws interactive jstL0 args0 coeffs coeffsWX args lstW2 >>= \rs ->+ | otherwise = generalProc2 wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 >>= \rs ->       case toFile1 of        "" -> return ()        ~fileName -> appendFile fileName (rs `mappend` newLineEnding)@@ -109,6 +112,7 @@   -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to  -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.   -> String+  -> Bool -- ^ Whether to run in the recursive mode.   -> Bool   -> Bool   -> [String]@@ -117,7 +121,7 @@   -> [String]   -> Bool   -> IO String-generalProc2 wrs ks arr gs js vs h qs ysss ws interactive jstL0 args0 coeffs coeffsWX args lstW2 = do+generalProc2 wrs ks arr gs js vs h qs ysss ws recursiveMode 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@@ -131,18 +135,21 @@        !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 = chooseMax wrs ks arr gs js vs id h coeffs qs choice in let !wwss = (:[]) . toResultR frep20 $ xs in-    if interactive then interactivePrintResult line wwss else print1el jstL0 choice wwss+    if recursiveMode then interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2+    else if interactive then interactivePrintResult line wwss else print1el jstL0 choice wwss    else do     let !subs = subG (' ':js `mappend` vs) xs     if null argCs then let !perms = genPermutationsL l in do           temp <- generalProcMs wrs ks arr gs js vs h qs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)-          if interactive then interactivePrintResult line temp else print1el jstL0 choice temp+          if recursiveMode then interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line temp args lstW2+          else if interactive then interactivePrintResult line temp else print1el jstL0 choice temp     else do      correct <- printWarning xs      if correct == "n" then putStrLn (messageInfo 1) >> 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 wrs ks arr gs js vs h qs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)-          if interactive then interactivePrintResult line temp else print1el jstL0 choice temp+          if recursiveMode then interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line temp args lstW2+          else if interactive then interactivePrintResult line temp else print1el jstL0 choice temp   else do    let !choices = map fst argMss        !numericArgss = map snd argMss@@ -158,16 +165,18 @@           takeWhile (/= "-a") $ args0)    if compare l 2 == LT then let !frep20 = chooseMax wrs ks arr gs js vs id h coeffs qs (concat . take 1 $ choices) in     let !wwss = (:[]) . toResultR frep20 $ xs in-       if interactive then interactivePrintResult line wwss-       else print1el jstL0 (concat . take 1 $ choices) wwss+       if recursiveMode then interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2+       else if interactive then interactivePrintResult line wwss+            else print1el jstL0 (concat . take 1 $ choices) wwss    else do     let !subs = subG (' ':js `mappend` vs) xs-    if null argCs then let !perms = genPermutationsL l in generalProcMMs wrs ks arr gs js vs h qs interactive coeffs coeffsWX argsZipped perms subs+    if null argCs then let !perms = genPermutationsL l in+      generalProcMMs wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2     else do      correct <- printWarning xs      if correct == "n" then putStrLn (messageInfo 1) >> 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 wrs ks arr gs js vs h qs interactive coeffs coeffsWX argsZipped perms subs+            generalProcMMs wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2  -- | Function provides message information. messageInfo :: Int -> String@@ -177,12 +186,13 @@  | n == 3 = "Please, check whether the line below corresponds and is consistent with the constraints you have specified between the +a and -a options. Check also whether you have specified the \"+b\" or \"+bl\" option(s). If it is inconsistent then enter further \"n\", press Enter and then run the program again with better arguments. " `mappend` newLineEnding `mappend` "If the line is consistent with your input between +a and -a then just press Enter to proceed further. " `mappend` newLineEnding  | n == 4 = "No data has been specified to control the computation process. "  | 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."  | otherwise = "You have specified just one variant of the properties. "  -- | interactivePrintResult :: (a -> String) -> [a] -> IO String interactivePrintResult f xss-  | null xss = putStrLn "" >> return ""+  | null xss = (putStrLn . messageInfo $ 5) >> return ""   | otherwise = do      let !datas = map (\(idx,str) -> show idx `mappend` ('\t' : str)) . trans232 . map f $ xss      if null datas then (putStrLn . messageInfo $ 5) >> return ""@@ -195,6 +205,54 @@           !ts = drop 1 . dropWhile (/= '\t') $ lineRes       putStrLn ts >> return ts +interactivePrintResultRecursive+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+ -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+ -> SegmentRulesG+ -> String+ -> String+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> String+ -> Bool -- ^ Whether to run in the recursive mode.+ -> Bool+ -> Bool+ -> [String]+ -> Coeffs2+ -> Coeffs2+ -> (a -> String)+ -> [a]+ -> [String]+ -> Bool+ -> IO String+interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2+  | null xss = (putStrLn . messageInfo $ 5) >> return ""+  | otherwise = do+     let !datas = map (\(idx,str) -> show idx `mappend` ('\t' : str)) . trans232 . map f $ xss+     mapM_ putStrLn datas+     putStrLn ""+     putStrLn . messageInfo $ 2+     number <- getLine+     let !lineRes = concat . filter ((number `mappend` "\t")`L.isPrefixOf`) $ datas+         !ts = drop 1 . dropWhile (/= '\t') $ lineRes+     putStrLn . messageInfo $ 6+     stringInterpreted <- getLine+     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 wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (firstArgs `mappend` wordsNN) lstW2+ printWarning :: String -> IO String printWarning xs = do   putStrLn . messageInfo $ 3@@ -261,7 +319,13 @@  -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the   -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most   -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> String+ -> Bool -- ^ Whether to run in the recursive mode.  -> Bool+ -> Bool+ -> [String]  -> Coeffs2 -- ^ This value is used when property choice is NOT from the \"w\" or \"x\" lines.  -> Coeffs2 -- ^ This value is used when property choice is from the \"w\" or \"x\" lines.  -> [([Int],Int,Int,String)] -- ^ The 'String' is intended to be one of the following strings: \"02y\", \"02z\", \"03y\", \"03z\", \"04y\", \"04z\",@@ -273,16 +337,18 @@  -- Changed the arguments signing so that capital letters changed to the small ones, double ++ changed to just singular +.  -> [Array Int Int] -- ^ Permutations data.  -> [String]+ -> [String]+ -> Bool  -> IO String-generalProcMMs wrs ks arr gs js vs h qs interactiveMM coeffs coeffsWX rs perms subs =+generalProcMMs wrs ks arr gs js vs h qs ysss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX rs perms subs args lstW2 =  case length rs of   0 -> putStrLn (messageInfo 4) >> return ""   1 -> putStrLn (messageInfo 5) >> do         temp <- generalProcMs wrs ks arr gs js vs h qs coeffs coeffsWX perms subs (head rs)-        finalProc interactiveMM line temp+        finalProc wrs ks arr gs js vs h qs ysss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX line temp args lstW2   _ -> do          genVariants <- mapM (generalProcMs wrs ks arr gs js vs h qs coeffs coeffsWX perms subs) rs-         finalProc interactiveMM id . foldlI . map (map line) $ genVariants+         finalProc wrs ks arr gs js vs h qs ysss ws recursiveMode 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)@@ -290,8 +356,38 @@ foldlI _ = []  -- |-finalProc :: Bool -> (a -> String) -> [a] -> IO String-finalProc bool f xss = if bool then interactivePrintResult f xss else putStrLn ts >> return ts+finalProc+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+  -- (e. g. allophones). Must be sorted in the ascending order to be used correctly.+ -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly.+ -> SegmentRulesG+ -> String+ -> String+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+  -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+  -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> String+ -> Bool -- ^ Whether to run in the recursive mode.+ -> Bool+ -> Bool+ -> [String]+ -> Coeffs2+ -> Coeffs2+ -> (a -> String)+ -> [a]+ -> [String]+ -> Bool+ -> IO String+finalProc  wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2+ | recursiveMode = interactivePrintResultRecursive wrs ks arr gs js vs h qs ysss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2+ | otherwise = if interactive then interactivePrintResult f xss else putStrLn ts >> return ts   where ts = concatMap (\t -> f t `mappend` newLineEnding) xss  -- |
Phonetic/Languages/General/Simple/Parsing.hs view
@@ -61,14 +61,16 @@   -- exact one and, therefore, the default one.  -> IO () argsToSimplePrepare h qs = do- args000 <- getArgs- let (!args14,!args00) = splitAt 4 args000+ args0000 <- getArgs+ let args000 = filter (/= "+r") args0000+     recursiveMode = any (== "+r") args0000 -- Specifies whether to use the interactive recursive mode+     (!args14,!args00) = splitAt 4 args000      [fileGWrSys, controlFile, segmentRulesFile, concatenationsFileP] = args14  (gwrsCnts, controlConts, segmentData, concatenationsFile, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW) <- argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP args00- let (wrs, ks, arr, gs, js, vs, ysss, ws) = innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFile - if isPair coeffs then generalProc2G wrs ks arr gs js vs h qs ysss ws {- old arguments follow -} toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW- else generalProc2G wrs ks arr gs js vs h qs ysss ws toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW- + let (wrs, ks, arr, gs, js, vs, ysss, ws) = innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFile+ if isPair coeffs then generalProc2G wrs ks arr gs js vs h qs ysss ws {- old arguments follow -} toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW+ else generalProc2G wrs ks arr gs js vs h qs ysss ws toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX args lstW+ -- | Similar to the 'argsToSimplePrepare' function, but takes explicitly the four 'FilePath's for the files -- respectively and the last argument the 'String' with all the other specifications. If it is not proper, -- the functions returns an error.@@ -87,20 +89,22 @@  -> String -- ^ A 'String' of data that are the further command line arguments for the function 'argsToSimplePrepare'.  -> IO () argsToSimplePrepare4Files fileGWrSys controlFile segmentRulesFile concatenationsFileP h qs other_args = do- let args000 = words other_args-     args00 = drop 4 args000+ let args0000 = words other_args+     args000 = drop 4 args0000+     args00 = filter (/= "+r") args000+     recursiveMode = any (== "+r") args000 -- Specifies whether to use the interactive recursive mode  (gwrsCnts, controlConts, segmentData, concatenationsFile, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW) <- argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP args00- let (wrs, ks, arr, gs, js, vs, ysss, ws) = innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFile - if isPair coeffs then generalProc2G wrs ks arr gs js vs h qs ysss ws {- old arguments follow -} toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW- else generalProc2G wrs ks arr gs js vs h qs ysss ws toFileMode1 interactiveP jstL0 args0 coeffs coeffsWX args lstW- + let (wrs, ks, arr, gs, js, vs, ysss, ws) = innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFile+ if isPair coeffs then generalProc2G wrs ks arr gs js vs h qs ysss ws {- old arguments follow -} toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW+ else generalProc2G wrs ks arr gs js vs h qs ysss ws toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX args lstW+ innerProcessmentSimple   :: String -- ^ Must be a valid 'GWritingSystemPRPLX' specifications 'String' representation only (see the gwrsysExample.txt file in the @phonetic-languages-phonetics-basics@ package as a schema);   -> String -- ^ Must be a 'String' with the 5 meaningful lines that are delimited with the \'~\' line one from another with the specifications for the possible allophones (if any), 'CharPhoneticClassification', white spaces information (two 'String's) and the 'String' of all the possible 'PLL' 'Char's;   -> String -- ^ Must be a 'String' with the 'SegmentRulesG' specifications only;   -> String -- ^ Must be a 'String' with the 'Concatenations' specifications only (see the data in the EnglishConcatenated.txt file in the @phonetic-languages-phonetics-basics@ package as a list of English equivalents of the needed 'String's).   -> (GWritingSystemPRPLX, [(Char, Char)], CharPhoneticClassification, SegmentRulesG, String, String, Concatenations, String)-innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFile = +innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFile =  let [allophonesGs, charClfs, jss, vss, wss] = groupBetweenChars '~' . lines $ controlConts      wrs = getGWritingSystem '~' gwrsCnts      ks = sort . fromMaybe [] $ (readMaybe (unwords allophonesGs)::Maybe [(Char, Char)])
Phonetic/Languages/Simplified/Array/General/FuncRep2RelatedG2.hs view
@@ -77,7 +77,23 @@   -> FuncRep2 String Double c chooseMaxG k wrs ks arr gs us vs g h coeffs xs choice  | take 1 choice `elem` ["c","C","N"] = procRhythmicity23F k g h choice coeffs wrs ks arr gs us vs- | getBFstL' False (zip ["02y","02z","03y","03z","04y","04z","0y","0z","S01","S02","S03","S04","S11",+ | 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",+     "I51","I52","I53","I54","I61","I62","I63","I64","I71","I72","I74","J01","J02","J03","J04","J11",+     "J12","J13","J14","J21","J22","J23","J24","J31","J32","J33","J34","J41","J42","J43","J44","J51",+     "J52","J53","J54","J61","J62","J63","J64","J71","J72","J73","J74","K01","K02","K03","K04","K11",+     "K12","K13","K14","K21","K21","K22","K23","K24","K31","K32","K33","K34","K41","K42","K43","K44",+     "K51","K52","K53","K54","K61","K62","K63","K64","K71","K72","K73","K74","L01","L02","L03","L04",+     "L11","L12","L13","L14","L21","L22","L23","L24","L31","L32","L33","L34","L41","L42","L43","L44",+     "L51","L52","L53","L54","L61","L62","L63","L64","L71","L72","L74","O01","O02","O03","O04","O11",+     "O12","O13","O14","O21","O22","O23","O24","O31","O32","O33","O34","O41","O42","O43","O44","O51",+     "O52","O53","O54","O61","O62","O63","O64","O71","O72","O73","O74","P01","P02","P03","P04","P11",+     "P12","P13","P14","P21","P22","P23","P24","P31","P32","P33","P34","P41","P42","P43","P44","P51",+     "P52","P53","P54","P61","P62","P63","P64","P71","P72","P73","P74","Q01","Q02","Q03","Q04",+     "Q11","Q12","Q13","Q14","Q21","Q22","Q23","Q24","Q31","Q32","Q33","Q34","Q41","Q42","Q43","Q44",+     "Q51","Q52","Q53","Q54","Q61","Q62","Q63","Q64","Q71","Q72","Q74","R01","R02","R03","R04","R11",+     "R12","R13","R14","R21","R22","R23","R24","R31","R32","R33","R34","R41","R42","R43","R44","R51",+     "R52","R53","R54","R61","R62","R63","R64","R71","R72","R73","R74","S01","S02","S03","S04","S11",      "S12","S12","S13","S14","S21","S22","S23","S24","S31","S32","S33","S34","S41","S42","S43","S44",      "S51","S52","S53","S54","S61","S62","S63","S64","S71","S72","S74","T01","T02","T03","T04","T11",      "T12","T13","T14","T21","T22","T23","T24","T31","T32","T33","T34","T41","T42","T43","T44","T51",
README.md view
@@ -76,7 +76,7 @@ Since the 0.5.0.0 version you can use also "w" and "x" series (lines) of properties. They use more complex approach and are intended for 4 elements in the rhythmic groups. For more information, please, refer to the section 'WX argument' in the English instruction:-https://web.archive.org/web/20210814202129/https://oleksandrzhabenko.github.io/uk/Eng-Ukrainian_as_a_Phonetic_Language_Instructions-0.8.0.0.pdf+https://web.archive.org/web/20210816195650/https://oleksandrzhabenko.github.io/uk/Eng-Ukrainian_as_a_Phonetic_Language_Instructions-0.9.0.0.pdf  There are also some additional information there about the changes in the 0.6.0.0 version. @@ -93,3 +93,6 @@ properties. This does not influence the general behavior of the functions.  Since the 0.8.0.0 version there are also new "weighted" properties lines used.++Since the 0.9.0.0 version there are also recursive interactive mode of the+Phonetic.Languages.General.Simple module functions.
phonetic-languages-simplified-generalized-examples-array.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-generalized-examples-array-version:             0.8.1.0+version:             0.9.0.0 synopsis:            Helps to create texts with the given phonetic properties (e. g. poetic). description:         Is rewritten from the modules of the @phonetic-languages-simplified-examples-array@ package. Can be used not only for Ukrainian, but also for other languages. homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-generalized-examples-array@@ -21,6 +21,6 @@   exposed-modules:     Phonetic.Languages.General.Lines, Phonetic.Languages.General.Parsing, Phonetic.Languages.General.Simple, Phonetic.Languages.General.GetTextualInfo, Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2, Phonetic.Languages.General.Simple.Parsing, Phonetic.Languages.General.Lines.Parsing, Phonetic.Languages.General.GetInfo.Parsing, EspeakNG_IPA   -- other-modules:   other-extensions:    BangPatterns, FlexibleContexts-  build-depends:       base >=4.8 && <4.15, phonetic-languages-simplified-generalized-examples-common >=0.2 && <1, subG >=0.4.2 && <1, phonetic-languages-simplified-generalized-properties-array >=0.6 && <1, phonetic-languages-simplified-base >=0.2 && <1, phonetic-languages-permutations-array >=0.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-phonetics-basics >=0.8.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.2 && <1, mmsyn2-array >=0.1.3 && <1, heaps >=0.3.6.1 && <1, mmsyn3 >=0.1.5 && <1, process >= 1.6.2 && <2+  build-depends:       base >=4.8 && <4.15, phonetic-languages-simplified-generalized-examples-common >=0.2 && <1, subG >=0.4.2 && <1, phonetic-languages-simplified-generalized-properties-array >=0.7 && <1, phonetic-languages-simplified-base >=0.2 && <1, phonetic-languages-permutations-array >=0.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-phonetics-basics >=0.8.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.2 && <1, mmsyn2-array >=0.1.3 && <1, heaps >=0.3.6.1 && <1, mmsyn3 >=0.1.5 && <1, process >= 1.6.2 && <2, string-interpreter >=0.2 && <1   -- hs-source-dirs:   default-language:    Haskell2010