phonetic-languages-simplified-generalized-examples-array 0.17.0.0 → 0.18.0.0
raw patch · 10 files changed
+299/−218 lines, 10 filesdep ~phonetic-languages-basisdep ~phonetic-languages-simplified-basedep ~phonetic-languages-simplified-generalized-examples-commonPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-basis, phonetic-languages-simplified-base, phonetic-languages-simplified-generalized-examples-common, phonetic-languages-simplified-generalized-properties-array
API changes (from Hackage documentation)
- Phonetic.Languages.General.Simple: foldlI :: [[String]] -> [String]
+ Phonetic.Languages.General.Simple: print2 :: (Show a1, Show a2, Num a3, Ord a1, Ord a2, Eq a3) => a3 -> [Result2 ReadyForConstructionPL a1 a2] -> IO ()
+ Phonetic.Languages.General.Simple: show2 :: (Show a1, Show a2, Num a3, Ord a1, Ord a2, Eq a3) => a3 -> [Result2 ReadyForConstructionPL a1 a2] -> String
- Phonetic.Languages.General.GetInfo.Parsing: argsToGetInfoProcessment :: (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> IO ()
+ Phonetic.Languages.General.GetInfo.Parsing: argsToGetInfoProcessment :: (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> IO ()
- Phonetic.Languages.General.GetInfo.Parsing: files4ArgsProcessment :: PermutationsType -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> [String] -> IO ()
+ Phonetic.Languages.General.GetInfo.Parsing: files4ArgsProcessment :: PermutationsType -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> [String] -> IO ()
- Phonetic.Languages.General.GetTextualInfo: generalProc :: PermutationsType -> (Int, Int) -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> String -> String -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()
+ Phonetic.Languages.General.GetTextualInfo: generalProc :: PermutationsType -> (Int, Int) -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> String -> String -> Bool -> [String] -> [String] -> Coeffs2 -> Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()
- Phonetic.Languages.General.GetTextualInfo: getData3 :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
+ Phonetic.Languages.General.GetTextualInfo: getData3 :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> [String] -> IO ()
- Phonetic.Languages.General.GetTextualInfo: process1Line :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()
+ Phonetic.Languages.General.GetTextualInfo: process1Line :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Bool -> Coeffs2 -> Coeffs2 -> Int -> Int -> String -> [String] -> Array Int [Array Int Int] -> String -> IO ()
- Phonetic.Languages.General.Lines: circle2 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]
+ Phonetic.Languages.General.Lines: circle2 :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> [String] -> [String]
- Phonetic.Languages.General.Lines: circle2I :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> Int -> [Int] -> Double -> Double -> [String] -> [String]
+ Phonetic.Languages.General.Lines: circle2I :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Coeffs2 -> Array Int [Array Int Int] -> String -> [String] -> Int -> [Int] -> Double -> Double -> [String] -> [String]
- Phonetic.Languages.General.Lines: generalProcessment :: PermutationsType -> (Int, Int) -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> String -> String -> Coeffs2 -> [String] -> [String] -> Int -> FilePath -> IO ()
+ Phonetic.Languages.General.Lines: generalProcessment :: PermutationsType -> (Int, Int) -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> String -> String -> Coeffs2 -> [String] -> [String] -> Int -> FilePath -> IO ()
- Phonetic.Languages.General.Lines.Parsing: argsToLinePrepare :: (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> IO ()
+ Phonetic.Languages.General.Lines.Parsing: argsToLinePrepare :: (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> IO ()
- Phonetic.Languages.General.Simple: finalProc :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
+ Phonetic.Languages.General.Simple: finalProc :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> Bool -> Int -> Int -> IO (ReadyForConstructionPL, String)
- Phonetic.Languages.General.Simple: generalProc2 :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO String
+ Phonetic.Languages.General.Simple: generalProc2 :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> Bool -> Int -> Int -> IO (ReadyForConstructionPL, String)
- Phonetic.Languages.General.Simple: generalProc2G :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> FilePath -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
+ Phonetic.Languages.General.Simple: generalProc2G :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> FilePath -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> Bool -> Int -> Int -> IO ()
- Phonetic.Languages.General.Simple: generalProc3G :: PermutationsType -> (String -> Bool) -> [String] -> String -> Int -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> FilePath -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> IO ()
+ Phonetic.Languages.General.Simple: generalProc3G :: PermutationsType -> (String -> Bool) -> [String] -> String -> Int -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> FilePath -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [String] -> Bool -> Bool -> Int -> Int -> IO ()
- Phonetic.Languages.General.Simple: generalProcMMs :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [([Int], String, Int, String)] -> [Array Int Int] -> [String] -> [String] -> Bool -> IO String
+ Phonetic.Languages.General.Simple: generalProcMMs :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> [([Int], String, Int, String)] -> [Array Int Int] -> [String] -> [String] -> Bool -> Bool -> Int -> Int -> IO (ReadyForConstructionPL, String)
- Phonetic.Languages.General.Simple: generalProcMs :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Coeffs2 -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int], String, Int, String) -> IO [Result [] Char Double Double]
+ Phonetic.Languages.General.Simple: generalProcMs :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> [MappingFunctionPL] -> Coeffs2 -> Coeffs2 -> [Array Int Int] -> [String] -> ([Int], String, Int, String) -> IO [Result2 ReadyForConstructionPL Double Double]
- Phonetic.Languages.General.Simple: interactivePrintResult :: (a -> String) -> [a] -> IO String
+ Phonetic.Languages.General.Simple: interactivePrintResult :: (a -> String) -> [a] -> Bool -> Int -> IO (ReadyForConstructionPL, String)
- Phonetic.Languages.General.Simple: interactivePrintResultRecursive :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> IO String
+ Phonetic.Languages.General.Simple: interactivePrintResultRecursive :: PermutationsType -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> [MappingFunctionPL] -> Concatenations -> Concatenations -> String -> Bool -> Bool -> Bool -> [String] -> Coeffs2 -> Coeffs2 -> (a -> String) -> [a] -> [String] -> Bool -> Bool -> Int -> Int -> IO (ReadyForConstructionPL, String)
- Phonetic.Languages.General.Simple: print1el :: Bool -> String -> [Result [] Char Double Double] -> IO String
+ Phonetic.Languages.General.Simple: print1el :: Bool -> String -> [Result2 ReadyForConstructionPL Double Double] -> IO (ReadyForConstructionPL, String)
- Phonetic.Languages.General.Simple.Parsing: argsProcessment :: FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> [String] -> IO (String, String, String, String, String, String, Bool, Bool, [String], Coeffs2, Coeffs2, [String], Bool)
+ Phonetic.Languages.General.Simple.Parsing: argsProcessment :: FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> [String] -> IO (String, String, String, String, String, String, Bool, Bool, [String], Coeffs2, Coeffs2, [String], Bool, Bool, Int, Int)
- Phonetic.Languages.General.Simple.Parsing: argsToSimplePrepare :: (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> (String -> Bool) -> IO ()
+ Phonetic.Languages.General.Simple.Parsing: argsToSimplePrepare :: (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> (String -> Bool) -> IO ()
- Phonetic.Languages.General.Simple.Parsing: argsToSimplePrepare4Files :: PermutationsType -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> String -> (String -> Bool) -> [String] -> String -> Int -> IO ()
+ Phonetic.Languages.General.Simple.Parsing: argsToSimplePrepare4Files :: PermutationsType -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> (Double -> String -> MappingFunctionPL) -> [MappingFunctionPL] -> String -> (String -> Bool) -> [String] -> String -> Int -> IO ()
- Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2: chooseMax :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> Coeffs2 -> [[[[PRS]]] -> [[Double]]] -> String -> FuncRep2 String Double c
+ Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2: chooseMax :: Ord c => GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> (Double -> String -> MappingFunctionPL) -> Coeffs2 -> [MappingFunctionPL] -> String -> String -> FuncRep2 ReadyForConstructionPL Double c
- Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2: chooseMaxG :: Ord c => Double -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> (Double -> String -> [[[PRS]]] -> [[Double]]) -> Coeffs2 -> [[[[PRS]]] -> [[Double]]] -> String -> FuncRep2 String Double c
+ Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2: chooseMaxG :: Ord c => Double -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> (Double -> c) -> (Double -> String -> MappingFunctionPL) -> Coeffs2 -> [MappingFunctionPL] -> String -> String -> FuncRep2 ReadyForConstructionPL Double c
Files
- ChangeLog.md +25/−0
- Phonetic/Languages/General/GetInfo/Parsing.hs +6/−8
- Phonetic/Languages/General/GetTextualInfo.hs +23/−21
- Phonetic/Languages/General/Lines.hs +25/−23
- Phonetic/Languages/General/Lines/Parsing.hs +4/−4
- Phonetic/Languages/General/Simple.hs +169/−127
- Phonetic/Languages/General/Simple/Parsing.hs +21/−17
- Phonetic/Languages/Simplified/Array/General/FuncRep2RelatedG2.hs +20/−12
- README.md +4/−4
- phonetic-languages-simplified-generalized-examples-array.cabal +2/−2
ChangeLog.md view
@@ -193,3 +193,28 @@ improved. Fixed some code bugs. Switched in calculations of the average values and standard deviation from population to sample versions (now the standard deviation is slightly higher). Fixed issues with multiple variations of the text mode if it is not used interactively.++## 0.18.0.0 -- 2022-08-09++* The eighteenth version. Added the new operation mode -- SaaW (syllable-as-a-whole) addititonally +to the previously defined PhoPaaW (phonetic-phenomena-as-a-whole) mode. Fixed some issues.+For more information see the documentation for the parallel project phonetic-languages-simplified-examples-array:++in Ukrainian:+https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.pdf++or here:++(try +https://web.archive.org/web/20220809192249/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.pdf).++In English is here:++https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.pdf++or here:++(try +https://web.archive.org/web/20220809192412/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.pdf).++
Phonetic/Languages/General/GetInfo/Parsing.hs view
@@ -40,13 +40,11 @@ -- 5) 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). These are to be appended to the previous word. -- argsToGetInfoProcessment- :: (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ :: (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -> IO () argsToGetInfoProcessment h qs = do args500 <- getArgs@@ -63,13 +61,13 @@ -> FilePath -- ^ With the 'SegmentRulesG' specifications only; -> FilePath -- ^ 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). These ones are to be prepended to the next word after them. -> FilePath -- ^ 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). These ones are to be prepended to the next word after them.- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- -- exact one and, therefore, the default one. -> [String] -- ^ List of other command line arguments -> IO () files4ArgsProcessment pairwisePermutations !fileGWrSys !controlFile !segmentRulesFile !concatenationsFileP !concatenationsFileA h qs args000 = do
Phonetic/Languages/General/GetTextualInfo.hs view
@@ -53,6 +53,7 @@ import Data.Phonetic.Languages.Base import Data.Phonetic.Languages.Syllables import qualified Phonetic.Languages.Permutations.Represent as R+import Phonetic.Languages.EmphasisG generalProc :: R.PermutationsType -- ^ Whether to use just one of the express permutations, or the full universal set.@@ -62,13 +63,13 @@ -- (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- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -130,13 +131,13 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> Bool -> 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.@@ -153,8 +154,9 @@ -> [String] -> [String] -> IO ()-getData3 pairwisePermutations wrs ks arr gs js vs h rs lstW coeffs coeffsWX gz printLine choice multiples3 zss =- let !permsV4 = case pairwisePermutations of+getData3 pairwisePermutations wrs ks arr gs js vs h rs lstW coeffs coeffsWX gz printLine choice0 multiples3 zss =+ let !choice = filter (/='a') choice0+ !permsV4 = case pairwisePermutations of R.P 2 -> genPairwisePermutationsArrLN 10 R.P 1 -> genElementaryPermutationsArrLN1 10 _ -> genPermutationsArrL in do@@ -169,13 +171,13 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of either 'PhoPaaW'-based or 'SaaW'-based (and not both ones) different functions that specifies the syllables durations in the PhoPaaW or SaaW mode respectively (the former one has been introduced earlier), analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one in case of 'PhoPaaW'-based ones must be probably the most+ -- exact one and, therefore, the default one. -> Bool -> 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.@@ -201,9 +203,9 @@ 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 == "w" || take 1 choice == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choice else chooseMax wrs ks arr gs js vs id h coeffs qs choice)) .- uniquenessVariants2GNBL ' ' id id id permsV5 $ v2, toTransPropertiesF' (if take 1 choice == "w" || take 1 choice == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choice else chooseMax wrs ks arr gs js vs id h coeffs qs choice) .- unwords . subG (' ':js `mappend` vs) $ v))+ ((!minE,!maxE),!data2) = runEval (parTuple2 rpar rpar (minMax11C . map (toTransPropertiesF'2 (if take 1 choice == "w" || take 1 choice == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choice "" else chooseMax wrs ks arr gs js vs id h coeffs qs choice "")) .+ map StrG . uniquenessVariants2GNBL ' ' id id id permsV5 $ v2, toTransPropertiesF'2 (if take 1 choice == "w" || take 1 choice == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choice "" else chooseMax wrs ks arr gs js vs id h coeffs qs choice "") .+ StrG . unwords . subG (' ':js `mappend` vs) $ 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"@@ -226,10 +228,10 @@ 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 == "w" || take 1 choiceMMs == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choiceMMs else chooseMax wrs ks arr gs js vs id h coeffs qs choiceMMs)) .- uniquenessVariants2GNBL ' ' id id id permsV5 $ v2,- toTransPropertiesF' (if take 1 choiceMMs == "w" || take 1 choiceMMs == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choiceMMs else chooseMax wrs ks arr gs js vs id h coeffs qs choiceMMs) .- unwords . subG (' ':js `mappend` vs) $ v,gz)) multiples4+ map (toTransPropertiesF'2 (if take 1 choiceMMs == "w" || take 1 choiceMMs == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choiceMMs "" else chooseMax wrs ks arr gs js vs id h coeffs qs choiceMMs "")) .+ map StrG . uniquenessVariants2GNBL ' ' id id id permsV5 $ v2,+ toTransPropertiesF'2 (if take 1 choiceMMs == "w" || take 1 choiceMMs == "x" then chooseMax wrs ks arr gs js vs id h coeffsWX qs choiceMMs "" else chooseMax wrs ks arr gs js vs id h coeffs qs choiceMMs "") .+ StrG . unwords . subG (' ':js `mappend` vs) $ 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/General/Lines.hs view
@@ -44,6 +44,7 @@ import Phonetic.Languages.General.Common import Interpreter.StringConversion import qualified Phonetic.Languages.Permutations.Represent as R+import Phonetic.Languages.EmphasisG {-| @ since 0.12.0.0 -- Changed the arguments. Now it can run multiple rewritings for the one given data file on the given list of choices for the properties given as the second ['String'] argument. Every new file is being@@ -57,13 +58,13 @@ -- (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- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))-- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL)-- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -77,9 +78,10 @@ -> Int -> FilePath -> IO ()-generalProcessment pairwisePermutations (gr1,gr2) wrs ks arr gs h rs ysss zzzsss xs js vs coeffs numericArgs choices numberI file = do+generalProcessment pairwisePermutations (gr1,gr2) wrs ks arr gs h rs ysss zzzsss xs js vs coeffs numericArgs choices0 numberI file = do contents <- readFile file- let !permsV+ let !choices = map (filter (/='a')) choices0+ !permsV | pairwisePermutations == R.P 2 = genPairwisePermutationsArrLN 10 | pairwisePermutations == R.P 1 = genElementaryPermutationsArrLN1 10 | otherwise = genPermutationsArrL@@ -96,8 +98,8 @@ !l2 = (subtract 3) . length $ us if compare l2 0 /= LT then do let !perms2 = unsafeAt permsV $ l2- minMaxTuples = let !frep20Zip = zip choices . map (chooseMax wrs ks arr gs js vs id h coeffs rs) $ choices in- map (\(choice,frep20) -> minMax11C . map (toPropertiesF' frep20) .+ minMaxTuples = let !frep20Zip = zip choices . map (\choice -> chooseMax wrs ks arr gs js vs id h coeffs rs choice "") $ choices in+ map (\(choice,frep20) -> minMax11C . map (toPropertiesF'2 frep20 . StrG) . uniquenessVariants2GNPBL [] (concat . take 1 $ lasts) ' ' id id id perms2 . init $ us) frep20Zip mapM_ (\(choice, (minE,maxE)) -> toFileStr (choice ++ "." ++ file ++ ".new.txt") (circle2I wrs ks arr gs js vs h rs coeffs permsV choice [] numberI intervalNmbrs minE maxE $ flines)) .@@ -130,13 +132,13 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))-- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL)-- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> Coeffs2 -> Array Int [Array Int Int] -- ^ A permutations array of indices. -> String -- ^ Is intended to be one of the following strings: \"02y\", \"02z\", \"03y\", \"03z\", \"04y\", \"04z\",@@ -152,8 +154,8 @@ where (!zss,!tss) = splitAt 1 xss !rs = words . concat $ zss !l = length rs- !frep2 = chooseMax wrs ks arr gs js vs id h coeffs qs choice- !ws = if compare l 3 == LT then unwords rs else line . maximumElR . map (toResultR frep2) .+ !frep2 = chooseMax wrs ks arr gs js vs id h coeffs qs choice ""+ !ws = if compare l 3 == LT then unwords rs else (\rrrr -> fromMaybe "" . fromReadyFCPLS $ rrrr) . line2 . maximumElR2 . map (toResultR2 frep2 . StrG) . uniquenessVariants2GNPBL [] (last rs) ' ' id id id (unsafeAt permsG1 (l - 3)) . init $ rs -- | Processment with rearrangements.@@ -165,12 +167,12 @@ -> 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+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. 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@.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most -- exact one and, therefore, the default one. -> Coeffs2 -> Array Int [Array Int Int] -- ^ A permutations array of indices.@@ -193,14 +195,14 @@ !l3 = (subtract 3) . length $ w2s !rs = words . concat $ zss !l = length rs- !frep2 = chooseMax wrs ks arr gs js vs (unsafeSwapVecIWithMaxI minE maxE numberI intervNbrs) h coeffs qs choice- !ws = if compare (length rs) 3 == LT then unwords rs else line . maximumElR . map (toResultR frep2) .+ !frep2 = chooseMax wrs ks arr gs js vs (unsafeSwapVecIWithMaxI minE maxE numberI intervNbrs) h coeffs qs choice ""+ !ws = if compare (length rs) 3 == LT then unwords rs else (\rrrr -> fromMaybe "" . fromReadyFCPLS $ rrrr) . line2 . maximumElR2 . map (toResultR2 frep2 . StrG) . uniquenessVariants2GNPBL [] (last rs) ' ' id id id (unsafeAt permsG1 (l - 3)) . init $ rs (!minE1,!maxE1) | compare l3 0 /= LT = let !perms3 = unsafeAt permsG1 l3 !v4 = init w2s- !frep20 = chooseMax wrs ks arr gs js vs id h coeffs qs choice in minMax11C . map (toPropertiesF' frep20) .+ !frep20 = chooseMax wrs ks arr gs js vs id h coeffs qs choice "" in minMax11C . map (toPropertiesF'2 frep20 . StrG) . uniquenessVariants2GNPBL [] (last w2s) ' ' id id id perms3 $ v4 | otherwise = (0.0,0.0)
Phonetic/Languages/General/Lines/Parsing.hs view
@@ -49,13 +49,13 @@ -- You can run the comparative mode on the up to 7 different files simultaneously. -- Besides, there is also a multiple properties mode. argsToLinePrepare- :: (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ :: (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> IO () argsToLinePrepare h qs = do args50 <- getArgs
Phonetic/Languages/General/Simple.hs view
@@ -1,6 +1,8 @@ {-# OPTIONS_GHC -threaded -rtsopts #-} {-# OPTIONS_HADDOCK show-extensions #-} {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Phonetic.Languages.General.Simple@@ -29,7 +31,7 @@ import Data.Phonetic.Languages.Base import Data.Phonetic.Languages.PrepareText import Data.Char (isDigit,isAlpha,isLetter)-import qualified Data.List as L (span,sort,zip4,isPrefixOf,nub)+import qualified Data.List as L (span,sort,zip4,isPrefixOf,nub,sortBy,intersperse) import Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2 import Phonetic.Languages.Permutations.Arr import Phonetic.Languages.Permutations.ArrMini@@ -44,7 +46,8 @@ import Data.Phonetic.Languages.Syllables import Interpreter.StringConversion import qualified Phonetic.Languages.Permutations.Represent as R-+import Phonetic.Languages.EmphasisG+import CaseBi.Arr (getBFstLSorted') forMultiplePropertiesF :: [String] -> [(String,[String])] forMultiplePropertiesF (xs:xss)@@ -69,13 +72,13 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -90,15 +93,18 @@ -> Coeffs2 -- ^ This value is used when property choice is from the \"w\" or \"x\" lines. -> [String] -> Bool+ -> Bool -- ^ Whether to use volatile string weights+ -> Int -- ^ Number of sets of volatile string weights for every processed line. Is used when the previous one is 'True'+ -> Int -- ^ Whether to print more verbose information in the output with sorting in some way -> IO ()-generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2- | null textProcessment0 = generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2+generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 syllables syllablesVs verbose+ | null textProcessment0 = generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 syllables syllablesVs verbose | null textProcessmentFss = mapM_ (\_ -> do -- interactive training mode putStrLn . messageInfo $ 7 lineA <- getLine generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 (fullArgsConvertTextualSimple p lineA args0) coeffs coeffsWX (fullArgsConvertTextualSimple p lineA args)- lstW2) [0..]+ lstW2 syllables syllablesVs verbose) [0..] | otherwise = mapM_ (\js -> do let !kss = lines js@@ -108,14 +114,14 @@ | otherwise = prepareTuneTextMN m 1 ysss zzzsss ws . unwords $ kss mapM_ (\tss -> generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 (fullArgsConvertTextualSimple p tss args0) coeffs coeffsWX- (fullArgsConvertTextualSimple p tss args) lstW2) wss+ (fullArgsConvertTextualSimple p tss args) lstW2 syllables syllablesVs verbose) 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 ysss zzzsss ws . unwords $ kss mapM_ (\tss -> generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 (fullArgsConvertTextualSimple p tss args0) coeffs coeffsWX- (fullArgsConvertTextualSimple p tss args) lstW2) wss) textProcessmentFss+ (fullArgsConvertTextualSimple p tss args) lstW2 syllables syllablesVs verbose) wss) textProcessmentFss where m = if textProcessment1 == 10 || textProcessment1 == 11 then 10 else quot textProcessment1 10 -- | Is used to do general processment.@@ -128,13 +134,13 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one. -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -149,22 +155,25 @@ -> Coeffs2 -- ^ This value is used when property choice is from the \"w\" or \"x\" lines. -> [String] -> Bool+ -> Bool -- ^ Whether to use volatile string weights+ -> Int -- ^ Number of sets of volatile string weights for every processed line. Is used when the previous one is 'True'+ -> Int -> IO ()-generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2+generalProc2G pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws toFile1 recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 syllables syllablesVs verbose | variations args = do let !zsss = transformToVariations args- variantsG <- mapM (\xss -> generalProc2 pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX xss lstW2) zsss+ variantsG <- mapM (\xss -> generalProc2 pairwisePermutations wrs ks arr gs js vs h qs [] ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX xss lstW2 syllables syllablesVs verbose) zsss if interactive then do- (if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss 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)+ (if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs [] ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (showR . fst) + variantsG args lstW2 syllables syllablesVs verbose else interactivePrintResult (showR . fst) variantsG syllables syllablesVs) >>= \(rs,cs) ->+ case toFile1 of+ "" -> return ()+ ~fileName -> appendFile fileName (convFSL wrs ks arr gs js vs cs rs `mappend` newLineEnding) else return ()- | otherwise = generalProc2 pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 >>= \rs ->+ | otherwise = generalProc2 pairwisePermutations wrs ks arr gs js vs h qs [] ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 syllables syllablesVs verbose >>= \(rs,cs) -> case toFile1 of "" -> return ()- ~fileName -> appendFile fileName (rs `mappend` newLineEnding)+ ~fileName -> appendFile fileName (convFSL wrs ks arr gs js vs cs rs `mappend` newLineEnding) -- | generalProc2@@ -176,13 +185,14 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one.+ -> [MappingFunctionPL] -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -196,36 +206,44 @@ -> Coeffs2 -- ^ This value is used when property choice is from the \"w\" or \"x\" lines. -> [String] -> Bool- -> IO String-generalProc2 pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss 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- !xs = concat . take 1 . prepareTuneTextMN (if pairwisePermutations /= R.P 0 then 10 else 7) 1 ysss zzzsss ws . unwords . drop 1 $ textualArgs- !l = length . words $ xs- !argCs = catMaybes (fmap (readMaybeECG (l - 1)) . (showB l lstW2:) . drop 1 . dropWhile (/= "+a") .- takeWhile (/= "-a") $ args0)- !arg0 = concat . take 1 $ numericArgs- !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)- !choice = concat . take 1 $ textualArgs- !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 recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2- else if interactive then interactivePrintResult line wwss else print1el jstL0 choice wwss+ -> Bool -- ^ Whether to use volatile string weights+ -> Int -- ^ Number of sets of volatile string weights for every processed line. Is used when the previous one is 'True'+ -> Int+ -> IO (ReadyForConstructionPL, String)+generalProc2 pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX args lstW2 syllables syllablesVs verbose = 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+ !bs = concat . take 1 . prepareTuneTextMN (if pairwisePermutations /= R.P 0 then 10 else 7) 1 ysss zzzsss ws . unwords . drop 1 $ textualArgs+ !xs = StrG bs+ !l = length . words $ bs+ !argCs = catMaybes (fmap (readMaybeECG (l - 1)) . (showB l lstW2:) . drop 1 . dropWhile (/= "+a") .+ takeWhile (/= "-a") $ args0)+ !arg0 = concat . take 1 $ numericArgs+ !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)+ !choice = concat . take 1 $ textualArgs+ !intervalNmbrs = (\zs -> if null zs then [numberI] else L.nub zs) . L.sort . filter (<= numberI) .+ map (\t -> fromMaybe numberI $ (readMaybe t::Maybe Int)) . drop 2 $ numericArgs+ (if syllables then do weightsString3NIO wrs ks arr gs js vs syllablesVs (any (== 'a') choice) bs else return ([],[],StrG [])) >>= \(syllDs,syllableDs,readys) -> do+ if compare l 2 == LT then let !frep20 = chooseMax wrs ks arr gs js vs id h (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) (if any (== 'a') choice then map SaaW syllableDs else qs) choice bs in let !wwss = (:[]) . toResultR2 frep20 $ xs in+ if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs (if any (== 'a') choice then map SaaW syllableDs else sDs) ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (convFSL wrs ks arr gs js vs bs . line2) wwss args lstW2 syllables syllablesVs verbose+ else if interactive then interactivePrintResult (convFSL wrs ks arr gs js vs bs . line2) wwss syllables syllablesVs 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 recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line temp args lstW2- else if interactive then interactivePrintResult line temp else print1el jstL0 choice temp+ let !subs = subG (' ':js `mappend` vs) bs+ if null argCs then let !perms + | pairwisePermutations == R.P 2 = genPairwisePermutationsLN l+ | pairwisePermutations == R.P 1 = genElementaryPermutationsLN1 l+ | otherwise = genPermutationsL l in do+ temp <- generalProcMs wrs ks arr gs js vs h qs (if any (== 'a') choice then map SaaW syllableDs else sDs) coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)+ if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs (if any (== 'a') choice then map SaaW syllableDs else sDs) ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (convFSL wrs ks arr gs js vs bs . line2) temp args lstW2 syllables syllablesVs verbose+ else if interactive then interactivePrintResult (convFSL wrs ks arr gs js vs bs . line2) temp syllables syllablesVs 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 recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line temp args lstW2- else if interactive then interactivePrintResult line temp else print1el jstL0 choice temp+ correct <- printWarning bs+ if correct == "n" then putStrLn (messageInfo 1) >> return (StrG "","") -- 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 . (if pairwisePermutations == R.P 2 then genPairwisePermutationsLN else if pairwisePermutations == R.P 0 then genPermutationsL else genElementaryPermutationsLN1) $ l in do+ temp <- generalProcMs wrs ks arr gs js vs h qs (if any (== 'a') choice then map SaaW syllableDs else sDs) coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice)+ if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs (if any (== 'a') choice then map SaaW syllableDs else sDs) ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (convFSL wrs ks arr gs js vs bs . line2) temp args lstW2 syllables syllablesVs verbose+ else if interactive then interactivePrintResult (convFSL wrs ks arr gs js vs bs . line2) temp syllables syllablesVs else print1el jstL0 choice temp else do let !choices = map fst argMss !numericArgss = map snd argMss@@ -235,27 +253,29 @@ (\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 . prepareTuneTextMN (if pairwisePermutations /= R.P 0 then 10 else 7) 1 ysss zzzsss ws . unwords $ args- !l = length . words $ xs+ !bs = concat . take 1 . prepareTuneTextMN (if pairwisePermutations /= R.P 0 then 10 else 7) 1 ysss zzzsss ws . unwords $ args+ !xs = StrG bs+ !l = length . words $ bs !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 wrs ks arr gs js vs id h coeffs qs (concat . take 1 $ choices) in- let !wwss = (:[]) . toResultR frep20 $ xs in- if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX line wwss args lstW2- else if interactive then interactivePrintResult line wwss+ (syllDs,syllableDs,readys) <- do if syllables then weightsString3NIO wrs ks arr gs js vs syllablesVs (any id (map (any (== 'a')) choices)) bs else return ([],[],FSLG [])+ if compare l 2 == LT then let !frep20 = chooseMax wrs ks arr gs js vs id h coeffs (if any (== 'a') . concat . take 1 $ choices then map SaaW syllableDs else qs) (concat . take 1 $ choices) bs in+ let !wwss = (:[]) . toResultR2 frep20 $ xs in+ if recursiveMode then interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs (if syllables then map SaaW syllableDs else sDs) ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (convFSL wrs ks arr gs js vs bs . line2) wwss args lstW2 syllables syllablesVs verbose+ else if interactive then interactivePrintResult (convFSL wrs ks arr gs js vs bs . line2) wwss syllables syllablesVs else print1el jstL0 (concat . take 1 $ choices) wwss else do- let !subs = subG (' ':js `mappend` vs) xs+ let !subs = subG (' ':js `mappend` vs) bs if null argCs then let !perms | pairwisePermutations == R.P 2 = genPairwisePermutationsLN l | pairwisePermutations == R.P 1 = genElementaryPermutationsLN1 l | otherwise = genPermutationsL l in- generalProcMMs pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2+ generalProcMMs pairwisePermutations wrs ks arr gs js vs h qs (map SaaW syllableDs) ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2 syllables syllablesVs verbose 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.+ correct <- printWarning bs+ if correct == "n" then putStrLn (messageInfo 1) >> return (StrG "","") -- 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 . (case pairwisePermutations of {R.P 2 -> genPairwisePermutationsLN ; R.P 1 -> genElementaryPermutationsLN1 ; ~rrr -> genPermutationsL}) $ l in- generalProcMMs pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2+ generalProcMMs pairwisePermutations wrs ks arr gs js vs h qs (map SaaW syllableDs) ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX argsZipped perms subs args lstW2 syllables syllablesVs verbose -- | Function provides message information. messageInfo :: Int -> String@@ -271,12 +291,17 @@ | otherwise = "You have specified just one variant of the properties. " -- |-interactivePrintResult :: (a -> String) -> [a] -> IO String-interactivePrintResult f xss- | null xss = (putStrLn . messageInfo $ 5) >> return ""+interactivePrintResult + :: (a -> String) + -> [a] + -> Bool+ -> Int+ -> IO (ReadyForConstructionPL,String)+interactivePrintResult f xss syllables syllablesVs+ | null xss = (putStrLn . messageInfo $ 5) >> return (StrG "","") | otherwise = do let !datas = map (\(idx,str) -> show idx `mappend` ('\t' : str)) . trans232 . map f $ xss- if null datas then (putStrLn . messageInfo $ 5) >> return ""+ if null datas then (putStrLn . messageInfo $ 5) >> return (StrG "","") else do mapM_ putStrLn datas putStrLn ""@@ -284,7 +309,7 @@ number <- getLine let !lineRes = concat . filter ((number `mappend` "\t")`L.isPrefixOf`) $ datas !ts = drop 1 . dropWhile (/= '\t') $ lineRes- putStrLn ts >> return ts+ putStrLn ts >> return (StrG ts,ts) interactivePrintResultRecursive :: R.PermutationsType -- ^ Whether to use just one of the express permutations, or the full universal set.@@ -295,13 +320,14 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most -- exact one and, therefore, the default one.+ -> [MappingFunctionPL] -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -317,9 +343,12 @@ -> [a] -> [String] -> Bool- -> IO String-interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2- | null xss = (putStrLn . messageInfo $ 5) >> return ""+ -> Bool -- ^ Whether to use volatile string weights+ -> Int -- ^ Number of sets of volatile string weights for every processed line. Is used when the previous one is 'True'+ -> Int+ -> IO (ReadyForConstructionPL,String)+interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2 syllables syllablesVs verbose+ | null xss = (putStrLn . messageInfo $ 5) >> return (StrG "","") | otherwise = do let !datas = map (\(idx,str) -> show idx `mappend` ('\t' : str)) . trans232 . map f $ xss mapM_ putStrLn datas@@ -330,7 +359,7 @@ !ts = drop 1 . dropWhile (/= '\t') $ lineRes putStrLn . messageInfo $ 6 stringInterpreted <- getLine- if null stringInterpreted then putStrLn ts >> return ts+ if null stringInterpreted then putStrLn ts >> return (StrG ts,ts) else do let !firstArgs = takeWhile (not . all isLetter) args strIntrpr <- convStringInterpreterIO stringInterpreted ts@@ -340,7 +369,7 @@ mStr <- getLine let m = fromMaybe 10 (readMaybe mStr::Maybe Int) in return . take m . words $ strIntrpr else return . take 7 . words $ strIntrpr- generalProc2 pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (firstArgs `mappend` wordsNN) lstW2+ generalProc2 pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX (firstArgs `mappend` wordsNN) lstW2 syllables syllablesVs verbose printWarning :: String -> IO String printWarning xs = do@@ -348,6 +377,17 @@ putStrLn xs getLine +show2 verbose jjs@(R2 x y z:_) = show1 bs + where bs = L.sortBy (\(R2 xs d1 k1) (R2 ys d2 k2) -> case verbose of + 2 -> compare d2 d1+ 1 -> compare xs ys+ 3 -> compare k2 k1+ _ -> EQ) jjs + show1 qqs@(R2 x y z:ks) = showR x `mappend` "->" `mappend` show y `mappend` "->" `mappend` show z `mappend` "\n" `mappend` show1 ks+ show1 _ = ""++print2 verbose = putStrLn . show2 verbose+ generalProcMs :: 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@@ -356,13 +396,14 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one.+ -> [MappingFunctionPL] -> 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. -> [Array Int Int] -- ^ Permutations data.@@ -374,23 +415,19 @@ -- to get the result. The \"z\"-line uses \'F\' functions. -- @ since 0.6.0.0 -- Changed the arguments signing so that capital letters changed to the small ones, double ++ changed to just singular +.- -> IO [Result [] Char Double Double]-generalProcMs wrs ks arr gs js vs h qs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice) = do+ -> IO [Result2 ReadyForConstructionPL Double Double]+generalProcMs wrs ks arr gs js vs h qs sDs coeffs coeffsWX perms subs (intervalNmbrs, arg0, numberI, choice) = do+ let bs = unwords subs if compare numberI 2 == LT- then let !frep2- | take 1 choice == "w" || take 1 choice == "x" = chooseMax wrs ks arr gs js vs id h coeffsWX qs choice- | otherwise = chooseMax wrs ks arr gs js vs id h coeffs qs choice- in return . fst . (if any (== 'G') choice then partitioningR arg0 else maximumGroupsClassificationR (fromMaybe 1 (readMaybe arg0::Maybe Int))) . map (toResultR frep2) . uniquenessVariants2GNBL ' ' id id id perms $ subs+ then let !frep2 = chooseMax wrs ks arr gs js vs id h (if any (\t -> t == 'w' || t == 'x') choice then coeffsWX else coeffs) (if any (== 'a') choice then sDs else qs) choice bs+ in return . fst . (if any (== 'G') choice then partitioningR2 arg0 else maximumGroupsClassificationR_2 (fromMaybe 1 (readMaybe arg0::Maybe Int))) . map (toResultR2 frep2) . map StrG . uniquenessVariants2GNBL ' ' id id id perms $ subs else do let !variants1 = uniquenessVariants2GNBL ' ' id id id perms subs- !frep20- | take 1 choice == "w" || take 1 choice == "x" = chooseMax wrs ks arr gs js vs id h coeffsWX qs choice- | otherwise = chooseMax wrs ks arr gs js vs id h coeffs qs choice- (!minE,!maxE) = minMax11C . map (toPropertiesF' frep20) $ variants1- !frep2- | take 1 choice == "w" || take 1 choice == "x" = chooseMax wrs ks arr gs js vs (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) h coeffsWX qs choice- | otherwise = chooseMax wrs ks arr gs js vs (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) h coeffs qs choice- return . fst . (if any (== 'G') choice then partitioningR arg0 else maximumGroupsClassificationR (fromMaybe 1 (readMaybe arg0::Maybe Int))) . map (toResultR frep2) $ variants1+ !frep20 = chooseMax wrs ks arr gs js vs id h (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) (if any (== 'a') choice then sDs else qs) choice bs+ (!minE,!maxE) = minMax11C . map (toPropertiesF'2 frep20) $ map StrG variants1+ !frep2 = chooseMax wrs ks arr gs js vs (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) h + (if any (\t -> t == 'x' || t == 'w') choice then coeffsWX else coeffs) (if any (== 'a') choice then sDs else qs) choice bs + return . fst . (if any (== 'G') choice then partitioningR2 arg0 else maximumGroupsClassificationR_2 (fromMaybe 1 (readMaybe arg0::Maybe Int))) . map (toResultR2 frep2) $ map StrG variants1 -- | generalProcMMs@@ -402,13 +439,14 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one.+ -> [MappingFunctionPL] -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -431,21 +469,21 @@ -> [String] -> [String] -> Bool- -> IO String-generalProcMMs pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX rs perms subs args lstW2 =+ -> Bool -- ^ Whether to use volatile string weights+ -> Int -- ^ Number of sets of volatile string weights for every processed line. Is used when the previous one is 'True'+ -> Int+ -> IO (ReadyForConstructionPL, String)+generalProcMMs pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX rs perms subs args lstW2 syllables syllablesVs verbose= case length rs of- 0 -> putStrLn (messageInfo 4) >> return ""+ 0 -> putStrLn (messageInfo 4) >> return (StrG "","") 1 -> putStrLn (messageInfo 5) >> do- temp <- generalProcMs wrs ks arr gs js vs h qs coeffs coeffsWX perms subs (head rs)- finalProc pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX line temp args lstW2+ temp <- generalProcMs wrs ks arr gs js vs h qs sDs coeffs coeffsWX perms subs (head rs)+ if verbose `elem` [1..3] then print2 verbose temp >> putStrLn "" else putStr ""+ finalProc pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX (convFSL wrs ks arr gs js vs (unwords args) . line2) temp args lstW2 syllables syllablesVs verbose _ -> do- genVariants <- mapM (generalProcMs wrs ks arr gs js vs h qs coeffs coeffsWX perms subs) rs- finalProc pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss 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)-foldlI ((!xs):_) = xs-foldlI _ = []+ genVariants <- mapM (\k-> generalProcMs wrs ks arr gs js vs h qs sDs coeffs coeffsWX perms subs k) rs+ if verbose `elem` [1..3] then mapM_ (\t -> print2 verbose t >> putStrLn "") genVariants else putStr ""+ finalProc pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactiveMM jstL0 args0 coeffs coeffsWX (convFSL wrs ks arr gs js vs (unwords args)) (foldlI wrs ks arr gs js vs (unwords args). map (map line2) $ genVariants) args lstW2 syllables syllablesVs verbose -- | finalProc@@ -457,13 +495,14 @@ -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- exact one and, therefore, the default one.+ -> [MappingFunctionPL] -> Concatenations -- ^ Data used to concatenate (prepend) 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. -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to@@ -479,17 +518,20 @@ -> [a] -> [String] -> Bool- -> IO String-finalProc pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2- | recursiveMode = interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2- | otherwise = if interactive then interactivePrintResult f xss else putStrLn ts >> return ts+ -> Bool -- ^ Whether to use volatile string weights+ -> Int -- ^ Number of sets of volatile string weights for every processed line. Is used when the previous one is 'True'+ -> Int+ -> IO (ReadyForConstructionPL,String)+finalProc pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2 syllables syllablesVs verbose+ | recursiveMode = interactivePrintResultRecursive pairwisePermutations wrs ks arr gs js vs h qs sDs ysss zzzsss ws recursiveMode interactive jstL0 args0 coeffs coeffsWX f xss args lstW2 syllables syllablesVs verbose+ | otherwise = if interactive then interactivePrintResult f xss syllables syllablesVs else putStrLn ts >> return (StrG ts,ts) where ts = concatMap (\t -> f t `mappend` newLineEnding) xss -- |-print1el :: Bool -> String -> [Result [] Char Double Double] -> IO String+print1el :: Bool -> String -> [Result2 ReadyForConstructionPL Double Double] -> IO (ReadyForConstructionPL,String) print1el jstlines choice y- | jstlines == True = putStrLn us >> return us- | otherwise = putStrLn zs >> return zs+ | jstlines == True = putStrLn us >> return (StrG us,us)+ | otherwise = putStrLn zs >> return (StrG zs,zs) where !ch = precChoice choice- !us = concatMap (\ys -> line ys `mappend` newLineEnding) y- !zs = concatMap (\ys -> line ys `mappend` newLineEnding `mappend` showFFloat ch (propertiesF ys) (newLineEnding `mappend` showFFloat ch (transPropertiesF ys) newLineEnding)) y+ !us = concatMap (\ys -> showR (line2 ys) `mappend` newLineEnding) y+ !zs = concatMap (\ys -> showR (line2 ys) `mappend` newLineEnding `mappend` showFFloat ch (propertiesF2 ys) (newLineEnding `mappend` showFFloat ch (transPropertiesF2 ys) newLineEnding)) y
Phonetic/Languages/General/Simple/Parsing.hs view
@@ -30,6 +30,7 @@ import CLI.Arguments.Parsing import CLI.Arguments.Get import qualified Phonetic.Languages.Permutations.Represent as R+import Phonetic.Languages.EmphasisG -- | Prints the rearrangements with the \"property\" information for the phonetic language text. -- Most of the arguments are obtained from the 'getArgs' function.@@ -59,13 +60,13 @@ -- You can specify constraints according to the 'decodeLConstraints' function between +A and -A next command line arguments. If so, the program will -- ask you additional question before proceeding. The \"+m\" ... \"-m\" and \"+a\" ... \"-a\" groups must not mutually intersect one another. argsToSimplePrepare- :: (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ :: (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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.+ -> [MappingFunctionPL] -- ^ A list of 'PhoPaaW'-based different functions that specifies the syllables durations in the PhoPaaW mode, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one must be probably the most+ -- -- exact one and, therefore, the default one. -> (String -> Bool) -- ^ The predicate that checks whether the given argument is not a phonetic language word in the representation. -> IO () argsToSimplePrepare h qs p = do@@ -83,12 +84,12 @@ recursiveMode = oneA "+r" rcrs -- Specifies whether to use the interactive recursive mode (!args15,!args00) = splitAt 5 args000 [fileGWrSys, controlFile, segmentRulesFile, concatenationsFileP,concatenationsFileA] = args15- (gwrsCnts, controlConts, segmentData, concatenationsFileP1, concatenationsFileA1, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW) <- argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP concatenationsFileA args00+ (gwrsCnts, controlConts, segmentData, concatenationsFileP1, concatenationsFileA1, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW,syllables,syllablesVs,verbose) <- argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP concatenationsFileA args00 let (wrs, ks, arr, gs, js, vs, ysss, zzzsss, ws) = innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFileP1 concatenationsFileA1 textProcessmentFss0 <- mapM (readFileIfAny) textProcessmentFssFs let textProcessmentFss = filter (not . null) textProcessmentFss0- if isPair coeffs then generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws {- old arguments follow -} toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW- else generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX args lstW+ if isPair coeffs then generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws {- old arguments follow -} toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW syllables syllablesVs verbose+ else generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX args lstW syllables syllablesVs verbose -- | 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,@@ -100,11 +101,11 @@ -> FilePath -- ^ With the 'SegmentRulesG' specifications only; -> FilePath -- ^ 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). These are to be prepended to the next word. -> FilePath -- ^ 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). These are to be appended to the previous word.- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. 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+ -> [MappingFunctionPL] -- ^ 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. -> String -- ^ A 'String' of data that are the further command line arguments for the function 'argsToSimplePrepare'.@@ -117,10 +118,10 @@ let args000 = drop 5 . words $ other_args (rcs,args00) = takeAsR [("+r",0)] args000 recursiveMode = oneA "+r" rcs -- Specifies whether to use the interactive recursive mode- (gwrsCnts, controlConts, segmentData, concatenationsFileP1, concatenationsFileA1, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW) <- argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP concatenationsFileA args00+ (gwrsCnts, controlConts, segmentData, concatenationsFileP1, concatenationsFileA1, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW,syllables,syllablesVs,verbose) <- argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP concatenationsFileA args00 let (wrs, ks, arr, gs, js, vs, ysss, zzzsss, ws) = innerProcessmentSimple gwrsCnts controlConts segmentData concatenationsFileP1 concatenationsFileA1- if isPair coeffs then generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws {- old arguments follow -} toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW- else generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX args lstW+ if isPair coeffs then generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws {- old arguments follow -} toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX (drop 1 args) lstW syllables syllablesVs verbose+ else generalProc3G pairwisePermutations p textProcessmentFss textProcessment0 textProcessment1 wrs ks arr gs js vs h qs ysss zzzsss ws toFileMode1 recursiveMode interactiveP jstL0 args0 coeffs coeffsWX args lstW syllables syllablesVs verbose 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);@@ -152,7 +153,7 @@ -> FilePath -- ^ 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). These are to be prepended to the next word. -> FilePath -- ^ 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). These are to be appended to the previous word. -> [String] -- ^ List of other args afterwards.- -> IO (String, String, String, String, String, String, Bool, Bool, [String], Coeffs2, Coeffs2, [String], Bool)+ -> IO (String, String, String, String, String, String, Bool, Bool, [String], Coeffs2, Coeffs2, [String], Bool, Bool,Int,Int) argsProcessment fileGWrSys controlFile segmentRulesFile concatenationsFileP concatenationsFileA args00 = do let args0 = snd . takeBsR [("+x",1)] . snd . takeAsR (zip ["+b","+l","+bl","+i"] . cycle $ [0]) $ args00 lstW = any (\x -> x == "+b" || x == "+bl") args00 -- If one of the command line options is \"+b\" or \"+bl\" then the last word of the line will remain the last one.@@ -160,14 +161,17 @@ toFileMode1 = concat . getB "+f" . bSpcs $ args0 -- Prints the last resulting line of the interactive mode processment (the last selected variant) to the file and also to the stdout. interactiveP = any (== "+i") args00 || not (null toFileMode1) -- If one of the command line options is \"+i\", or \"+f\" then the program prints the variants and then prompts for the preferred variant. Afterwards, it prints just that variant alone. args01 = snd . takeCs1R fstCharsMA [("+a",-1)] $ args0+ syllables = oneB "+s" . fst . takeBsR [("+s",1)] $ args00+ syllablesVs = if syllables then fromMaybe 1 (readMaybe (concat . getB "+s" . fst . takeBsR [("+s",1)] $ args00)::Maybe Int) else 0+ verbose = if (oneB "+v" . fst . takeBsR [("+v",1)] $ args00) then fromMaybe 1 (readMaybe (concat . getB "+v" . fst . takeBsR [("+v",1)] $ args00)::Maybe Int) else 0 args02- | null toFileMode1 = filter (/= "+f") args01- | otherwise = snd . takeBsR [("+f",1)] $ args01+ | null toFileMode1 = filter (/= "+f") args01+ | otherwise = snd . takeBsR [("+f",1)] $ args01 args = snd . takeCs1R fstCharsMA [("+m",-1)] $ args02 coeffs = readCF . concat . take 1 $ args coeffsWX = readCF . concat . getB "+x" . fst . takeBsR [("+x",1)] $ args00 [controlConts, gwrsCnts, segmentData, concatenationsFileP1, concatenationsFileA1] <- mapM readFile [controlFile, fileGWrSys, segmentRulesFile, concatenationsFileP, concatenationsFileA]- return (gwrsCnts, controlConts, segmentData, concatenationsFileP1, concatenationsFileA1, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW)+ return (gwrsCnts, controlConts, segmentData, concatenationsFileP1, concatenationsFileA1, toFileMode1, interactiveP, jstL0, args0, coeffs, coeffsWX, args, lstW,syllables,syllablesVs,verbose) aSpecs :: CLSpecifications aSpecs = zip ["+r","+b","+l","+bl","+i"] . cycle $ [0]@@ -188,7 +192,7 @@ fstCharsT = ('+','^') bSpecs :: CLSpecifications-bSpecs = zip ["+d","+f","+p"] . cycle $ [1]+bSpecs = zip ["+d","+f","+p","+s","+v"] . cycle $ [1] bSpcs :: [String] -> Args bSpcs = fst . takeBsR bSpecs
Phonetic/Languages/Simplified/Array/General/FuncRep2RelatedG2.hs view
@@ -18,6 +18,10 @@ import Data.Monoid (mappend) import Data.Phonetic.Languages.Base import Data.Phonetic.Languages.Syllables+import Phonetic.Languages.EmphasisG+import Data.Char (isDigit)+import Data.Maybe (fromJust)+import Text.Read (readMaybe) -- | Allows to choose the variant of the computations in case of usual processment. The coefficient 1.3 (anyway, it must -- be greater than 1.0) )is an empirical and approximate, you can use your own if you like.@@ -30,19 +34,20 @@ -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package. -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package. -> (Double -> c)- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. -> Coeffs2- -> [([[[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+ -> [MappingFunctionPL] -- ^ A list of either 'PhoPaaW'-based or 'SaaW'-based (and not both ones) different functions that specifies the syllables durations in the PhoPaaW or SaaW mode respectively (the former one has been introduced earlier), analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one in case of 'PhoPaaW'-based ones must be probably the most -- exact one and, therefore, the default one. -> String -- ^ Is intended to be one of the following strings: \"02y\", \"02z\", \"03y\", \"03z\", \"04y\", \"04z\", -- \"0y\", \"0z\", \"y\", \"y0\", \"y2\", \"y3\", \"y4\", \"yy\", \"yy2\", \"yy3\", \"z\", \"z2\", \"z3\", \"z4\", -- \"zz\", \"zz2\", \"zz3\", \"zz4\" or some other one (that is the default one). Since the 0.5.0.0 version -- you can use also \"w\" and \"x\"-based lines of properties. Specifies the applied properties -- to get the result. The \"z\"-line uses \'F\' functions.- -> FuncRep2 String Double c+ -> String -- ^ The starting 'String' which creates the order for the 'FSLG' representation+ -> FuncRep2 ReadyForConstructionPL Double c chooseMax = chooseMaxG 1.3 {-# INLINE chooseMax #-} @@ -57,12 +62,12 @@ -> String -- ^ Corresponds to the \'0\' symbol delimiter in the @ukrainian-phonetics-basic-array@ package. -> String -- ^ Corresponds to the \'1\' and \'-\' symbol delimiters in the @ukrainian-phonetics-basic-array@ package. -> (Double -> c)- -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -> (Double -> String -> MappingFunctionPL) -- ^ The function that is needed in the 'procRhythmicity23F' function. -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and -- depends on two parameters. -> Coeffs2- -> [([[[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+ -> [MappingFunctionPL] -- ^ A list of either 'PhoPaaW'-based or 'SaaW'-based (and not both ones) different functions that specifies the syllables durations in the PhoPaaW or SaaW mode respectively (the former one has been introduced earlier), analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The first one in case of 'PhoPaaW'-based ones must be probably the most -- exact one and, therefore, the default one. -> String -- ^ Is intended to be one of the following strings: \"02y\", \"02z\", \"03y\", \"03z\", \"04y\", \"04z\", -- \"0y\", \"0z\", \"y\", \"y0\", \"y2\", \"y3\", \"y4\", \"yy\", \"yy2\", \"yy3\", \"z\", \"z2\", \"z3\", \"z4\",@@ -74,9 +79,12 @@ -- to rewrite it. -- Besides there are new lines of the arguments for the 'String' argument that can begin with \"c\", \"s\", \"t\", -- \"u\", \"v\", or some other letters. For more information, please, refer to the 'Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2.rhythmicity'.- -> FuncRep2 String Double c-chooseMaxG k wrs ks arr gs us vs g h coeffs xs choice- | any (== 'G') choice = chooseMaxG k wrs ks arr gs us vs g h coeffs xs (filter (/= 'G') choice)+ -> String -- ^ The starting 'String' which creates the order for the 'FSLG' representation+ -> FuncRep2 ReadyForConstructionPL Double c+chooseMaxG k wrs ks arr gs us vs g h coeffs xs choice bbs+ | any (== 'G') choice = chooseMaxG k wrs ks arr gs us vs g h coeffs xs (filter (/= 'G') choice) bbs+ | any (=='a') choice = procRhythmicity23F k g (\_ _ -> if null (filter isDigit choice) then (xs !! 0) else (xs !! ((\z -> if z == -1 then 0 else z) $ + fromJust (readMaybe [last . filter isDigit $ choice]::Maybe Int) - 1))) (filter (/='a') choice) coeffs wrs ks arr gs us vs bbs | take 1 choice `elem` ["c","C","N"] || (take 1 choice >= "A" && take 1 choice <= "F") || 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",@@ -153,7 +161,7 @@ "v54","v61","v62","v63","v64","v71","v72","v74","w01","w02","w03","w04","w11","w12","w13","w14", "w21","w22","w23","w24","w31","w32","w33","w34","x01","x02","x03","x04","x11","x12","x13","x14", "x21","x22","x23","x24","x31","x32","x33","x34"] . replicate 2000 $ True) choice =- procRhythmicity23F k g h choice coeffs wrs ks arr gs us vs+ procRhythmicity23F k g h choice coeffs wrs ks arr gs us vs bbs | otherwise = getBFstL' (procB2F wrs ks arr gs us vs g (xs !! 0) coeffs) [("y",procB2F wrs ks arr gs us vs g (xs !! 0) coeffs), ("y0",procDiverse2F wrs (' ':us `mappend` vs) g),@@ -186,7 +194,7 @@ -- \"u\", \"v\", or some other letters. For more information, please, refer to the 'Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2.rhythmicity'. -> Maybe Int precChoice choice- | any (=='G') choice = precChoice . filter (/='G') $ choice+ | any (\t -> t =='G' || t == 'a') choice = precChoice . filter (\t -> t/='G' && t /= 'a') $ choice | otherwise = 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)] choice
README.md view
@@ -81,21 +81,21 @@ approach and are intended for 4 elements in the rhythmic groups. For more information, please, refer to the section 'WX argument' in the Ukrainian instruction: -https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.19.pdf+https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.pdf or here: (try-https://web.archive.org/web/20220531150915/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.19.pdf)+https://web.archive.org/web/20220809192249/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionUkr.20.pdf) The instruction in English is here: -https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.19.pdf+https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.pdf or here: (try-https://web.archive.org/web/20220531151128/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.19.pdf)+https://web.archive.org/web/20220809192412/https://oleksandrzhabenko.github.io/uk/rhythmicity/InstructionEng.20.pdf) There are also some additional information there about the changes in the 0.6.0.0 version.
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.17.0.0+version: 0.18.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. To present the created text you can use e. g. html-presentation-text package: https://hackage.haskell.org/package/html-presentation-text . homepage: https://hackage.haskell.org/package/phonetic-languages-simplified-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 && <5, phonetic-languages-simplified-generalized-examples-common ==0.4.0.0, subG ==0.5.3.0, phonetic-languages-simplified-generalized-properties-array ==0.10.1.0, phonetic-languages-basis ==0.1.0.0, phonetic-languages-simplified-base ==0.5.0.0, phonetic-languages-permutations-array ==0.3.4.0, phonetic-languages-filters-array ==0.4.0.0, phonetic-languages-phonetics-basics ==0.9.0.0, phonetic-languages-constraints-array ==0.1.2.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, mmsyn2-array ==0.3.0.0, heaps >=0.3.6.1 && <1, mmsyn3 ==0.1.5.0, process >= 1.6.2 && <2, string-interpreter ==0.6.0.0, cli-arguments ==0.6.0.0, foldable-ix ==0.2.1.0+ build-depends: base >=4.8 && <5, phonetic-languages-simplified-generalized-examples-common ==0.5.0.0, subG ==0.5.3.0, phonetic-languages-simplified-generalized-properties-array ==0.11.0.0, phonetic-languages-basis ==0.1.1.0, phonetic-languages-simplified-base ==0.6.0.0, phonetic-languages-permutations-array ==0.3.4.0, phonetic-languages-filters-array ==0.4.0.0, phonetic-languages-phonetics-basics ==0.9.0.0, phonetic-languages-constraints-array ==0.1.2.0, parallel >=3.2.0.6 && <4, phonetic-languages-plus ==0.6.0.0, mmsyn2-array ==0.3.0.0, heaps >=0.3.6.1 && <1, mmsyn3 ==0.1.5.0, process >= 1.6.2 && <2, string-interpreter ==0.6.0.0, cli-arguments ==0.6.0.0, foldable-ix ==0.2.1.0 -- hs-source-dirs: default-language: Haskell2010