phonetic-languages-examples 0.2.0.0 → 0.3.0.0
raw patch · 6 files changed
+122/−51 lines, 6 filesdep ~phonetic-languages-propertiesdep ~ukrainian-phonetics-basicPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-properties, ukrainian-phonetics-basic
API changes (from Hackage documentation)
- Languages.UniquenessPeriods.Vector.FuncRepRelatedG: chooseMax :: String -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
+ Languages.UniquenessPeriods.Vector.FuncRepRelatedG: chooseMax :: Coeffs2 -> String -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
- Languages.UniquenessPeriods.Vector.FuncRepRelatedG: chooseMin :: String -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
+ Languages.UniquenessPeriods.Vector.FuncRepRelatedG: chooseMin :: Coeffs2 -> String -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
Files
- CHANGELOG.md +5/−0
- GetInfo/Main.hs +31/−15
- Languages/UniquenessPeriods/Vector/FuncRepRelatedG.hs +22/−6
- Lines/Main.hs +33/−19
- Simple/Main.hs +26/−6
- phonetic-languages-examples.cabal +5/−5
CHANGELOG.md view
@@ -17,3 +17,8 @@ * Second version. Added the possibilities to use new related to generated with r-glpk-phonetic-languages-ukrainian-durations package duration metrices. Changed the dependencies boundaries for this.++## 0.3.0.0 -- 2020-11-09++* Third version. Added the possibility to use coefficients' version of the rhythmicity-related functions from the phonetic-languages-rhythmicity and+phonetic-languages-properties packages.
GetInfo/Main.hs view
@@ -37,6 +37,8 @@ import qualified Data.Vector as VB import Languages.UniquenessPeriods.Vector.General.DebugG hiding (newLineEnding) import Languages.UniquenessPeriods.Vector.PropertiesG+import Languages.UniquenessPeriods.Vector.PropertiesFuncRepG+import Languages.UniquenessPeriods.Vector.PropertiesSyllablesG import Melodics.ByteString.Ukrainian import System.Environment import Languages.Phonetic.Ukrainian.PrepareText@@ -49,17 +51,31 @@ import Data.Statistics.RulesIntervals import Languages.UniquenessPeriods.Vector.FuncRepRelatedG + main :: IO () main = do- args <- getArgs- let !file = concat . take 1 $ args -- The first command line arguments except those ones that are RTS arguments- !gzS = concat . take 1 . drop 1 $ args -- The second command line argument that controls the choice of the number of intervals- !printLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 2 $ args)::(Maybe Int)) -- The third command line argument except those ones that are RTS arguments. Set to 1 if you would like to print the current line within the information- !toOneLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 3 $ args)::(Maybe Int)) -- The fourth command line argument except those ones that are RTS arguments. Set to 1 if you would like to convert the text into one single line before applying to it the processment (it can be more conceptually consistent in such a case)- !choice = concat . drop 4 . take 5 $ args -- The fifth command line argument that controls what properties are used.+ args <- getArgs+ let !coeffs = readCF . concat . take 1 $ args -- The first command line argument. If not sure, pass just \"1\".+ if isPair coeffs then do+ let !file = concat . drop 1 . take 2 $ args -- The second command line arguments except those ones that are RTS arguments+ !gzS = concat . take 1 . drop 2 $ args -- The third command line argument that controls the choice of the number of intervals+ !printLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 3 $ args)::(Maybe Int)) -- The fourth command line argument except those ones that are RTS arguments. Set to 1 if you would like to print the current line within the information+ !toOneLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 4 $ args)::(Maybe Int)) -- The fifth command line argument except those ones that are RTS arguments. Set to 1 if you would like to convert the text into one single line before applying to it the processment (it can be more conceptually consistent in such a case)+ !choice = concat . drop 5 . take 6 $ args -- The sixth command line argument that controls what properties are used.+ generalProc coeffs file gzS printLine toOneLine choice+ else do+ let !file = concat . take 1 $ args+ !gzS = concat . take 1 . drop 1 $ args+ !printLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 2 $ args)::(Maybe Int))+ !toOneLine = fromMaybe 0 (readMaybe (concat . take 1 . drop 3 $ args)::(Maybe Int))+ !choice = concat . drop 4 . take 5 $ args+ generalProc coeffs file gzS printLine toOneLine choice++generalProc :: Coeffs2 -> FilePath -> String -> Int -> Int -> String -> IO ()+generalProc coeffs file gzS printLine toOneLine choice = do contents <- readFile file let !flines = fLines toOneLine contents- getData3 (getIntervalsN gzS flines) printLine choice flines+ getData3 coeffs (getIntervalsN gzS flines) printLine choice flines getIntervalsN :: String -> [VB.Vector Char] -> Int getIntervalsN xs ys@@ -68,11 +84,11 @@ | otherwise = fromMaybe 9 (readMaybe xs::(Maybe Int)) {-# INLINE getIntervalsN #-} -getData3 :: Int -> Int -> String -> [VB.Vector Char] -> IO ()-getData3 gz printLine choice zs = let !permsV4 = genPermutationsV in mapM_ (process1Line gz printLine choice permsV4) zs+getData3 :: Coeffs2 -> Int -> Int -> String -> [VB.Vector Char] -> IO ()+getData3 coeffs gz printLine choice zs = let !permsV4 = genPermutationsV in mapM_ (process1Line coeffs gz printLine choice permsV4) zs -process1Line :: Int -> Int -> String -> VB.Vector (VB.Vector (VB.Vector Int)) -> VB.Vector Char -> IO ()-process1Line gz printLine choice !permsV5 v = bracket (do+process1Line :: Coeffs2 -> Int -> Int -> String -> VB.Vector (VB.Vector (VB.Vector Int)) -> VB.Vector Char -> IO ()+process1Line coeffs gz printLine choice !permsV5 v = bracket (do myThread <- forkIO (do let !whspss = VB.fromList " 01-" !v2 = subG whspss v@@ -80,12 +96,12 @@ (!maxE,!minE,!data2) | compare l2 0 /= LT = runEval (parTuple3 rpar rpar rpar ((\k -> if k == 0.0 then 1.0 else k) . (\ls -> if null ls then 0.0 else head ls) . firstFrom3 . maximumElBy 1 (VB.singleton oneProperty) $- UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id (VB.unsafeIndex permsV5 l2) (VB.singleton oneProperty) (chooseMax choice) v2),+ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id (VB.unsafeIndex permsV5 l2) (VB.singleton oneProperty) (chooseMax coeffs choice) v2), (\k -> if k == 0.0 then 1.0 else k) . abs . (\ls -> if null ls then 0.0 else head ls) . firstFrom3 . maximumElBy 1 (VB.singleton oneProperty) $- UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id (VB.unsafeIndex permsV5 l2) (VB.singleton oneProperty) (chooseMin choice) v2),- (\k -> if k == 0.0 then 1.0 else k) . head . getAC (chooseMax choice) $ v))- | otherwise = let !mono = (\k -> if k == 0.0 then 1.0 else k) . head . getAC (chooseMax choice) $ v in (mono,mono,mono)+ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id (VB.unsafeIndex permsV5 l2) (VB.singleton oneProperty) (chooseMin coeffs choice) v2),+ (\k -> if k == 0.0 then 1.0 else k) . head . getAC (chooseMax coeffs choice) $ v))+ | otherwise = let !mono = (\k -> if k == 0.0 then 1.0 else k) . head . getAC (chooseMax coeffs choice) $ v in (mono,mono,mono) (!wordsN,!intervalN) | maxE == 1.0 = (0, 0) | otherwise = runEval (parTuple2 rpar rpar (l2 + 2, intervalNRealFrac minE maxE gz data2))
Languages/UniquenessPeriods/Vector/FuncRepRelatedG.hs view
@@ -7,23 +7,39 @@ -- -- Functions to choose from the 'FuncRep' variants. +{-# LANGUAGE BangPatterns #-}+ module Languages.UniquenessPeriods.Vector.FuncRepRelatedG where +import Data.Maybe (isNothing,fromMaybe)+import Text.Read import CaseBi (getBFst') import qualified Data.Vector as VB import Languages.UniquenessPeriods.Vector.DataG import String.Languages.UniquenessPeriods.VectorG import Languages.UniquenessPeriods.Vector.PropertiesFuncRepG+import Languages.UniquenessPeriods.Vector.PropertiesSyllablesG+import Languages.UniquenessPeriods.Vector.PropertiesG -- | Allows to choose the variant of the computations in case of usual processment.-chooseMax :: String -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]-chooseMax =- getBFst' (procBoth2InvF, VB.fromList [("02y",procRhythmicity232F),("0y",procRhythmicity23F),("y",procBothF),("y0",procDiverse2F),("y2",procBoth2F)])+chooseMax :: Coeffs2 -> String -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]+chooseMax coeffs choice+ | isPair coeffs =+ let !k2 = fromMaybe 1.0 . fstCF $ coeffs+ !k3 = fromMaybe 1.0 . sndCF $ coeffs in getBFst' (procBoth2InvF coeffs, VB.fromList [("02y",procRhythmicity232F "02y" coeffs),+ ("0y",procRhythmicity23F "0y" coeffs),("y",procBothF coeffs),("y0",procDiverse2F),("y2",procBoth2F coeffs)]) choice+ | otherwise = getBFst' (procBoth2InvF coeffs, VB.fromList [("02y",procRhythmicity232F "02y" coeffs),("0y",procRhythmicity23F "0y" coeffs),+ ("y",procBothF coeffs),("y0",procDiverse2F),("y2",procBoth2F coeffs)]) choice -- | Allows to choose the variant of the computations in case of minimum lookup. Uses @-neg@ variants.-chooseMin :: String -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]-chooseMin = getBFst' (procBoth2InvFneg, VB.fromList [("02y",procRhythmicity232Fneg),("0y",procRhythmicity23Fneg),("y",procBothFneg),- ("y0",procDiverse2Fneg),("y2",procBoth2Fneg)])+chooseMin :: Coeffs2 -> String -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]+chooseMin coeffs choice+ | isPair coeffs =+ let !k2 = fromMaybe 1.0 . fstCF $ coeffs+ !k3 = fromMaybe 1.0 . sndCF $ coeffs in getBFst' (procBoth2InvFneg coeffs, VB.fromList [("02y",procRhythmicity232Fneg "02y" coeffs),+ ("0y",procRhythmicity23Fneg "0y" coeffs),("y",procBothFneg coeffs),("y0",procDiverse2Fneg),("y2",procBoth2Fneg coeffs)]) choice+ | otherwise = getBFst' (procBoth2InvFneg coeffs, VB.fromList [("02y",procRhythmicity232Fneg "02y" coeffs),("0y",procRhythmicity23Fneg "0y" coeffs),+ ("y",procBothFneg coeffs),("y0",procDiverse2Fneg),("y2",procBoth2Fneg coeffs)]) choice -- | Allows to choose precision in the Numeric.showFFloat function being given a choice parameter. precChoice :: String -> Maybe Int
Lines/Main.hs view
@@ -19,6 +19,8 @@ import qualified Data.Vector as VB import Data.List (sort) import Languages.UniquenessPeriods.Vector.PropertiesG+import Languages.UniquenessPeriods.Vector.PropertiesFuncRepG+import Languages.UniquenessPeriods.Vector.PropertiesSyllablesG import Languages.UniquenessPeriods.Vector.General.DebugG import Languages.UniquenessPeriods.Vector.StrictVG import Languages.UniquenessPeriods.Vector.Filters (unsafeSwapVecIWithMaxI)@@ -43,12 +45,24 @@ -- main :: IO () main = do- args <- getArgs+ args <- getArgs+ let coeffs = readCF . concat . take 1 $ args -- The first command line argument. If not sure, pass just \"1\".+ if isPair coeffs then do+ let !numericArgs = filter (all isDigit) . drop 3 $ args+ !choice = concat . drop 2 . take 3 $ args+ !numberI = fromMaybe 1 (readMaybe (concat . take 1 $ numericArgs)::Maybe Int)+ !file = concat . drop 1 . take 2 $ args+ generalProcessment coeffs numericArgs choice numberI file+ else do let !numericArgs = filter (all isDigit) . drop 2 $ args !choice = concat . drop 1 . take 2 $ args !numberI = fromMaybe 1 (readMaybe (concat . take 1 $ numericArgs)::Maybe Int) !file = concat . take 1 $ args- !permsV = VB.force genPermutationsV+ generalProcessment coeffs numericArgs choice numberI file++generalProcessment :: Coeffs2 -> [String] -> String -> Int -> FilePath -> IO ()+generalProcessment coeffs numericArgs choice numberI file = do+ let !permsV = VB.force genPermutationsV contents <- readFile file let !flines = fLines contents !lasts = map (\ts -> if null . words $ ts then [] else last . words $ ts) flines@@ -56,8 +70,8 @@ !whspss = VB.fromList " 01-" if compare numberI 2 == LT then do let !zs = if compare l 0 == LT then concat . take 1 $ flines else VB.toList . lastFrom3 . headU2 . fst . get22 .- uniqNProperties2GN ' ' whspss id id id (VB.unsafeIndex permsV l) (PA VB.empty (VB.fromList . concat . take 1 $ lasts)) 1 1 (VB.singleton oneProperty) (chooseMax choice) . VB.fromList . unwords . init . words . concat . take 1 $ flines- toFileStr (file ++ ".new.txt") (zs:(noDoubleWords . circle2 permsV (concat . take 1 $ lasts) choice [] . drop 1 $ flines))+ uniqNProperties2GN ' ' whspss id id id (VB.unsafeIndex permsV l) (PA VB.empty (VB.fromList . concat . take 1 $ lasts)) 1 1 (VB.singleton oneProperty) (chooseMax coeffs choice) . VB.fromList . unwords . init . words . concat . take 1 $ flines+ toFileStr (file ++ ".new.txt") (zs:(noDoubleWords . circle2 coeffs permsV (concat . take 1 $ lasts) choice [] . drop 1 $ flines)) else do let !intervalNmbrs = (\vs -> if null vs then VB.singleton numberI else VB.uniq . VB.fromList $ vs) . sort . filter (<= numberI) . map (\t -> fromMaybe numberI (readMaybe t::Maybe Int)) . drop 2 $ numericArgs@@ -68,13 +82,13 @@ !v = if compare l2 0 == LT then VB.empty else VB.fromList . unwords . init $ us !v2 = subG whspss v (!maxE,!minE) = runEval (parTuple2 rpar rpar ((\k -> if k == 0.0 then 1.0 else k) . (\rs -> if null rs then 0.0 else head rs) . firstFrom3 .- maximumElBy 1 (VB.singleton oneProperty) $ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms2 (VB.singleton oneProperty) (chooseMax choice) $ v2), (\k -> if k == 0.0 then 1.0 else k) . abs .+ maximumElBy 1 (VB.singleton oneProperty) $ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms2 (VB.singleton oneProperty) (chooseMax coeffs choice) $ v2), (\k -> if k == 0.0 then 1.0 else k) . abs . (\rs -> if null rs then 0.0 else head rs) . firstFrom3 . maximumElBy 1 (VB.singleton oneProperty) $- UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms2 (VB.singleton oneProperty) (chooseMin choice) $ v2)))+ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms2 (VB.singleton oneProperty) (chooseMin coeffs choice) $ v2))) !zs = if compare l2 0 == LT then concat . take 1 $ flines else VB.toList . lastFrom3 . headU2 . fst . get22 .- uniqNProperties2GN ' ' whspss id id id perms2 (PA VB.empty (VB.fromList . concat . take 1 $ lasts)) 1 1 (VB.singleton (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs . oneProperty)) (chooseMax choice) $ v- toFile (file ++ ".new.txt") (zs:(noDoubleWords . circle2I permsV whspss (concat . take 1 $ lasts) choice [] numberI intervalNmbrs minE maxE . drop 1 $ flines))- else toFileStr (file ++ ".new.txt") ((concat . take 1 $ flines):(noDoubleWords . circle2I permsV whspss (concat . take 1 $ lasts) choice [] numberI intervalNmbrs 0.0 0.0 . drop 1 $ flines))+ uniqNProperties2GN ' ' whspss id id id perms2 (PA VB.empty (VB.fromList . concat . take 1 $ lasts)) 1 1 (VB.singleton (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs . oneProperty)) (chooseMax coeffs choice) $ v+ toFile (file ++ ".new.txt") (zs:(noDoubleWords . circle2I coeffs permsV whspss (concat . take 1 $ lasts) choice [] numberI intervalNmbrs minE maxE . drop 1 $ flines))+ else toFileStr (file ++ ".new.txt") ((concat . take 1 $ flines):(noDoubleWords . circle2I coeffs permsV whspss (concat . take 1 $ lasts) choice [] numberI intervalNmbrs 0.0 0.0 . drop 1 $ flines)) fLines :: String -> [String] fLines ys =@@ -85,37 +99,37 @@ in g preText wss -- | Processment without rearrangements.-circle2 :: VB.Vector (VB.Vector (VB.Vector Int)) -> String -> String -> [String] -> [String] -> [String]-circle2 permsG1 xs choice yss xss+circle2 :: Coeffs2 -> VB.Vector (VB.Vector (VB.Vector Int)) -> String -> String -> [String] -> [String] -> [String]+circle2 coeffs permsG1 xs choice yss xss | null xss = yss- | otherwise = circle2 permsG1 (if null rs then [] else last rs) choice (ws:yss) tss+ | otherwise = circle2 coeffs permsG1 (if null rs then [] else last rs) choice (ws:yss) tss where (!zss,!tss) = splitAt 1 xss !rs = words . concat $ zss !ws = if compare (length rs) 3 == LT then unwords (xs:rs) else VB.toList . lastFrom3 . headU2 . fst . get22 .- uniqNProperties2GN ' ' (VB.fromList " 01-") id id id (VB.unsafeIndex permsG1 $ length rs - 3) (PA (VB.fromList xs) (VB.fromList . last $ rs)) 1 1 (VB.singleton oneProperty) (chooseMax choice) . VB.fromList . unwords . init $ rs+ uniqNProperties2GN ' ' (VB.fromList " 01-") id id id (VB.unsafeIndex permsG1 $ length rs - 3) (PA (VB.fromList xs) (VB.fromList . last $ rs)) 1 1 (VB.singleton oneProperty) (chooseMax coeffs choice) . VB.fromList . unwords . init $ rs -- | Processment with rearrangements.-circle2I :: VB.Vector (VB.Vector (VB.Vector Int)) -> VB.Vector Char -> String -> String -> [String] -> Int -> VB.Vector Int -> Float -> Float -> [String] -> [String]-circle2I permsG1 whspss xs choice yss numberI vI minE maxE xss+circle2I :: Coeffs2 -> VB.Vector (VB.Vector (VB.Vector Int)) -> VB.Vector Char -> String -> String -> [String] -> Int -> VB.Vector Int -> Float -> Float -> [String] -> [String]+circle2I coeffs permsG1 whspss xs choice yss numberI vI minE maxE xss | null xss = yss- | otherwise = circle2I permsG1 whspss (if null rs then [] else last rs) choice (ws:yss) numberI vI minE1 maxE1 tss+ | otherwise = circle2I coeffs permsG1 whspss (if null rs then [] else last rs) choice (ws:yss) numberI vI minE1 maxE1 tss where (!zss,!tss) = splitAt 1 xss !w2s = words . concat . take 1 $ tss !l3 = (subtract 3) . length $ w2s !rs = words . concat $ zss !ws = if compare (length rs) 3 == LT then unwords (xs:rs) else VB.toList . lastFrom3 . headU2 . fst . get22 . uniqNProperties2GN ' ' (VB.fromList " 01-") id id id (VB.unsafeIndex permsG1 $ length rs - 3) (PA (VB.fromList xs) (VB.fromList . last $ rs)) 1 1 (VB.singleton (unsafeSwapVecIWithMaxI minE maxE numberI vI .- oneProperty)) (chooseMax choice) . VB.fromList . unwords . init $ rs+ oneProperty)) (chooseMax coeffs choice) . VB.fromList . unwords . init $ rs (!maxE1,!minE1) | compare l3 0 /= LT = let !perms3 = VB.force . VB.unsafeIndex permsG1 $ l3 !v3 = VB.fromList . unwords . init $ w2s !v4 = subG whspss v3 in runEval (parTuple2 rpar rpar ((\k -> if k == 0.0 then 1.0 else k) . (\ls -> if null ls then 0.0 else head ls) . firstFrom3 . maximumElBy 1 (VB.singleton oneProperty) $ UL2 (VB.empty,- uniquenessVariants2GNB ' ' id id id perms3 (VB.singleton oneProperty) (chooseMax choice) $ v4),+ uniquenessVariants2GNB ' ' id id id perms3 (VB.singleton oneProperty) (chooseMax coeffs choice) $ v4), (\k -> if k == 0.0 then 1.0 else k) . abs . (\ls -> if null ls then 0.0 else head ls) . firstFrom3 . maximumElBy 1 (VB.singleton oneProperty) $- UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms3 (VB.singleton oneProperty) (chooseMin choice) $ v4)))+ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms3 (VB.singleton oneProperty) (chooseMin coeffs choice) $ v4))) | otherwise = (0.0,0.0) headU2
Simple/Main.hs view
@@ -20,6 +20,8 @@ import Languages.UniquenessPeriods.Vector.General.DebugG import Languages.UniquenessPeriods.Vector.AuxiliaryG import Languages.UniquenessPeriods.Vector.PropertiesG+import Languages.UniquenessPeriods.Vector.PropertiesFuncRepG+import Languages.UniquenessPeriods.Vector.PropertiesSyllablesG import Languages.UniquenessPeriods.Vector.Filters import Languages.UniquenessPeriods.Vector.StrictVG import Languages.Phonetic.Ukrainian.PrepareText@@ -45,7 +47,21 @@ -- The most interesting is the first line of the output. But other ones also are noteworthy. main :: IO () main = do- args <- getArgs+ args <- getArgs+ let coeffs = readCF . concat . take 1 $ args -- The first command line argument. If not sure, just pass \"1\".+ !whspss = VB.fromList " 01-"+ if isPair coeffs then do+ let (!numericArgs,!textualArgs) = L.span (all isDigit) . drop 1 $ args+ !arg0 = fromMaybe 1 $ (readMaybe (concat . take 1 $ numericArgs)::Maybe Int)+ !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)+ !choice = concat . take 1 $ textualArgs+ !xs = concat . take 1 . fLines . unwords . drop 1 $ textualArgs+ !l = length . words $ xs+ !v = VB.fromList xs+ !perms = genPermutations l+ !subs = subG whspss v+ generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v+ else do let (!numericArgs,!textualArgs) = L.span (all isDigit) args !arg0 = fromMaybe 1 $ (readMaybe (concat . take 1 $ numericArgs)::Maybe Int) !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)@@ -53,19 +69,23 @@ !xs = concat . take 1 . fLines . unwords . drop 1 $ textualArgs !l = length . words $ xs !v = VB.fromList xs- !whspss = VB.fromList " 01-" !perms = genPermutations l !subs = subG whspss v+ generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v++generalProc1 :: Coeffs2 -> [String] -> Int -> Int -> String -> Int -> VB.Vector (VB.Vector Int) -> VB.Vector (VB.Vector Char) -> VB.Vector Char -> IO ()+generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v = do if compare numberI 2 == LT then printUniquenessG1VChar (I1 H) . fst . get22 . uniqNProperties2GN ' ' (VB.fromList " 01-") id id id perms K arg0 1 (VB.singleton (oneProperty))- (chooseMax choice) $ v+ (chooseMax coeffs choice) $ v else do let !intervalNmbrs = (\zs -> if null zs then VB.singleton numberI else VB.uniq . VB.fromList $ zs) . L.sort . filter (<= numberI) . map (\t -> fromMaybe numberI $ (readMaybe t::Maybe Int)) . drop 2 $ numericArgs (!maxE,!minE) = runEval ((parTuple2 rpar rpar) ((\k -> if k == 0.0 then 1.0 else k) . (\rs -> if null rs then 0.0 else head rs) . firstFrom3 .- maximumElBy 1 (VB.singleton (oneProperty)) $ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms (VB.singleton (oneProperty)) (chooseMax choice) $ subs), (\k -> if k == 0.0 then 1.0 else k) . abs . (\rs -> if null rs then 0.0 else head rs) .+ maximumElBy 1 (VB.singleton (oneProperty)) $ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms (VB.singleton (oneProperty)) (chooseMax coeffs choice) $ subs), (\k -> if k == 0.0 then 1.0 else k) . abs . (\rs -> if null rs then 0.0 else head rs) . firstFrom3 . maximumElBy 1 (VB.singleton (oneProperty)) $ UL2 (VB.empty,uniquenessVariants2GNB ' ' id id id perms (VB.singleton (oneProperty))- (chooseMin choice) $ subs)))+ (chooseMin coeffs choice) $ subs))) printUniquenessG1VChar (I1 H) . fst . get22 . uniqNProperties2GN ' ' (VB.fromList " 01-") id id id perms K arg0 1 (VB.singleton (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs .- oneProperty)) (chooseMax choice) $ v+ oneProperty)) (chooseMax coeffs choice) $ v+ fLines :: String -> [String] fLines ys =
phonetic-languages-examples.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: phonetic-languages-examples-version: 0.2.0.0+version: 0.3.0.0 synopsis: A generalization of the uniqueness-periods-vector-examples functionality. description: Is intended to use more functionality of the Data.Vector, Data.Foldable, Data.Monoid and Data.SubG modules. homepage: https://hackage.haskell.org/package/phonetic-languages-examples@@ -20,7 +20,7 @@ exposed-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG -- other-modules: other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, phonetic-languages-vector >=0.1 && <1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.2 && <1, vector >=0.11 && < 0.14, mmsyn2 >=0.3 && <1+ build-depends: base >=4.7 && <4.15, phonetic-languages-vector >=0.1 && <1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, vector >=0.11 && < 0.14, mmsyn2 >=0.3 && <1 -- hs-source-dirs: default-language: Haskell2010 @@ -28,7 +28,7 @@ main-is: Main.hs other-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.2 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >=0.1.1.1 && < 1, mmsyn2 >= 0.3 && <1+ build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.1 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >=0.1.1.1 && < 1, mmsyn2 >= 0.3 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Simple default-language: Haskell2010@@ -37,7 +37,7 @@ main-is: Main.hs other-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.2 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1+ build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.1 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Lines default-language: Haskell2010@@ -46,7 +46,7 @@ main-is: Main.hs other-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.2 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, uniqueness-periods-vector-stats >=0.1.2 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1+ build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.1 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, uniqueness-periods-vector-stats >=0.1.2 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., GetInfo default-language: Haskell2010