aftovolio 0.3.0.2 → 0.4.0.0
raw patch · 7 files changed
+90/−66 lines, 7 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Aftovolio.Halfsplit: removeChangesOfDurations :: String -> String
- Aftovolio.General.Simple: argsProcessing :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([[[PRS]]] -> [[Word8]]) -> [[String]] -> [[String]] -> String -> IO (Int, Int, Compards, Bool, FilePath, String, String, String, Int, Bool, Int8, FilePath, Int, Bool, String, [String])
+ Aftovolio.General.Simple: argsProcessing :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([[[PRS]]] -> [[Word8]]) -> [[String]] -> [[String]] -> String -> IO (Int, Int, Compards, Bool, Bool, FilePath, String, String, String, Int, Bool, Int8, FilePath, Int, Bool, String, [String])
- Aftovolio.General.Simple: generalF :: Int -> Int -> Compards -> Bool -> FilePath -> String -> (String -> String) -> (String, String) -> Int -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([[[PRS]]] -> [[Word8]]) -> Int -> HashCorrections -> (Int8, [Int8]) -> Bool -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> String -> [String] -> IO [String]
+ Aftovolio.General.Simple: generalF :: Int -> Int -> Compards -> Bool -> Bool -> FilePath -> String -> (String -> String) -> (String, String) -> Int -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([[[PRS]]] -> [[Word8]]) -> Int -> HashCorrections -> (Int8, [Int8]) -> Bool -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> String -> [String] -> IO [String]
- Aftovolio.General.Simple: testsOutput :: (Show a1, Integral a1) => Bool -> Int -> (Int -> Compards -> Int8 -> [Int8] -> String -> a1) -> Int -> Int -> [String] -> IO [String]
+ Aftovolio.General.Simple: testsOutput :: (Show a1, Integral a1) => Bool -> Int -> Bool -> (Int -> Compards -> Int8 -> [Int8] -> String -> a1) -> Int -> Int -> [String] -> IO [String]
- Aftovolio.Halfsplit: halfsplit :: (Show a, Eq b) => (a -> b) -> Int8 -> [a] -> String
+ Aftovolio.Halfsplit: halfsplit :: (Show a, Eq b) => (a -> b) -> Bool -> Int8 -> [a] -> String
- Aftovolio.Halfsplit: halfsplit1G :: (Show a, Eq b) => (a -> b) -> String -> Int8 -> [a] -> String
+ Aftovolio.Halfsplit: halfsplit1G :: (Show a, Eq b) => (a -> b) -> Bool -> String -> Int8 -> [a] -> String
- Aftovolio.Halfsplit: halfsplit2G :: (Show a, Eq b) => (a -> b) -> String -> String -> String -> Int8 -> [a] -> String
+ Aftovolio.Halfsplit: halfsplit2G :: (Show a, Eq b) => (a -> b) -> Bool -> String -> String -> String -> Int8 -> [a] -> String
- Aftovolio.Halfsplit: print23 :: String -> String -> Int -> [String] -> IO ()
+ Aftovolio.Halfsplit: print23 :: Bool -> String -> String -> Int -> [String] -> IO ()
- Aftovolio.Ukrainian.IO: generalF :: Int -> Int -> Compards -> Bool -> FilePath -> String -> (String, String) -> Int -> FilePath -> Int -> HashCorrections -> (Int8, [Int8]) -> Int -> Bool -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> String -> [String] -> IO [String]
+ Aftovolio.Ukrainian.IO: generalF :: Int -> Int -> Compards -> Bool -> Bool -> FilePath -> String -> (String, String) -> Int -> FilePath -> Int -> HashCorrections -> (Int8, [Int8]) -> Int -> Bool -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> String -> [String] -> IO [String]
- Aftovolio.Ukrainian.IO: testsOutput :: (Show a1, Integral a1) => Bool -> Int -> (Int -> Compards -> p2 -> Int8 -> [Int8] -> String -> a1) -> Int -> p2 -> Int -> [String] -> IO [String]
+ Aftovolio.Ukrainian.IO: testsOutput :: (Show a1, Integral a1) => Bool -> Int -> Bool -> (Int -> Compards -> p2 -> Int8 -> [Int8] -> String -> a1) -> Int -> p2 -> Int -> [String] -> IO [String]
Files
- Aftovolio/General/Simple.hs +14/−11
- Aftovolio/Halfsplit.hs +22/−11
- Aftovolio/Ukrainian/IO.hs +12/−10
- CHANGELOG.md +3/−0
- README.md +13/−11
- aftovolio.cabal +1/−1
- src/Main.hs +25/−22
Aftovolio/General/Simple.hs view
@@ -49,6 +49,7 @@ -> Int -- ^ A 'length' of the next argument here. -> Compards -- ^ A value that the different options are compared with. If no command line argument \"+di\" was added, then this is a `C1` applied to the list of positive values normed by 255 (the greatest of which is 255) that the line options are compared with. If null, then the program works without comparison. The length of it must be a least common multiplier of the (number of syllables plus number of \'_digits\' groups) to work correctly. Is not used when the next 'FilePath' and 'String' arguments are not null. If \"+di\" command line argument was provided, then this corresponds to the case of differentiation. -> Bool -- ^ If 'True' then adds \"<br>\" to line endings for double column output+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> FilePath -- ^ A path to the file to save double columns output to. If empty then just prints to 'stdout'. -> String -- ^ If not null than instead of rhythmicity evaluation using hashes and and feets, there is computed a diversity property for the specified 'String' here using the 'selectSounds' function. For more information, see: 'https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types' -> (String -> String) -- ^ A function that specifies what 'Char's in the list the first argument makes to be the function sensitive to. Analogue of the @g@ function in the definition: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array-0.21.0.0/docs/src/Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2.html#selectSounds. Use just small 'Char' if they are letters, do not use \'.\' and spaces.@@ -73,7 +74,7 @@ -> String -- ^ An initial string to be analyzed. -> [String] -> IO [String] -generalF power10 ldc compards html dcfile selStr selFun (prestr,poststr) lineNmb wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (fs, code) concurrently initstr universalSet +generalF power10 ldc compards html filtering dcfile selStr selFun (prestr,poststr) lineNmb wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (fs, code) concurrently initstr universalSet | L.null universalSet = do let strOutput = ["You have specified the data and constraints on it that lead to no further possible options.", "Please, specify another data and constraints."] putStrLn . unlines $ strOutput@@ -87,10 +88,10 @@ | L.null selStr = (if doubleFunc (L.null::[Word8]->Bool) (L.null::[Int8]->Bool) compards then (sum . countHashes2G hashStep hc grps mxms) else (`quot` 10^power10) . fromIntegral . sumAbsDistNormComp compards . (if isWord8Based compards then C1 else C2 . fromSmallWord8toInt8Diff)) . read3 (not . L.null . filter (not . isSpace)) 1.0 (mconcat . h . createSyllablesPL wrs ks arr gs us vs) | otherwise = fromIntegral . diverse2GGL (selectSounds selFun selStr) (us `mappend` vs) . concatMap string1 . stringToXG wrs . filter (\c -> not (isDigit c) && c /= '_' && c /= '=') hSetNewlineMode stdout universalNewlineMode- if numTest >= 0 && numTest <= 179 && numTest /= 1 && doubleFunc (L.null::[Word8]->Bool) (L.null::[Int8]->Bool) compards then testsOutput concurrently syllN f ldc numTest universalSet + if numTest >= 0 && numTest <= 179 && numTest /= 1 && doubleFunc (L.null::[Word8]->Bool) (L.null::[Int8]->Bool) compards then testsOutput concurrently syllN filtering f ldc numTest universalSet else let sRepresent = zipWith (\k (x, ys) -> S k x ys) [1..] . (if descending then sortOn (\(u,w) -> (Down u,w)) else sortOn id) . map (\xss -> (f ldc compards grps mxms xss, xss)) $ universalSet- strOutput = force . (:[]) . halfsplit1G (\(S _ y _) -> y) (if html then "<br>" else "") (jjj splitting) $ sRepresent+ strOutput = force . (:[]) . halfsplit1G (\(S _ y _) -> y) filtering (if html then "<br>" else "") (jjj splitting) $ sRepresent lns1 = unlines strOutput in do putStrLn lns1@@ -107,10 +108,10 @@ if code == -1 then if lineNmb == -1 then return strOutput else do - print23 prestr poststr 1 [initstr]+ print23 filtering prestr poststr 1 [initstr] return strOutput else do - print23 prestr poststr 1 [initstr]+ print23 filtering prestr poststr 1 [initstr] parseLineNumber l1 >>= \num -> do permiss <- getPermissions fs let writ = writable permiss@@ -186,7 +187,7 @@ -> [[String]] -> [[String]] -> String - -> IO (Int, Int, Compards, Bool, FilePath, String, String, String, Int, Bool, Int8, FilePath, Int, Bool, String, [String]) -- ^ These ones are intended to be used inside 'generalF'.+ -> IO (Int, Int, Compards, Bool, Bool, FilePath, String, String, String, Int, Bool, Int8, FilePath, Int, Bool, String, [String]) -- ^ These ones are intended to be used inside 'generalF'. argsProcessing wrs ks arr gs us vs h ysss zsss xs = do args0 <- getArgs let (argsC, args) = takeCs1R ('+','-') cSpecs args0@@ -194,12 +195,13 @@ compareByLinesFinalFile = concat . getB "-cm" $ argsB if not . L.null $ compareByLinesFinalFile then do compareFilesToOneCommon 14 args11 compareByLinesFinalFile- return (0,0,(C1 []),False,[],[],[],[],0,False,0,[],0,False,[],[]) + return (0,0,(C1 []),False,False,[],[],[],[],0,False,0,[],0,False,[],[]) else do let prepare = any (== "-p") args11 emptyline = any (== "+l") args11 splitting = fromMaybe 50 (readMaybe (concat . getB "+w" $ argsB)::Maybe Int8) concurrently = any (== "-C") args11+ filtering = any (== "-e") args11 dcspecs = getB "+dc" argsB (html,dcfile) | L.null dcspecs = (False, "")@@ -279,7 +281,7 @@ -- max2 = maximum basecomp compards = let ff g1 g2 ks = if isWord8Based ks then C1 . g1 . (\(C1 us) -> us) $ ks else C2 . g2 . (\(C2 us) -> us)$ ks in ff (concatMap (replicate mulp)) (concatMap (replicate mulp)) basecomp variants1 = force . uniquenessVariants2GNBL ' ' id id id perms $ ll- return (power10, ldc, compards, html, dcfile, selStr, prestr, poststr, lineNmb, emptyline, splitting, filesave, codesave, concurrently, basiclineoption, variants1)+ return (power10, ldc, compards, html, filtering, dcfile, selStr, prestr, poststr, lineNmb, emptyline, splitting, filesave, codesave, concurrently, basiclineoption, variants1) processingF :: (String -> String) -- ^ A function that specifies what 'Char's in the list the first argument makes to be the function sensitive to. Analogue of the @g@ function in the definition: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array-0.21.0.0/docs/src/Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2.html#parsey0Choice. Use just small 'Char' if they are letters, do not use \'.\' and spaces.@@ -299,7 +301,7 @@ -> Int -- ^ The hashing function step. The default value is 20. Is expected to be greater than 2, and better greater than 12. -> String -> IO ()-processingF selFun wrs ks arr gs us vs h numTest hc (grps,mxms) ysss zsss descending hashStep xs = argsProcessing wrs ks arr gs us vs h ysss zsss xs >>= \(power10, ldc, compards, html, dcfile, selStr, prestr, poststr, lineNmb, emptyline, splitting, filesave, codesave, concurrently, basiclineoption, variants1) -> generalF power10 ldc compards html dcfile selStr selFun (prestr,poststr) lineNmb wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (filesave, codesave) concurrently basiclineoption variants1 >> return ()+processingF selFun wrs ks arr gs us vs h numTest hc (grps,mxms) ysss zsss descending hashStep xs = argsProcessing wrs ks arr gs us vs h ysss zsss xs >>= \(power10, ldc, compards, html, filtering, dcfile, selStr, prestr, poststr, lineNmb, emptyline, splitting, filesave, codesave, concurrently, basiclineoption, variants1) -> generalF power10 ldc compards html filtering dcfile selStr selFun (prestr,poststr) lineNmb wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (filesave, codesave) concurrently basiclineoption variants1 >> return () {-# INLINE processingF #-} -- | Specifies the group of the command line arguments for 'processingF', which specifies the@@ -329,12 +331,13 @@ :: (Show a1, Integral a1) => Bool -> Int+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> (Int -> Compards -> Int8 -> [Int8] -> String -> a1) -> Int -> Int -> [String] -> IO [String]-testsOutput concurrently syllN f ldc numTest universalSet = do+testsOutput concurrently syllN filtering f ldc numTest universalSet = do putStrLn "Feet Val Stat Proxim" (if concurrently then mapConcurrently else mapM) (\(q,qs) -> let m = stat1 syllN (q,qs)@@ -342,7 +345,7 @@ mx = f ldc (C1 []) q qs max1 strTest = (show (fromEnum q) `mappend` " | " `mappend` show mx `mappend` " " `mappend` show m `mappend` " -> " `mappend` showFFloat (Just 3) (100 * fromIntegral mx / fromIntegral m) "%" `mappend` (if rem numTest 10 >= 4 then -- let min1 = minimumBy (comparing (f ldc [] q qs)) universalSet in - ("\n" `mappend` min1 `mappend` "\n" `mappend` max1 `mappend` "\n") + ("\n" `mappend` (if filtering then removeChangesOfDurations else id) min1 `mappend` "\n" `mappend` (if filtering then removeChangesOfDurations else id) max1 `mappend` "\n") else "")) in putStrLn strTest >> return strTest) . zip (sel2 numTest) $ (sel numTest) -- | Internal part of the 'generalF' for processment with a file.
Aftovolio/Halfsplit.hs view
@@ -21,27 +21,30 @@ import Text.Show (Show(..)) import System.IO (putStrLn,getLine,putStr) import Data.Tuple (fst)+import Data.Char (isDigit) -- | Converts the data that is an instance of 'Show' typeclass to be printed in two-column way. halfsplit :: (Show a, Eq b) => (a -> b)+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> Int8 -> [a] -> String-halfsplit g = halfsplit1G g "" +halfsplit g filtering = halfsplit1G g filtering "" {-# INLINE halfsplit #-} -- | Converts the data that is an instance of 'Show' typeclass to be printed in two-column way with--- customizable ending of each line.+-- customizable ending of each line. Filters out all groups of \'={digits}\' from the lines. halfsplit1G :: (Show a, Eq b) => (a -> b)+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> String -- ^ Additional 'String' added to every line before the \"\\n\" character. -> Int8 -> [a] -> String-halfsplit1G g appendstr m xs +halfsplit1G g filtering appendstr m xs | null xs = [] | otherwise = let (n, rr2) = quotRem (fromEnum m) (if m < 0 then -10 else 10)@@ -54,7 +57,7 @@ 4 -> let us = (replicate (lt2 - ly2) [replicate l0 ' ']) `mappend` reverse (map reverse y2s) in (mconcat us, mconcat t2s) 5 -> let us = (replicate (lt2 - ly2) [replicate l0 ' ']) `mappend` y2s ks = reverse . map reverse $ t2s in (mconcat us, mconcat ks)- _ -> let us = reverse ys in (if rrr == 0 then map show us else replicate l0 ' ':map show us, map show ts) in ((\(rs, qs) -> mergePartsLine n (appendstr `mappend` "\n") rs qs) r) `mappend` appendstr+ _ -> let us = reverse ys in (if rrr == 0 then map show us else replicate l0 ' ':map show us, map show ts) in (if filtering then removeChangesOfDurations else id) $ ((\(rs, qs) -> mergePartsLine n (appendstr `mappend` "\n") rs qs) r) `mappend` appendstr where (ys,ts) = splitAt l xs (l,rrr) = length xs `quotRem` 2 l0 = length . show . head $ xs @@ -69,19 +72,26 @@ ly2 = sum . map length $ y2s lt2 = sum . map length $ t2s --- | A generalized version of 'halfsplit1G' with the possibility to prepend and append strings to it.+-- | A generalized version of 'halfsplit3G' with the possibility to prepend and append strings to it. These 'String's are not filtered out for the groups of \'={digits}\' from the prepending and appending 'String's. halfsplit2G :: (Show a, Eq b) => (a -> b)+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> String -- ^ Additional 'String' added to every line before the \"\\n\" character. -> String -- ^ A 'String' that is prepended to the 'halfsplit1G' result. -> String -- ^ A 'String' that is appended to the 'halfsplit1G' result. -> Int8 -> [a] -> String-halfsplit2G g appendstr prestr poststr m xs = prestr `mappend` halfsplit1G g appendstr m xs `mappend` poststr+halfsplit2G g filtering appendstr prestr poststr m xs = prestr `mappend` halfsplit1G g filtering appendstr m xs `mappend` poststr {-# INLINABLE halfsplit2G #-} +-- | Filters out all groups of \'={digits}\' from the 'String'+removeChangesOfDurations :: String -> String+removeChangesOfDurations ('=':xs) = removeChangesOfDurations (dropWhile isDigit xs) +removeChangesOfDurations (x:xs) = x:removeChangesOfDurations xs+removeChangesOfDurations _ = []+ mergePartsLine :: Int -> String -> [String] -> [String] -> String mergePartsLine n newlined xs ys = intercalate newlined . zipWith (\x y -> x `mappend` (replicate n (if n < 0 then '\t' else ' ')) `mappend` y) xs $ ys @@ -98,16 +108,17 @@ where xs = show x l = length xs -print23 :: String -> String -> Int -> [String] -> IO ()-print23 prestr poststr n xss = do+print23 :: Bool -> String -> String -> Int -> [String] -> IO ()+print23 filtering prestr poststr n xss = do putStrLn prestr let linez = zip xss [1..] if n >= 2 && n <= l - 1 then do let linez3 = (\(x:y:t:xs) -> x:(' ':y):(' ':' ':t):xs) . map fst . filter (\(ts,m) -> m `elem` [n - 1..n + 1]) $ linez- mapM (putStrLn) linez3 >> putStrLn poststr+ mapM putSLn linez3 >> putStrLn poststr else (case n of- 1 -> putStr " " >> mapM putStrLn (take 2 xss)- m -> if m == l then mapM putStrLn ((\(x:y:xs) -> x:(' ':y):xs) . drop (l - 2) $ xss) else mapM putStrLn []) >> putStrLn poststr+ 1 -> putStr " " >> mapM putSLn (take 2 xss)+ m -> if m == l then mapM putSLn ((\(x:y:xs) -> x:(' ':y):xs) . drop (l - 2) $ xss) else pure []) >> putStrLn poststr where l = length xss+ putSLn = putStrLn . (if filtering then removeChangesOfDurations else id)
Aftovolio/Ukrainian/IO.hs view
@@ -45,6 +45,7 @@ -> Int -- ^ A 'length' of the next argument here. -> Compards -- ^ A value that the different options are compared with. If no command line argument \"+di\" was added, then this is a `C1` applied to the list of positive values normed by 255 (the greatest of which is 255) that the line options are compared with. If null, then the program works without comparison. The length of it must be a least common multiplier of the (number of syllables plus number of \'_digits\' groups) to work correctly. Is not used when the next 'FilePath' and 'String' arguments are not null. If \"+di\" command line argument was provided, then this corresponds to the case of differentiation. -> Bool -- ^ If 'True' then adds \"<br>\" to line endings for double column output+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> FilePath -- ^ A path to the file to save double columns output to. If empty then just prints to 'stdout'. -> String -- ^ If not null than instead of rhythmicity evaluation using hashes and and feets, there is computed a diversity property for the specified 'String' here using the 'selectSounds' function. For more information, see: 'https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types' -> (String, String) -- ^ If the next element is not equal to -1, then the prepending and appending lines to be displayed. Used basically for working with the multiline textual input data.@@ -63,7 +64,7 @@ -> String -- ^ An initial string to be analysed. -> [String] -> IO [String]-generalF power10 ldc compards html dcfile selStr (prestr, poststr) lineNmb file numTest hc (grps,mxms) k descending hashStep emptyline splitting (fs,code) concurrently initstr universalSet@(_:_:_) = do+generalF power10 ldc compards html filtering dcfile selStr (prestr, poststr) lineNmb file numTest hc (grps,mxms) k descending hashStep emptyline splitting (fs,code) concurrently initstr universalSet@(_:_:_) = do syllableDurationsDs <- readSyllableDurations file let syllN = countSyll initstr f ldc compards syllableDurationsDs grps mxms -- Since the version 0.12.0.0, has a possibility to evaluate diversity property.@@ -71,10 +72,10 @@ else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS) | otherwise = fromIntegral . diverse2GGL (selectSounds selStr) [100,101] . convertToProperUkrainianI8 . filter (\c -> not (isDigit c) && c /= '_' && c/= '=') hSetNewlineMode stdout universalNewlineMode- if numTest >= 0 && numTest <= 179 && numTest /= 1 && doubleFunc (L.null::[Word8]->Bool) (L.null::[Int8]-> Bool) compards then testsOutput concurrently syllN f ldc syllableDurationsDs numTest universalSet+ if numTest >= 0 && numTest <= 179 && numTest /= 1 && doubleFunc (L.null::[Word8]->Bool) (L.null::[Int8]-> Bool) compards then testsOutput concurrently syllN filtering f ldc syllableDurationsDs numTest universalSet else let sRepresent = zipWith (\k (x, ys) -> S k x ys) [1..] . (if descending then sortOn (\(u,w) -> (Down u, w)) else sortOn id) . map (\xss -> (f ldc compards syllableDurationsDs grps mxms xss, xss)) $ universalSet- strOutput = force . (:[]) . halfsplit1G (\(S _ y _) -> y) (if html then "<br>" else "") (jjj splitting) $ sRepresent+ strOutput = force . (:[]) . halfsplit1G (\(S _ y _) -> y) filtering (if html then "<br>" else "") (jjj splitting) $ sRepresent in do let lns1 = unlines strOutput putStrLn lns1@@ -94,10 +95,10 @@ if code == -1 then if lineNmb == -1 then return strOutput else do - print23 prestr poststr 1 [initstr]+ print23 filtering prestr poststr 1 [initstr] return strOutput else do - print23 prestr poststr 1 [initstr]+ print23 filtering prestr poststr 1 [initstr] parseLineNumber l1 >>= \num -> do permiss <- getPermissions fs let writ = writable permiss@@ -111,10 +112,10 @@ | r1 == 1 || r1 == 3 = 10*q1 + (if emptyline then 5 else r1) | r1 < 0 = -10*q1 + (if emptyline then -4 else r1) | otherwise = 10*q1 + (if emptyline then 4 else r1)-generalF _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [u1] = do+generalF _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [u1] = do putStrLn u1 return [u1]-generalF _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = let strOutput = ["You have specified the data and constraints on it that lead to no further possible options.", "Please, specify another data and constraints."] in do +generalF _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = let strOutput = ["You have specified the data and constraints on it that lead to no further possible options.", "Please, specify another data and constraints."] in do putStrLn . unlines $ strOutput return strOutput @@ -173,13 +174,14 @@ :: (Show a1, Integral a1) => Bool -- ^ Whether to run tests concurrently or not. 'True' corresponds to concurrent execution that can speed up the getting results but use more resources. -> Int+ -> Bool -- ^ Whether to filter out all groups of \'={digits}\' from the lines. -> (Int -> Compards -> p2 -> Int8 -> [Int8] -> String -> a1) -> Int -> p2 -> Int -> [String] -> IO [String]-testsOutput concurrently syllN f ldc syllableDurationsDs numTest universalSet = do+testsOutput concurrently syllN filtering f ldc syllableDurationsDs numTest universalSet = do putStrLn "Feet Val Stat Proxim" (if concurrently then mapConcurrently@@ -189,12 +191,12 @@ mx = f ldc (C1 []) syllableDurationsDs q qs max1 strTest = (show (fromEnum q) `mappend` " | " `mappend` show mx `mappend` " " `mappend` show m `mappend` " -> " `mappend` showFFloat (Just 3) (100 * fromIntegral mx / fromIntegral m) "%" `mappend` (if rem numTest 10 >= 4 - then ("\n" `mappend` min1 `mappend` "\n" `mappend` max1 `mappend` "\n")+ then ("\n" `mappend` (if filtering then removeChangesOfDurations else id) min1 `mappend` "\n" `mappend` (if filtering then removeChangesOfDurations else id) max1 `mappend` "\n") else "")) in putStrLn strTest >> return strTest) . zip (sel2 numTest) $ (sel numTest) -- | Part of 'generalF' for processment with a file. outputWithFile- :: String -- ^ If not null than instead of rhythmicity evaluation using hashes and and feets, there is computed a diversity property for the specified 'String' here using the 'selectSounds' function. For more information, see: 'https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types'+ :: String -- ^ If not null than instead of rhythmicity evaluation using hashes and and feets, there is computed a diversity property for the specified 'String' here using the 'selectSounds' function. For more information, see: 'https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types' -> Compards -- ^ A value that the different options are compared with. If no command line argument \"+di\" was added, then this is a `C1` applied to the list of positive values normed by 255 (the greatest of which is 255) that the line options are compared with. If null, then the program works without comparison. The length of it must be a least common multiplier of the (number of syllables plus number of \'_digits\' groups) to work correctly. Is not used when the next 'FilePath' and 'String' arguments are not null. If \"+di\" command line argument was provided, then this corresponds to the case of differentiation. -> [AftovolioUkr] -> FilePath -- ^ The file to read the sound representation durations from.
CHANGELOG.md view
@@ -24,3 +24,6 @@ * Third version revised B. Some minor code improvements. Added 'Peculiarities of the stressed and unstressed syllables in Ukrainian and other languages' section to the README.md file. +## 0.4.0.0 -- 2024-10-22++* Fourth version. Added new command line parameter "-e" to control whether to print groups of "={digits}" on the screen while making output. Changed the number of arguments in various functions.
README.md view
@@ -934,9 +934,9 @@ # Peculiarities of the stressed and unstressed syllables in Ukrainian and other languages -In linguistic typology, there is a prosodic classification of languages according to the rhythm of of oral speech. In this sense, speech rhythm is interpreted as a periodic isochrony (temporal and quantitative identity) of comparable phonetic units.+In linguistic typology, there is a prosodic classification of languages according to the rhythm of oral speech. In this sense, speech rhythm is interpreted as a periodic isochrony (temporal and quantitative identity) of comparable phonetic units. -It is believed that all the world's languages can be divided into three groups by the type of rhythm (isochrony of comparable units) can be divided into three groups, depending on which unit manifests regular (permanent) isochrony (Ladefoged 1975 (Ladefoged, Peter. "A Course in Phonetics. Harcourt Brace Jovanovich." New York (1975)), Ishchenko 2015, see link below):+It is believed that all the world's languages can be divided into three groups by the type of rhythm (isochrony of comparable units), depending on which unit manifests regular (permanent) isochrony (Ladefoged 1975 (Ladefoged, Peter. "A Course in Phonetics. Harcourt Brace Jovanovich." New York (1975)), Ishchenko 2015, see link below): - syllable-timed languages: languages of syllable rhythm, that is, in which syllables - stressed and unstressed - have a relatively uniform duration. This group includes primarily the Romance languages (Spanish, French, Italian, etc;) @@ -950,11 +950,11 @@ See, for example: - aftovolioUkr +r 21 +w 54 садок=133 вишне=133вий ко=133лоха=133ти хрущі=133 над ви=133шнями гудуть=133+ aftovolioUkr -e +r 21 +w 54 садок=133 вишне=133вий ко=133лоха=133ти хрущі=133 над ви=133шнями гудуть=133 \...- 8 садок=133 вишне=133вий ко=133лоха=133ти надви=133шнями гудуть=133 хрущі=133 711+ 8 садок вишневий колохати надвишнями гудуть хрущі 711 -as the element with the maximum value. The second line is changed because of the last syllable in the first line that is redundant as for the iambic meter.+as the element with the maximum value (since the 0.4.0.0 version the "-e" command line argument suppresses output of "={digits}" for better readability). The second line is changed because of the last syllable in the first line that is redundant as for the iambic meter. You can easily paste the =133 group into the text in many editors or on the command line directly. @@ -971,25 +971,25 @@ SYNOPSIS: -- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [+r <groupping info>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>]] Ukrainian textual line+- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [+r <groupping info>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>]] Ukrainian textual line OR:-- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [-t <number of the test or its absence if 1 is here> [-C +RTS -N -RTS]] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+x <maximum number of words taken>]] Ukrainian textual line+- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [-t <number of the test or its absence if 1 is here> [-C +RTS -N -RTS]] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+x <maximum number of words taken>]] Ukrainian textual line OR: - aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+ul <diversity property encoding string>] [+n] [+l] [-p] [+w <splitting parameter>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>]] Ukrainian textual line OR:-- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+l2 <a Ukrainian text line to compare similarity with> -l2]] [+di] Ukrainian textual line+- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+l2 <a Ukrainian text line to compare similarity with> -l2]] [+di] Ukrainian textual line OR:-- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+ln <a sequence of positive Word8 values not greater than 255 e. g. 24 157 45 68 45 56 59 to compare similarity with> -ln]] [+di] Ukrainian textual line+- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+ln <a sequence of positive Word8 values not greater than 255 e. g. 24 157 45 68 45 56 59 to compare similarity with> -ln]] [+di] Ukrainian textual line OR:-- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m <FilePath> <num1> +m2 <num2>]]+- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m <FilePath> <num1> +m2 <num2>]] OR:-- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m3 <FilePath> <num1> <num2>]]+- aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m3 <FilePath> <num1> <num2>]] OR: - aftovolioUkr [-cm <FilePath to write the resulting combined output to> <FilePaths of the files to be compared and chosen the resulting options line-by-line>]@@ -1038,6 +1038,8 @@ - +ln \... -ln — if present and has inside a sequence of positive Word8 values not greater than 255 then the line options are compared with it using the idea of lists similarity. The greater values correspond to the less similar and more different lines. Has no effect with +dc group of command line arguments. Has precedence over +t, +r, +k, +c etc. groups of command line options so that these latter ones have no effect when +ln \... -ln is present. - +di — if present implies the "differentiation" mode of computation for the comparing options with the line in +l2\.\.\.-l2 or +ln\.\.\.-ln groups of command line arguments. Is useful mostly in case of the line to compare with has approximately the same number of syllables as the option lines.++- -e — if present suppresses the printing of "={digits}" in the line option to the screen. Is used for better readability, often with +di. - +q — if present with +l2 \... -l2 group of arguments then the next argument is a power of 10 which the distance between line option and the predefined line is quoted by. The default one is 0 (that means no change). You can specify not less than 0 and not greater than 4. Otherwise, these limit numbers are used instead. The greater value here leads to more groupped options output.
aftovolio.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: aftovolio-version: 0.3.0.2+version: 0.4.0.0 -- A short (one-line) description of the package. synopsis: An AFTOVolio implementation for creating texts with special phonetic / prosodic properties.
src/Main.hs view
@@ -67,6 +67,7 @@ helpArg = concat . getB "-h" $ argsB filedata = getB "+f" argsB concurrently = oneA "-C" argsA+ filtering = oneA "-e" argsA (multiline2, multiline2LineNum) | oneB "+m3" argsB = let r1ss = getB "+m3" argsB in @@ -141,14 +142,14 @@ if helpMessage then do hSetNewlineMode stdout universalNewlineMode helpPrint helpArg- else generalF power10 ldc compards html dcfile selStr (prestr, poststr) lineNmb fileDu numTest hc grpp sylD descending hashStep emptyline splitting (filesave, codesave) concurrently (unwords arg3s) variants1 >> return ()+ else generalF power10 ldc compards html filtering dcfile selStr (prestr, poststr) lineNmb fileDu numTest hc grpp sylD descending hashStep emptyline splitting (filesave, codesave) concurrently (unwords arg3s) variants1 >> return () bSpecs :: CLSpecifications bSpecs = (zip ["+c","+d","+k","-h","+r","+s","-t","+ul","+w","+x","+q","+m2","-cm"] . cycle $ [1]) `mappend` [("+f",2),("+m",2),("+dc",2),("+m3",3)] aSpecs :: CLSpecifications-aSpecs = zip ["+di", "+l", "+n","-p", "-C"] . cycle $ [0]+aSpecs = zip ["+di", "-e", "+l", "+n","-p", "-C"] . cycle $ [0] cSpecs :: CLSpecifications cSpecs = [("+a",-1),("+l2",-1),("+ln",-1)]@@ -156,14 +157,14 @@ helpPrint :: String -> IO () helpPrint xs | xs == "0" = putStrLn "SYNOPSIS:\n"- | xs == "1" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [+r <groupping info>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>]] <Ukrainian textual line>\n" - | xs == "2" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [-t <number of the test or its absence if 1 is here> [-C +RTS -N -RTS]] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+x <maximum number of words taken>]] <Ukrainian textual line>\n"+ | xs == "1" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [+r <groupping info>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>]] <Ukrainian textual line>\n" + | xs == "2" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+c <HashCorrections encoded>] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+k <number - hash step>] [-t <number of the test or its absence if 1 is here> [-C +RTS -N -RTS]] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+x <maximum number of words taken>]] <Ukrainian textual line>\n" | xs == "3" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+ul <diversity property encoding string>] [+n] [+l] [-p] [+w <splitting parameter>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>]] <Ukrainian textual line>\n"- | xs == "4" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+l2 <a Ukrainian text line to compare similarity with> -l2]] [+di] <Ukrainian textual line>\n"- | xs == "5" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m <FilePath> <num1> +m2 <num2>]]\n"- | xs == "6" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m3 <FilePath> <num1> <num2>]]\n"+ | xs == "4" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+l2 <a Ukrainian text line to compare similarity with> -l2]] [+di] <Ukrainian textual line>\n"+ | xs == "5" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m <FilePath> <num1> +m2 <num2>]]\n"+ | xs == "6" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+di] [+m3 <FilePath> <num1> <num2>]]\n" | xs == "7" = putStrLn "aftovolioUkr [-cm <FilePath to write the resulting combined output to> <FilePaths of the files to be compared and chosen the resulting options line-by-line>]\n"- | xs == "8" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+ln <a sequence of Word8 positive integer values not greater than 255 e. g. 24 54 57 159 45 39 to compare similarity with> -ln]][+di] <Ukrainian textual line>\n"+ | xs == "8" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [-e] [+n] [+l] [+d <FilePath to file with durations>] [+s <syllable durations function number>] [-p] [+w <splitting parameter>] [+q <power of 10 for multiplier in [2..6]>] [+f <FilePath to the file to be appended the resulting String> <control parameter for output parts>] [+x <maximum number of words taken>] [+dc <whether to print <br> tag at the end of each line for two-column output> <FilePath to the file where the two-column output will be written in addition to stdout>] [+ln <a sequence of Word8 positive integer values not greater than 255 e. g. 24 54 57 159 45 39 to compare similarity with> -ln]][+di] <Ukrainian textual line>\n" | xs == "OR" = putStrLn "OR:" | xs == "n" = putStrLn "+n \t— if specified then the order of sorting and printing is descending (the reverse one to the default otherwise). \n" | xs == "l" = putStrLn "+l \t— if specified then the output for one property (no tests) contains empty lines between the groups of the line option with the same value of property. \n"@@ -178,6 +179,7 @@ | xs == "l2" = putStrLn "+l2 ... -l2 \t— if present and has inside Ukrainian text then the line options are compared with it using the idea of lists similarity. The greater values correspond to the less similar and more different lines. Has no effect with +dc group of command line arguments. Has precedence over +t, +r, +k, +c etc. groups of command line options so that these latter ones have no effect when +l2 ... -l2 is present.\n" | xs == "ln" = putStrLn "+ln ... -ln \t— if present and has inside a sequence of Word8 values i. e. positive integer numbers less than 256 then the line options are compared with it using the idea of lists similarity. The greater values correspond to the less similar and more different lines. Has no effect with +dc group of command line arguments. Has precedence over +t, +r, +k, +c etc. groups of command line options so that these latter ones have no effect when +ln ... -ln is present.\n" | xs == "di" = putStrLn "+di \t— if present implies the \"differentiation\" mode of computation for the comparing options with the line in +l2 or +ln groups of command line arguments. Is useful mostly in case of the line to compare with has approximately the same number of syllables as the option lines."+ | xs == "e" = putStrLn "-e \t— if present suppresses the printing of \"={digits}\" in the line option to the screen. Is used for better readability, often with \"+di\"." | xs == "q" = putStrLn "+q \t— if present with +l2 ... -l2 group of arguments then the next argument is a power of 10 which the distance between line option and the predefined line is quoted by. The default one is 0 (that means no change). You can specify not less than 0 and not greater than 4. Otherwise, these limit numbers are used instead. The greater value here leads to more groupped options output.\n" | xs == "ul" = putStrLn "+ul \t— afterwards there is a string that encodes which sounds are used for diversity property evaluation. If used, then +r group has no meaning and is not used. Unlike in the link, the argument \"1\" means computing the property for all the sound representations included (for all of the present representations, so the value is maximal between all other strings instead of \"1\"). For more information, see: https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types\n" | xs == "r" = putStrLn "+r \t— afterwards are several unique digits not greater than 8 in the descending order — the first one is the length of the group of syllables to be considered as a period, the rest — positions of the maximums and minimums. Example: \"543\" means that the line is splitted into groups of 5 syllables starting from the beginning, then the positions of the most maximum (4 = 5 - 1) and the next (smaller) maximum (3 = 4 - 1). If there are no duplicated values then the lowest possible value here is 0, that corresponds to the lowest minimum. If there are duplicates then the lowest value here is the number of the groups of duplicates, e. g. in the sequence 1,6,3,3,4,4,5 that is one group there are two groups of duplicates — with 3 and 4 — and, therefore, the corresponding data after +r should be 7...2. The values less than the lowest minimum are neglected.\n"@@ -193,29 +195,30 @@ where helpFE xs = mapM helpPrint js >> return () js | xs == "-cm" = ["0","7","cm"] - | xs == "+n" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","n"] - | xs == "+l" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","l"] - | xs == "+w" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","w"] - | xs == "+s" = ["0","1","OR","2","OR","4","OR","5","OR","6","s"] - | xs == "+d" = ["0","1","OR","2","OR","4","OR","5","OR","6","d"] - | xs == "-p" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","p"] - | xs == "+f" = ["0","1","OR","3","OR","4","OR","5","OR","6","f"] - | xs == "+dc" = ["0","1","OR","3","OR","4","OR","5","OR","6","dc"] - | xs == "+a" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","a"] - | xs == "+b" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","b"] + | xs == "+n" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","n"] + | xs == "+l" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","l"] + | xs == "+w" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","w"] + | xs == "+s" = ["0","1","OR","2","OR","4","OR","5","OR","6","OR","8","s"] + | xs == "+d" = ["0","1","OR","2","OR","4","OR","5","OR","6","OR","8","d"] + | xs == "-p" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","p"] + | xs == "+f" = ["0","1","OR","3","OR","4","OR","5","OR","6","OR","8","f"] + | xs == "+dc" = ["0","1","OR","3","OR","4","OR","5","OR","6","OR","8","dc"] + | xs == "+a" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","a"] + | xs == "+b" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","b"] | xs == "+l2" = ["0","4","l2"] | xs == "+ln" = ["0","8","ln"] - | xs == "+di" = ["0","4","OR","5","OR","6","OR","7","OR","8","di"]- | xs == "+q" = ["0","4","OR","5","OR","6","q"] + | xs == "+di" = ["0","1", "OR", "2", "OR","4","OR","5","OR","6","OR","8","di"]+ | xs == "-e" = ["0","1","OR","2","OR","4","OR","5","OR","6","OR","8","e"]+ | xs == "+q" = ["0","4","OR","5","OR","6","OR","8","q"] | xs == "+ul" = ["0","3","ul"] | xs == "+r" = ["0","1","r"] | xs == "+c" = ["0","1","OR","2","c"] | xs == "-t" = ["0","2","t"] | xs == "-C" = ["0","2","C"] | xs == "+k" = ["0","1","OR","2","k"] - | xs == "+x" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","x"] + | xs == "+x" = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","8","x"] | xs == "+m" = ["0","5","m"] | xs == "+m2" = ["0","5","m2"] | xs == "+m3" = ["0","6","m3"] - | otherwise = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","7","n","l","w","s","d","p","f","dc","a","b","l2","q","ul","r","c","t","C","k","x","m","m2","cm"]+ | otherwise = ["0","1","OR","2","OR","3","OR","4","OR","5","OR","6","OR","7","OR","8","n","l","w","s","d","p","f","dc","a","b","l2","q","ul","r","c","t","C","k","x","m","m2","cm"]