phonetic-languages-simplified-generalized-examples-array 0.1.0.1 → 0.1.1.0
raw patch · 6 files changed
+198/−89 lines, 6 filesdep ~phonetic-languages-phonetics-basicsdep ~phonetic-languages-simplified-generalized-examples-commondep ~phonetic-languages-simplified-generalized-properties-arrayPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-phonetics-basics, phonetic-languages-simplified-generalized-examples-common, phonetic-languages-simplified-generalized-properties-array
API changes (from Hackage documentation)
Files
- ChangeLog.md +3/−0
- Phonetic/Languages/General/GetTextualInfo.hs +52/−24
- Phonetic/Languages/General/Lines.hs +51/−22
- Phonetic/Languages/General/Simple.hs +62/−30
- Phonetic/Languages/Simplified/Array/General/FuncRep2RelatedG2.hs +27/−10
- phonetic-languages-simplified-generalized-examples-array.cabal +3/−3
ChangeLog.md view
@@ -8,3 +8,6 @@ * First version revised A. Some documentation and .cabal file improvements. +## 0.1.1.0 -- 2021-05-10++* First version revised B. Some documentation improvements. Changed the dependencies boundaries.
Phonetic/Languages/General/GetTextualInfo.hs view
@@ -9,8 +9,8 @@ -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com ----- Library module that contains functions used by the propertiesTextG3--- executable.+-- Library module that contains functions earlier used by the propertiesTextG3+-- executable for the Ukrainian language (see: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array). -- Is rewritten from the Phonetic.Languages.GetTextualInfo module from the -- @phonetic-languages-simplified-examples-array@ package. @@ -50,13 +50,20 @@ import Data.Phonetic.Languages.Syllables generalProc- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]- -> Concatenations+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> String -> String@@ -68,7 +75,10 @@ -> String -> Int -> Int- -> String+ -> 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> IO () generalProc wrs ks arr gs h rs ysss xs js vs lstW multiples2 lInes coeffs file gzS printLine toOneLine choice | null lInes = do@@ -94,40 +104,58 @@ linesFromArgsG xss yss = let n = length yss in concatMap (\ts -> linesFromArgs1 n ts yss) xss getData3- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one. -> Bool -> Coeffs2 -> Int -> Int- -> String+ -> 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> [String] -> [String] -> IO () getData3 wrs ks arr gs js vs h rs lstW coeffs gz printLine choice multiples3 zss = let !permsV4 = genPermutationsArrL in putStrLn (replicate (length multiples3 + 1) '\t' `mappend` show gz) >> mapM_ (process1Line wrs ks arr gs js vs h rs lstW coeffs gz printLine choice multiples3 permsV4) zss process1Line- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one. -> Bool -> Coeffs2 -> Int -> Int- -> String+ -> 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> [String]- -> Array Int [Array Int Int]+ -> Array Int [Array Int Int] -- ^ A permutations array of indices. -> String -> IO () process1Line wrs ks arr gs js vs h qs lstW coeffs gz printLine choice multiples4 !permsV50 v@@ -137,7 +165,7 @@ !l2 = length v2 - 2 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 -- wrs ks arr gs js vs id h coeffs rs choice+ unsafeAt permsV50 $ l2 ((!minE,!maxE),!data2) = runEval (parTuple2 rpar rpar (minMax11C . map (toTransPropertiesF' (chooseMax wrs ks arr gs js vs id h coeffs qs choice )) . uniquenessVariants2GNBL ' ' id id id permsV5 $ v2, toTransPropertiesF' (chooseMax wrs ks arr gs js vs id h coeffs qs choice) . unwords . subG (' ':js `mappend` vs) $ v)) (!wordsN,!intervalN) = (l2 + 2, intervalNRealFrac minE maxE gz data2)@@ -160,7 +188,7 @@ !l2 = length v2 - 2 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 -- wrs ks arr gs js vs id h coeffs rs choice+ unsafeAt permsV50 $ l2 rs = parMap rpar (\choiceMMs -> (minMax11C . map (toTransPropertiesF' (chooseMax wrs ks arr gs js vs id h coeffs qs choiceMMs)) . uniquenessVariants2GNBL ' ' id id id permsV5 $ v2,
Phonetic/Languages/General/Lines.hs view
@@ -9,7 +9,8 @@ -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com ----- Library functions for the rewritePoemG3 executable.+-- Library module that contains functions earlier used by the rewritePoemG3+-- executable for the Ukrainian language (see: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array). -- Inspired by: https://functional-art.org/2020/papers/Poetry-OleksandrZhabenko.pdf from the https://functional-art.org/2020/performances ; -- Allows to rewrite the given text (usually a poetical one). -- Is rewritten from the Phonetic.Languages.Lines module from the@@ -39,19 +40,29 @@ import Phonetic.Languages.General.Common generalProcessment- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]- -> Concatenations+ -> (Double -> String -> ([[[PRS]]] -> [[Double]]))-- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> String -> String -> Coeffs2 -> [String]- -> String+ -> 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> Int -> FilePath -> IO ()@@ -93,17 +104,26 @@ -- | Processment without rearrangements. circle2- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]+ -> (Double -> String -> ([[[PRS]]] -> [[Double]]))-- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one. -> Coeffs2- -> Array Int [Array Int Int]- -> String+ -> 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\",+ -- \"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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> [String] -> [String] -> [String]@@ -119,17 +139,26 @@ -- | Processment with rearrangements. circle2I- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])]-- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one. -> Coeffs2- -> Array Int [Array Int Int]- -> String+ -> 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\",+ -- \"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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> [String] -> Int -> [Int]
Phonetic/Languages/General/Simple.hs view
@@ -9,7 +9,9 @@ -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com ----- The library functions for the lineVariantsG3 executable. Is rewritten from the Phonetic.Languages.Simple module from the+-- Library module that contains functions earlier used by the lineVariantsG3+-- executable for the Ukrainian language (see: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array).+-- Is rewritten from the Phonetic.Languages.Simple module from the -- @phonetic-languages-simplified-examples-array@ package. module Phonetic.Languages.General.Simple where@@ -48,15 +50,22 @@ -- | Is used to do general processment. generalProc2G- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]- -> Concatenations+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> FilePath -> Bool@@ -82,15 +91,22 @@ -- | generalProc2- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]- -> Concatenations+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one.+ -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> Bool -> Bool@@ -151,9 +167,7 @@ else let !perms = decodeLConstraints argCs . genPermutationsL $ l in generalProcMMs wrs ks arr gs js vs h qs interactive coeffs argsZipped perms subs -{-|-Function provides message information. --}+-- | Function provides message information. messageInfo :: Int -> String messageInfo n | n == 1 = "You stopped the program, please, if needed, run it again with better arguments. "@@ -183,18 +197,27 @@ getLine generalProcMs- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one. -> Coeffs2- -> [Array Int Int]+ -> [Array Int Int] -- ^ Permutations data. -> [String]- -> ([Int],Int,Int,String)+ -> ([Int],Int,Int,String) -- ^ The '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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> IO [Result [] Char Double Double] generalProcMs wrs ks arr gs js vs h qs coeffs perms subs (intervalNmbrs, arg0, numberI, choice) = do if compare numberI 2 == LT then let !frep2 = chooseMax wrs ks arr gs js vs id h coeffs qs choice in return . fst . maximumGroupsClassificationR arg0 .@@ -208,18 +231,27 @@ -- | generalProcMMs- :: GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -> String- -> (Double -> String -> ([[[PRS]]] -> [[Double]]))- -> [([[[PRS]]] -> [[Double]])]+ -> (Double -> String -> ([[[PRS]]] -> [[Double]])) -- ^ The function that is needed in the 'procRhythmicity23F' function.+ -- Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and+ -- depends on two parameters. Is specific for every phonetic language and every representation, so must be provided+ -- by the user in every case. The example of the function can be found in the package @phonetic-languages-simplified-properties-array@.+ -> [([[[PRS]]] -> [[Double]])] -- ^ A list of 4 different functions that specifies the syllables durations, analogues of the+ -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package. The last one must be probably the most+ -- exact one and, therefore, the default one. -> Bool -> Coeffs2- -> [([Int],Int,Int,String)]- -> [Array Int Int]+ -> [([Int],Int,Int,String)] -- ^ The '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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. + -> [Array Int Int] -- ^ Permutations data. -> [String] -> IO String generalProcMMs wrs ks arr gs js vs h qs interactiveMM coeffs rs perms subs =
Phonetic/Languages/Simplified/Array/General/FuncRep2RelatedG2.hs view
@@ -5,7 +5,7 @@ -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com ----- Functions to choose from the 'FuncRep2' variants.+-- Functions to choose from the 'FuncRep2' variants for the general phonetic languages approach. {-# LANGUAGE BangPatterns #-} @@ -22,19 +22,25 @@ -- | 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. chooseMax- :: (Ord c) =>GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ :: (Ord c) => GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -- ^ 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.+ -- 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 -- exact one and, therefore, the default one.- -> String+ -> 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> FuncRep2 String Double c chooseMax = chooseMaxG 1.3 {-# INLINE chooseMax #-}@@ -42,19 +48,25 @@ -- | Allows to choose the variant of the computations in case of usual processment. chooseMaxG :: (Ord c) => Double -- ^ Must be greater than 1.0 though it is not checked.- -> GWritingSystemPRPLX- -> [(Char,Char)]- -> CharPhoneticClassification+ -> GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.+ -> [(Char,Char)] -- ^ The pairs of the 'Char' that corresponds to the similar phonetic languages consonant phenomenon+ -- (e. g. allophones). Must be sorted in the ascending order to be used correctly. + -> CharPhoneticClassification -- ^ The 'Array' 'Int' 'PRS' must be sorted in the ascending order to be used in the module correctly. -> SegmentRulesG -> String -- ^ 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.+ -- 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 -- exact one and, therefore, the default one.- -> String+ -> 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. -> FuncRep2 String Double c chooseMaxG k wrs ks arr gs us vs g h coeffs xs choice = getBFstL' (procB2InvF wrs ks arr gs us vs g (xs !! 3) coeffs) [("02y",procRhythmicity23F k g h "02y" coeffs wrs ks arr gs us vs),@@ -83,7 +95,12 @@ ("zz4", procB2InvFF wrs ks arr gs us vs k g (xs !! 3) coeffs)] choice -- | Allows to choose precision in the Numeric.showFDouble function being given a choice parameter.-precChoice :: String -> Maybe Int+precChoice+ :: 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). Specifies the applied properties+ -- to get the result. The \"z\"-line uses \'F\' functions. + -> Maybe Int precChoice = getBFstL' (Just 4) [("02y",Just 0),("02z",Just 0),("03y",Just 0),("03z",Just 0),("04y",Just 0), ("04z",Just 0),("0y",Just 0),("0z",Just 0),("y",Just 0),("y0",Just 0),("y2",Just 0),("y3",Just 0), ("y4",Just 0), ("z",Just 0),("z0",Just 0),("z2",Just 0),("z3",Just 0), ("z4",Just 0)]
phonetic-languages-simplified-generalized-examples-array.cabal view
@@ -3,13 +3,13 @@ -- http://haskell.org/cabal/users-guide/ name: phonetic-languages-simplified-generalized-examples-array-version: 0.1.0.1+version: 0.1.1.0 synopsis: Helps to create texts with the given phonetic properties (e. g. poetic). description: Is rewritten from the library modules of the @phonetic-languages-simplified-examples-array@ package. Can be used not only for Ukrainian, but also for other languages. homepage: https://hackage.haskell.org/package/phonetic-languages-simplified-generalized-examples-array license: MIT license-file: LICENSE-author: Oleksndr Zhabenko+author: Oleksandr Zhabenko maintainer: olexandr543@yahoo.com copyright: Oleksandr Zhabenko category: Language, Math, Game@@ -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 -- other-modules: other-extensions: BangPatterns, FlexibleContexts- build-depends: base >=4.8 && <4.15, phonetic-languages-simplified-generalized-examples-common >=0.1.0.1 && <1, subG >=0.4.2 && <1, phonetic-languages-simplified-generalized-properties-array >=0.1.0.2 && <1, phonetic-languages-simplified-base >=0.2 && <1, phonetic-languages-permutations-array >=0.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-phonetics-basics >=0.6.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.2 && <1, mmsyn2-array >=0.1.3 && <1, heaps >=0.3.6.1 && <1+ build-depends: base >=4.8 && <4.15, phonetic-languages-simplified-generalized-examples-common >=0.1.1 && <1, subG >=0.4.2 && <1, phonetic-languages-simplified-generalized-properties-array >=0.1.1 && <1, phonetic-languages-simplified-base >=0.2 && <1, phonetic-languages-permutations-array >=0.1 && <1, phonetic-languages-filters-array >=0.1 && <1, phonetic-languages-phonetics-basics >=0.6.2 && <1, phonetic-languages-constraints-array >=0.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.2 && <1, mmsyn2-array >=0.1.3 && <1, heaps >=0.3.6.1 && <1 -- hs-source-dirs: default-language: Haskell2010