aftovolio 0.6.2.0 → 0.7.0.0
raw patch · 7 files changed
+183/−133 lines, 7 filesdep +uniqueness-periods-vector-statsPVP ok
version bump matches the API change (PVP)
Dependencies added: uniqueness-periods-vector-stats
API changes (from Hackage documentation)
- Aftovolio.ConstraintsEncoded: instance (GHC.Show.Show b, GHC.Show.Show d, GHC.Show.Show a) => GHC.Show.Show (Aftovolio.ConstraintsEncoded.EncodedContraints a b d)
- Aftovolio.General.Base: instance GHC.Show.Show Aftovolio.General.Base.PhoneticsRepresentationPL
- Aftovolio.General.Base: instance GHC.Show.Show Aftovolio.General.Base.PhoneticsRepresentationPLX
- Aftovolio.General.Datatype3: instance GHC.Show.Show Aftovolio.General.Datatype3.Read0
- Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Word.Word8] [GHC.Int.Int8] Aftovolio.General.Distance.Compards Aftovolio.General.Distance.Compards
- Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Word.Word8] [GHC.Int.Int8] GHC.Num.Integer.Integer Aftovolio.General.Distance.Compards
- Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Word.Word8] [GHC.Int.Int8] GHC.Types.Bool Aftovolio.General.Distance.Compards
- Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Word.Word8] [GHC.Int.Int8] GHC.Types.Int Aftovolio.General.Distance.Compards
- Aftovolio.General.Simple: instance GHC.Generics.Generic Aftovolio.General.Simple.AftovolioGen
- Aftovolio.General.Simple: instance GHC.Show.Show Aftovolio.General.Simple.AftovolioGen
- Aftovolio.General.Syllables: instance (GHC.Read.Read a, GHC.Read.Read b) => GHC.Read.Read (Aftovolio.General.Syllables.SegmentationPredFData a b)
- Aftovolio.General.Syllables: instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Aftovolio.General.Syllables.SegmentationPredFData a b)
- Aftovolio.General.Syllables: instance Aftovolio.General.Syllables.DListRepresentation Aftovolio.General.Syllables.PhoneticPhenomenonRep GHC.Int.Int8
- Aftovolio.General.Syllables: instance GHC.Read.Read Aftovolio.General.Syllables.PRS
- Aftovolio.General.Syllables: instance GHC.Read.Read Aftovolio.General.Syllables.PhoneticType
- Aftovolio.General.Syllables: instance GHC.Read.Read Aftovolio.General.Syllables.SegmentationInfo1
- Aftovolio.General.Syllables: instance GHC.Read.Read Aftovolio.General.Syllables.SegmentationLineFunction
- Aftovolio.General.Syllables: instance GHC.Read.Read Aftovolio.General.Syllables.SegmentationRules1
- Aftovolio.General.Syllables: instance GHC.Show.Show Aftovolio.General.Syllables.PRS
- Aftovolio.General.Syllables: instance GHC.Show.Show Aftovolio.General.Syllables.PhoneticType
- Aftovolio.General.Syllables: instance GHC.Show.Show Aftovolio.General.Syllables.SegmentationInfo1
- Aftovolio.General.Syllables: instance GHC.Show.Show Aftovolio.General.Syllables.SegmentationLineFunction
- Aftovolio.General.Syllables: instance GHC.Show.Show Aftovolio.General.Syllables.SegmentationRules1
- Aftovolio.PermutationsRepresent: instance GHC.Show.Show Aftovolio.PermutationsRepresent.PermutationsType
- Aftovolio.RGLPK.General: instance GHC.Read.Read Aftovolio.RGLPK.General.PairwiseC
- Aftovolio.RGLPK.General: instance GHC.Read.Read Aftovolio.RGLPK.General.PairwisePL
- Aftovolio.RGLPK.General: instance GHC.Show.Show Aftovolio.RGLPK.General.PairwiseC
- Aftovolio.RGLPK.General: instance GHC.Show.Show Aftovolio.RGLPK.General.PairwisePL
- Aftovolio.Ukrainian.Common2: instance GHC.Show.Show Aftovolio.Ukrainian.Common2.Triple
- Aftovolio.Ukrainian.IO: instance GHC.Generics.Generic Aftovolio.Ukrainian.IO.AftovolioUkr
- Aftovolio.Ukrainian.IO: instance GHC.Show.Show Aftovolio.Ukrainian.IO.AftovolioUkr
+ Aftovolio.ConstraintsEncoded: instance (GHC.Internal.Show.Show b, GHC.Internal.Show.Show d, GHC.Internal.Show.Show a) => GHC.Internal.Show.Show (Aftovolio.ConstraintsEncoded.EncodedContraints a b d)
+ Aftovolio.General.Base: instance GHC.Internal.Show.Show Aftovolio.General.Base.PhoneticsRepresentationPL
+ Aftovolio.General.Base: instance GHC.Internal.Show.Show Aftovolio.General.Base.PhoneticsRepresentationPLX
+ Aftovolio.General.Datatype3: instance GHC.Internal.Show.Show Aftovolio.General.Datatype3.Read0
+ Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Internal.Word.Word8] [GHC.Internal.Int.Int8] Aftovolio.General.Distance.Compards Aftovolio.General.Distance.Compards
+ Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Internal.Word.Word8] [GHC.Internal.Int.Int8] GHC.Num.Integer.Integer Aftovolio.General.Distance.Compards
+ Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Internal.Word.Word8] [GHC.Internal.Int.Int8] GHC.Types.Bool Aftovolio.General.Distance.Compards
+ Aftovolio.General.Distance: instance Aftovolio.General.Distance.DoubleFunc [GHC.Internal.Word.Word8] [GHC.Internal.Int.Int8] GHC.Types.Int Aftovolio.General.Distance.Compards
+ Aftovolio.General.Simple: instance GHC.Internal.Generics.Generic Aftovolio.General.Simple.AftovolioGen
+ Aftovolio.General.Simple: instance GHC.Internal.Show.Show Aftovolio.General.Simple.AftovolioGen
+ Aftovolio.General.Syllables: instance (GHC.Internal.Read.Read a, GHC.Internal.Read.Read b) => GHC.Internal.Read.Read (Aftovolio.General.Syllables.SegmentationPredFData a b)
+ Aftovolio.General.Syllables: instance (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (Aftovolio.General.Syllables.SegmentationPredFData a b)
+ Aftovolio.General.Syllables: instance Aftovolio.General.Syllables.DListRepresentation Aftovolio.General.Syllables.PhoneticPhenomenonRep GHC.Internal.Int.Int8
+ Aftovolio.General.Syllables: instance GHC.Internal.Read.Read Aftovolio.General.Syllables.PRS
+ Aftovolio.General.Syllables: instance GHC.Internal.Read.Read Aftovolio.General.Syllables.PhoneticType
+ Aftovolio.General.Syllables: instance GHC.Internal.Read.Read Aftovolio.General.Syllables.SegmentationInfo1
+ Aftovolio.General.Syllables: instance GHC.Internal.Read.Read Aftovolio.General.Syllables.SegmentationLineFunction
+ Aftovolio.General.Syllables: instance GHC.Internal.Read.Read Aftovolio.General.Syllables.SegmentationRules1
+ Aftovolio.General.Syllables: instance GHC.Internal.Show.Show Aftovolio.General.Syllables.PRS
+ Aftovolio.General.Syllables: instance GHC.Internal.Show.Show Aftovolio.General.Syllables.PhoneticType
+ Aftovolio.General.Syllables: instance GHC.Internal.Show.Show Aftovolio.General.Syllables.SegmentationInfo1
+ Aftovolio.General.Syllables: instance GHC.Internal.Show.Show Aftovolio.General.Syllables.SegmentationLineFunction
+ Aftovolio.General.Syllables: instance GHC.Internal.Show.Show Aftovolio.General.Syllables.SegmentationRules1
+ Aftovolio.Halfsplit: readNums :: [String] -> [Int]
+ Aftovolio.PermutationsRepresent: instance GHC.Internal.Show.Show Aftovolio.PermutationsRepresent.PermutationsType
+ Aftovolio.RGLPK.General: instance GHC.Internal.Read.Read Aftovolio.RGLPK.General.PairwiseC
+ Aftovolio.RGLPK.General: instance GHC.Internal.Read.Read Aftovolio.RGLPK.General.PairwisePL
+ Aftovolio.RGLPK.General: instance GHC.Internal.Show.Show Aftovolio.RGLPK.General.PairwiseC
+ Aftovolio.RGLPK.General: instance GHC.Internal.Show.Show Aftovolio.RGLPK.General.PairwisePL
+ Aftovolio.Ukrainian.Common2: instance GHC.Internal.Show.Show Aftovolio.Ukrainian.Common2.Triple
+ Aftovolio.Ukrainian.IO: instance GHC.Internal.Generics.Generic Aftovolio.Ukrainian.IO.AftovolioUkr
+ Aftovolio.Ukrainian.IO: instance GHC.Internal.Show.Show Aftovolio.Ukrainian.IO.AftovolioUkr
- Aftovolio.Basis: R :: !t a -> !b -> !c -> Result t a b c
+ Aftovolio.Basis: R :: !t a -> !b -> !c -> Result (t :: Type -> Type) a b c
- Aftovolio.Basis: [line] :: Result t a b c -> !t a
+ Aftovolio.Basis: [line] :: Result (t :: Type -> Type) a b c -> !t a
- Aftovolio.Basis: [propertiesF] :: Result t a b c -> !b
+ Aftovolio.Basis: [propertiesF] :: Result (t :: Type -> Type) a b c -> !b
- Aftovolio.Basis: [transPropertiesF] :: Result t a b c -> !c
+ Aftovolio.Basis: [transPropertiesF] :: Result (t :: Type -> Type) a b c -> !c
- Aftovolio.Basis: data Result t a b c
+ Aftovolio.Basis: data Result (t :: Type -> Type) a b c
- Aftovolio.ConstraintsEncoded: type EncodedCnstrs = EncodedContraints Int (Array Int Int) (Array Int (Int, Int))
+ Aftovolio.ConstraintsEncoded: type EncodedCnstrs = EncodedContraints Int Array Int Int Array Int (Int, Int)
- Aftovolio.DataG: innerPartitioningR :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c) => t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
+ Aftovolio.DataG: innerPartitioningR :: forall t2 (t :: Type -> Type) a b c. (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c) => t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
- Aftovolio.DataG: maximumElR :: (Foldable t2, Ord c) => t2 (Result t a b c) -> Result t a b c
+ Aftovolio.DataG: maximumElR :: forall t2 c (t :: Type -> Type) a b. (Foldable t2, Ord c) => t2 (Result t a b c) -> Result t a b c
- Aftovolio.DataG: maximumGroupsClassificationR :: (Eq a, Eq b, Eq (t a), InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c, Integral d) => d -> t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
+ Aftovolio.DataG: maximumGroupsClassificationR :: forall a b (t :: Type -> Type) t2 c d. (Eq a, Eq b, Eq (t a), InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c, Monoid (t2 c), Ord c, Integral d) => d -> t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
- Aftovolio.DataG: maximumGroupsClassificationR2 :: (Eq a, Eq b, Eq (t a), InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord c, InsertLeft t2 c, Monoid (t2 c), Integral d) => d -> (t2 (Result t a b c), t2 (Result t a b c)) -> (t2 (Result t a b c), t2 (Result t a b c))
+ Aftovolio.DataG: maximumGroupsClassificationR2 :: forall a b (t :: Type -> Type) t2 c d. (Eq a, Eq b, Eq (t a), InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord c, InsertLeft t2 c, Monoid (t2 c), Integral d) => d -> (t2 (Result t a b c), t2 (Result t a b c)) -> (t2 (Result t a b c), t2 (Result t a b c))
- Aftovolio.DataG: minMaximumElRs :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord (t a), Ord b, Ord c) => t2 (Result t a b c) -> (Result t a b c, Result t a b c)
+ Aftovolio.DataG: minMaximumElRs :: forall t2 (t :: Type -> Type) a b c. (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), Ord (t a), Ord b, Ord c) => t2 (Result t a b c) -> (Result t a b c, Result t a b c)
- Aftovolio.DataG: partiR :: (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c) => (c -> Bool) -> t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
+ Aftovolio.DataG: partiR :: forall t2 (t :: Type -> Type) a b c. (InsertLeft t2 (Result t a b c), Monoid (t2 (Result t a b c)), InsertLeft t2 c) => (c -> Bool) -> t2 (Result t a b c) -> (t2 (Result t a b c), t2 (Result t a b c))
- Aftovolio.General.Datatype3: zippedDouble2Word8 :: (Fractional b, Num b, Enum b, Ord b) => [(a, b)] -> [(a, b)]
+ Aftovolio.General.Datatype3: zippedDouble2Word8 :: (Fractional b1, Num b2, Enum b2, Ord b1) => [(a, b1)] -> [(a, b2)]
- Aftovolio.General.Simple: S :: Int -> Integer -> String -> AftovolioGen
+ Aftovolio.General.Simple: S :: !Int -> !Integer -> !String -> AftovolioGen
- Aftovolio.General.Simple: argsProcessing :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> BasicSpaces -> AdditionalDelimiters -> ([[[PhoneticPhenomenonRep]]] -> [[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: argsProcessing :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> BasicSpaces -> AdditionalDelimiters -> ([[[PhoneticPhenomenonRep]]] -> [[Word8]]) -> [[String]] -> [[String]] -> String -> IO (Int, Int, Compards, Bool, Bool, FilePath, String, String, String, Int, Bool, Int8, FilePath, Int, Bool, String, [Int], [String])
- Aftovolio.General.Simple: generalF :: Int -> Int -> Compards -> Bool -> Bool -> FilePath -> String -> (String -> String) -> (String, String) -> Int -> GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> BasicSpaces -> AdditionalDelimiters -> ([[[PhoneticPhenomenonRep]]] -> [[Word8]]) -> Int -> HashCorrections -> (Int8, [Int8]) -> 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 -> BasicSpaces -> AdditionalDelimiters -> ([[[PhoneticPhenomenonRep]]] -> [[Word8]]) -> Int -> HashCorrections -> (Int8, [Int8]) -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> String -> [Int] -> [String] -> IO [String]
- Aftovolio.Partir: class (Foldable t) => ConstraintsG t a
+ Aftovolio.Partir: class Foldable t => ConstraintsG (t :: Type -> Type) a
- Aftovolio.Ukrainian.IO: S :: Int -> Integer -> String -> AftovolioUkr
+ Aftovolio.Ukrainian.IO: S :: !Int -> !Integer -> !String -> AftovolioUkr
- Aftovolio.Ukrainian.IO: generalF :: Int -> Int -> Compards -> Bool -> Bool -> FilePath -> String -> (String, String) -> Int -> FilePath -> Int -> HashCorrections -> (Int8, [Int8]) -> Int -> 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 -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> String -> [Int] -> [String] -> IO [String]
- Aftovolio.Ukrainian.SyllableWord8: class (Eq a) => SyllableDurations4 a
+ Aftovolio.Ukrainian.SyllableWord8: class Eq a => SyllableDurations4 a
Files
- Aftovolio/General/Simple.hs +69/−53
- Aftovolio/Halfsplit.hs +13/−0
- Aftovolio/Ukrainian/IO.hs +75/−64
- CHANGELOG.md +4/−0
- README.md +7/−5
- aftovolio.cabal +3/−3
- src/Main.hs +12/−8
Aftovolio/General/Simple.hs view
@@ -28,7 +28,7 @@ import Data.Char (isDigit, isSpace) import Data.ChooseLine2 import Data.List hiding (foldr, null)-import qualified Data.List as L (null)+import qualified Data.List as L (null,lines) import Data.Maybe (catMaybes, fromJust, fromMaybe, isNothing, mapMaybe) import Data.MinMax1 (minMax11By) import Data.Ord (Down (..), comparing)@@ -113,9 +113,11 @@ Bool -> -- | An initial string to be analyzed. String ->+ -- | A list of line numbers of the Aftovolio data to be displayed in the modes except tests and file appending.+ [Int] -> [String] -> IO [String]-generalF power10 ldc compards html filtering dcfile selStr selFun (prestr, poststr) lineNmb writingSystem allophones arrCharClassification segmentRules basicSpaces additionalDelims h numTest hc (grps, mxms) hashStep emptyline splitting (fs, code) concurrently initstr universalSet+generalF power10 ldc compards html filtering dcfile selStr selFun (prestr, poststr) lineNmb writingSystem allophones arrCharClassification segmentRules basicSpaces additionalDelims h numTest hc (grps, mxms) hashStep emptyline splitting (fs, code) concurrently initstr lineNumbersSel universalSet | L.null universalSet = do let strOutput = [ "You have specified the data and constraints on it that lead to no further possible options."@@ -158,67 +160,76 @@ && doubleFunc (L.null :: [Word8] -> Bool) (L.null :: [Int8] -> Bool) compards then testsOutput concurrently syllN filtering f ldc numTest universalSet else- let sRepresent =+ let lgth = length universalSet+ sRepresent = zipWith (\k (x, ys) -> S k x ys) [1 ..] . sortOn id . map (\xss -> (f ldc compards grps mxms xss, xss)) $ universalSet- strOutput =+ strOutput + | L.null lineNumbersSel = force- . (: [])+ . L.lines . halfsplit1G (\(S _ y _) -> y) filtering (if html then "<br>" else "") (jjj splitting) $ sRepresent+ | otherwise = + force + . filter (not . L.null)+ . map (\ (S k _ qqs) -> if (k `elem` lineNumbersSel && k <= lgth) then qqs else [])+ $ sRepresent lns1 = unlines strOutput in do- putStrLn lns1- if L.null dcfile- then putStr ""- else do- doesFileExist dcfile >>= \exist ->- if exist- then do- getPermissions dcfile >>= \perms ->- if writable perms- then writeFile dcfile lns1- else- error $- "Aftovolio.General.IO.generalF: File "- `mappend` dcfile- `mappend` " is not writable!"- else do- getCurrentDirectory >>= \currdir -> do- getPermissions currdir >>= \perms ->- if writable perms- then writeFile dcfile lns1- else- error $- "Aftovolio.General.IO.generalF: Directory of the file "- `mappend` dcfile- `mappend` " is not writable!"- let l1 = length sRepresent- if code == -1- then- if lineNmb == -1- then return strOutput- else do- print23 filtering prestr poststr 1 [initstr]- return strOutput- else do- print23 filtering prestr poststr 1 [initstr]- parseLineNumber l1 >>= \num -> do- permiss <- getPermissions fs- let writ = writable permiss- readab = readable permiss- if writ && readab- then outputWithFile h writingSystem allophones arrCharClassification segmentRules basicSpaces additionalDelims selStr compards sRepresent code grps fs num- else- error- "The specified file cannot be used for appending the text! Please, specify another file!"- return []+ if L.null lineNumbersSel then do+ putStrLn lns1+ if L.null dcfile+ then putStr ""+ else do+ doesFileExist dcfile >>= \exist ->+ if exist+ then do+ getPermissions dcfile >>= \perms ->+ if writable perms+ then writeFile dcfile lns1+ else+ error $+ "Aftovolio.General.IO.generalF: File "+ `mappend` dcfile+ `mappend` " is not writable!"+ else do+ getCurrentDirectory >>= \currdir -> do+ getPermissions currdir >>= \perms ->+ if writable perms+ then writeFile dcfile lns1+ else+ error $+ "Aftovolio.General.IO.generalF: Directory of the file "+ `mappend` dcfile+ `mappend` " is not writable!"+ let l1 = length sRepresent+ if code == -1+ then+ if lineNmb == -1+ then return strOutput+ else do+ print23 filtering prestr poststr 1 [initstr]+ return strOutput+ else do+ print23 filtering prestr poststr 1 [initstr]+ parseLineNumber l1 >>= \num -> do+ permiss <- getPermissions fs+ let writ = writable permiss+ readab = readable permiss+ if writ && readab+ then outputWithFile h writingSystem allophones arrCharClassification segmentRules basicSpaces additionalDelims selStr compards sRepresent code grps fs num+ else+ error+ "The specified file cannot be used for appending the text! Please, specify another file!"+ return strOutput+ else mapM putStrLn strOutput >> return strOutput where jjj kk = let (q1, r1) = quotRem kk (if kk < 0 then -10 else 10) in jjj' q1 r1 emptyline jjj' q1 r1 emptyline@@ -227,7 +238,7 @@ | r1 < 0 = -10 * q1 + (if emptyline then -4 else r1) | otherwise = 10 * q1 + (if emptyline then 4 else r1) -data AftovolioGen = S Int Integer String deriving (Eq, Generic)+data AftovolioGen = S !Int !Integer !String deriving (Eq, Generic) instance Show AftovolioGen where show (S i j xs) =@@ -342,6 +353,7 @@ , Int , Bool , String+ , [Int] , [String] ) argsProcessing writingSystem allophones arrCharClassification segmentRules basicSpaces additionalDelims h ysss zsss xs = do@@ -352,7 +364,7 @@ if not . L.null $ compareByLinesFinalFile then do compareFilesToOneCommon 14 args11 compareByLinesFinalFile- return (0, 0, (C1 []), False, 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@@ -447,6 +459,7 @@ ) $ arg3s l = length ll+ lineNumbersSel = readNums . getC "+nm" $ argsC argCs = catMaybes (fmap (readMaybeECG l) . getC "+a" $ argsC) argCBs = unwords . getC "+b" $ argsC -- If you use the parenthese with +b ... -b then consider also using the quotation marks for the whole algebraic constraint. At the moment though it is still not working properly for parentheses functionality. The issue should be fixed in the further releases. permutationsType = bTransform2Perms . getB "+P" $ argsB@@ -493,6 +506,7 @@ , codesave , concurrently , basiclineoption+ , lineNumbersSel , variants1 ) @@ -537,6 +551,7 @@ , codesave , concurrently , basiclineoption+ , lineNumbersSel , variants1 ) -> generalF@@ -566,6 +581,7 @@ (filesave, codesave) concurrently basiclineoption+ lineNumbersSel variants1 >> return () {-# INLINE processingF #-}@@ -575,7 +591,7 @@ https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#constraints -} cSpecs :: CLSpecifications-cSpecs = zip ["+a", "+b", "+l2", "+ln"] . cycle $ [-1]+cSpecs = zip ["+a", "+b", "+l2", "+ln", "+nm"] . cycle $ [-1] bSpecs :: CLSpecifications bSpecs =
Aftovolio/Halfsplit.hs view
@@ -19,6 +19,8 @@ import GHC.Num (abs, (+), (-)) import GHC.Real (quot, quotRem) import System.IO (getLine, putStr, putStrLn)+import Text.Read (readMaybe)+import Data.Maybe (Maybe,fromMaybe) import Text.Show (Show (..)) import Debug.Trace @@ -154,3 +156,14 @@ where l = length xss putSLn = putStrLn . (if filtering then removeChangesOfDurations else id)++readNums :: [String] -> [Int]+readNums = concatMap readNs+ where readNs :: String -> [Int]+ readNs xs + | any (== '-') xs = + let (ys, ts) = break (== '-') xs + us = dropWhile (not . isDigit) ts+ in [(fromMaybe 1 (readMaybe ys:: Maybe Int))..(fromMaybe 1 (readMaybe us:: Maybe Int))]+ | otherwise = [fromMaybe 1 (readMaybe xs:: Maybe Int)]+{-# INLINE readNums #-}
Aftovolio/Ukrainian/IO.hs view
@@ -95,9 +95,11 @@ Bool -> -- | An initial string to be analysed. String ->+ -- | A list of line numbers of the Aftovolio data to be displayed in the modes except tests and file appending.+ [Int] -> [String] -> IO [String]-generalF power10 ldc compards html filtering dcfile selStr (prestr, poststr) lineNmb file numTest hc (grps, mxms) k 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 hashStep emptyline splitting (fs, code) concurrently initstr lineNumbersSel universalSet@(_ : _ : _) = do syllableDurationsDs <- readSyllableDurations file let syllN = countSyll initstr f ldc compards syllableDurationsDs grps mxms @@ -151,78 +153,87 @@ numTest universalSet else- let sRepresent =+ let lgth = length universalSet+ sRepresent = zipWith (\k (x, ys) -> S k x ys) [1 ..] . sortOn id . map (\xss -> (f ldc compards syllableDurationsDs grps mxms xss, xss)) $ universalSet- strOutput =+ strOutput + | L.null lineNumbersSel = force- . (: [])+ . lines . halfsplit1G (\(S _ y _) -> y) filtering (if html then "<br>" else "") (jjj splitting) $ sRepresent+ | otherwise = + force + . filter (not . L.null)+ . map (\ (S k _ qqs) -> if (k `elem` lineNumbersSel && k <= lgth) then qqs else [])+ $ sRepresent in do- let lns1 = unlines strOutput- putStrLn lns1- if L.null dcfile- then putStr ""- else do- exist <- doesFileExist dcfile- if exist- then do- perms <- getPermissions dcfile- if writable perms- then writeFile dcfile lns1- else- error $- "Aftovolio.Ukrainian.IO.generalF: File "- `mappend` dcfile- `mappend` " is not writable!"- else do- currdir <- getCurrentDirectory- perms <- getPermissions currdir- if writable perms- then writeFile dcfile lns1- else- error $- "Aftovolio.Ukrainian.IO.generalF: Directory of the file "- `mappend` dcfile- `mappend` " is not writable!"- let l1 = length sRepresent- if code == -1- then- if lineNmb == -1- then return strOutput- else do- print23 filtering prestr poststr 1 [initstr]- return strOutput- else do- print23 filtering prestr poststr 1 [initstr]- parseLineNumber l1 >>= \num -> do- permiss <- getPermissions fs- let writ = writable permiss- readab = readable permiss- if writ && readab- then- outputWithFile- selStr- compards- sRepresent- file- syllableDurationsDs- code- grps- k- fs- num- else- error- "Aftovolio.Ukrainian.IO.generalF: The specified file cannot be used for appending the text! Please, specify another file!"- return []+ if L.null lineNumbersSel then do+ let lns1 = unlines strOutput+ putStrLn lns1+ if L.null dcfile+ then putStr ""+ else do+ exist <- doesFileExist dcfile+ if exist+ then do+ perms <- getPermissions dcfile+ if writable perms+ then writeFile dcfile lns1+ else+ error $+ "Aftovolio.Ukrainian.IO.generalF: File "+ `mappend` dcfile+ `mappend` " is not writable!"+ else do+ currdir <- getCurrentDirectory+ perms <- getPermissions currdir+ if writable perms+ then writeFile dcfile lns1+ else+ error $+ "Aftovolio.Ukrainian.IO.generalF: Directory of the file "+ `mappend` dcfile+ `mappend` " is not writable!"+ let l1 = length sRepresent+ if code == -1+ then+ if lineNmb == -1+ then return strOutput+ else do+ print23 filtering prestr poststr 1 [initstr]+ return strOutput+ else do+ print23 filtering prestr poststr 1 [initstr]+ parseLineNumber l1 >>= \num -> do+ permiss <- getPermissions fs+ let writ = writable permiss+ readab = readable permiss+ if writ && readab+ then+ outputWithFile+ selStr+ compards+ sRepresent+ file+ syllableDurationsDs+ code+ grps+ k+ fs+ num+ else+ error+ "Aftovolio.Ukrainian.IO.generalF: The specified file cannot be used for appending the text! Please, specify another file!"+ return strOutput+ else mapM_ putStrLn strOutput >> return strOutput where jjj kk = let (q1, r1) = quotRem kk (if kk < 0 then -10 else 10) in jjj' q1 r1 emptyline jjj' q1 r1 emptyline@@ -230,10 +241,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 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ =+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."@@ -242,7 +253,7 @@ putStrLn . unlines $ strOutput return strOutput -data AftovolioUkr = S Int Integer String deriving (Eq, Generic)+data AftovolioUkr = S !Int !Integer !String deriving (Eq, Generic) instance NFData AftovolioUkr
CHANGELOG.md view
@@ -52,3 +52,7 @@ * Sixth version revised B. Improved documentation and code readability for several modules. +## 0.7.0.0 -- 2025-02-15++* Seventh version. Added new command line argument group +nm ... -nm and changed the arity of the main functions. These arguments are the line numbers of the sorted Aftovolio data to be displayed in the modes except tests and file appending.+
README.md view
@@ -385,7 +385,7 @@ SYNOPSIS: -- aftovolioUkr [[+a \<AFTOVolio constraints\> -a] [+b \<extended algebraic AFTOVolio constraints\> -b] [+P \<non-negative Int\>] [+c \<HashCorrections encoded\>] [-e] [+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] [+P \<non-negative Int\>] [+c \<HashCorrections encoded\>] [-e] [+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\>] [+nm \<numbers of the lines in the sorted AftovolioUkr list to be displayed\> -nm] [+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] [+P \<non-negative Int\>] [+c \<HashCorrections encoded\>] [-e] [+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@@ -394,16 +394,16 @@ - aftovolioUkr [[+a \<AFTOVolio constraints\> -a] [+b \<extended algebraic AFTOVolio constraints\> -b] [+P \<non-negative Int\>] [+ul \<diversity property encoding string\>] [+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] [+P \<non-negative Int\>] [-e] [+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] [+P \<non-negative Int\>] [-e] [+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\>] [+nm \<numbers of the lines in the sorted AftovolioUkr list to be displayed\> -nm] [+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] [+P \<non-negative Int\>] [-e] [+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] [+P \<non-negative Int\>] [-e] [+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\>] [+nm \<numbers of the lines in the sorted AftovolioUkr list to be displayed\> -nm] [+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] [+P \<non-negative Int\>] [-e] [+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] [+P \<non-negative Int\>] [-e] [+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\>] [+nm \<numbers of the lines in the sorted AftovolioUkr list to be displayed\> -nm] [+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] [+P \<non-negative Int\>] [-e] [+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] [+P \<non-negative Int\>] [-e] [+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\>] [+nm \<numbers of the lines in the sorted AftovolioUkr list to be displayed\> -nm] [+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\>]@@ -422,6 +422,8 @@ - +f — if present with two arguments specifies the file to which the output information should be appended and the mode of appending (which parts to write). The default value if the secodnd parameter is 0 or not element of [1,2,3,4,10,11,12,13,14,15,16,17,18,19] is just the resulting String option. If the second parameter is 1 then the sequential number and the text are written; if it is 2 then the estimation value and the string are written; if it is 3 then the full information is written i. e. number, string and estimation; if it is 4 then the number and estimation (no string). The second argument greater or equal to 10 takes effect only if the meter consists of two syllables (in case of "+r 21" command line options given). If it is 10 in such a case then before appending the line option itself to the given file there is hashes information for this line option displayed. If it is 11 — the same hashes information is displayed before processing as for 1. If it is 12 — the same hashes information is displayed before processing as for 2 and so on for 13, 14. If it is 15 up to 19 — it is analogically to the the 10–14 but the hashes information is not only printed on the screen, but appended to the file specified. These values are intended to test the interesting hypothesis about where the pauses can occur. For more information on the hypothesis, see above in the section about prosodic unpredictability.++- +nm \.\.\. -nm — if specified in the modes without tests and file single line output changes the output so that just the lines with the specified Int numbers are displayed in the order of the specified numbers. Please, delimit the numbers with spaces. To specify some range, use just dash as here: \'34-250\' meaning that lines with numbers between 34 and 250 inclusively will be displayed. Music mode additional information is displayed as well here. - +dc — if specified with two further arguments then the first one can be 1 or something else. If it is 1 then additionally to every line as usual there is printed also \<br\> html tag at the end of the line for the two-columns output. Otherwise, nothing is added to each line. The second argument further is a FilePath to the writable existing file or to the new file that will be located in the writable by the user directory. The two-column output will be additionally written to this file if it is possible, otherwise the program will end with an exception.
aftovolio.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: aftovolio-version: 0.6.2.0+version: 0.7.0.0 -- A short (one-line) description of the package. synopsis: An AFTOVolio implementation for creating texts with special phonetic / prosodic properties.@@ -28,7 +28,7 @@ -- LANGUAGE extensions used by modules in this package. other-extensions: NoImplicitPrelude, BangPatterns, DeriveGeneric, StrictData- build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.2.0, quantizer ==0.4.0.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0+ build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.2.0, quantizer ==0.4.0.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0, uniqueness-periods-vector-stats == 0.4.0.0 hs-source-dirs: . default-language: Haskell2010 @@ -40,7 +40,7 @@ ghc-options: -threaded -rtsopts -- LANGUAGE extensions used by modules in this package. other-extensions: NoImplicitPrelude, BangPatterns, DeriveGeneric, StrictData- build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.2.0, quantizer ==0.4.0.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0 + build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.2.0, quantizer ==0.4.0.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0, uniqueness-periods-vector-stats == 0.4.0.0 hs-source-dirs: src, . default-language: Haskell2010
src/Main.hs view
@@ -27,6 +27,7 @@ import Aftovolio.General.Datatype3 (read3) import Aftovolio.General.Distance import GHC.Real ((/),quot,gcd)+import Aftovolio.Halfsplit (readNums) import Aftovolio.Ukrainian.Syllable import Aftovolio.Ukrainian.SyllableWord8 import Aftovolio.Ukrainian.ReadDurations@@ -131,6 +132,7 @@ | otherwise = (head filedata,0) ll = take maxNumWords . (if prepare then id else words . mconcat . prepareTextN3 maxNumWords . unwords) $ arg3s l = length ll+ lineNumbersSel = readNums . getC "+nm" $ argsC argCs = catMaybes (fmap (readMaybeECG l) . getC "+a" $ argsC) permutationsType = bTransform2Perms . getB "+P" $ argsB !perms @@ -141,7 +143,7 @@ if helpMessage then do hSetNewlineMode stdout universalNewlineMode helpPrint helpArg- else generalF power10 ldc compards html filtering dcfile selStr (prestr, poststr) lineNmb fileDu numTest hc grpp sylD 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 hashStep emptyline splitting (filesave, codesave) concurrently (unwords arg3s) lineNumbersSel variants1 >> return () bSpecs :: CLSpecifications@@ -151,19 +153,19 @@ aSpecs = zip ["+di", "-e", "+l", "-p", "-C"] . cycle $ [0] cSpecs :: CLSpecifications-cSpecs = [("+a",-1),("+l2",-1),("+ln",-1)]+cSpecs = [("+a",-1),("+l2",-1),("+ln",-1),("+nm",-1)] helpPrint :: String -> IO () helpPrint xs | xs == "0" = putStrLn "SYNOPSIS:\n"- | xs == "1" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+P <non-negative Int>] [+c <HashCorrections encoded>] [-e] [+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 == "1" = putStrLn "aftovolioUkr [[+a <AFTOVolio constraints> -a] [+b <extended algebraic AFTOVolio constraints> -b] [+P <non-negative Int>] [+c <HashCorrections encoded>] [-e] [+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>] [+nm <numbers of the lines in the sorted AftovolioUkr list to be displayed> -nm] [+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] [+P <non-negative Int>] [+c <HashCorrections encoded>] [-e] [+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] [+P <non-negative Int>] [+ul <diversity property encoding string>] [+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] [+P <non-negative Int>] [-e] [+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] [+P <non-negative Int>] [-e] [+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] [+P <non-negative Int>] [-e] [+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] [+P <non-negative Int>] [-e] [+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>] [+nm <numbers of the lines in the sorted AftovolioUkr list to be displayed> -nm] [+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] [+P <non-negative Int>] [-e] [+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>] [+nm <numbers of the lines in the sorted AftovolioUkr list to be displayed> -nm] [+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] [+P <non-negative Int>] [-e] [+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>] [+nm <numbers of the lines in the sorted AftovolioUkr list to be displayed> -nm] [+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] [+P <non-negative Int>] [-e] [+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] [+P <non-negative Int>] [-e] [+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>] [+nm <numbers of the lines in the sorted AftovolioUkr list to be displayed> -nm] [+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 == "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" | xs == "w" = putStrLn "+w \t— if specified with the next Int8 number then the splitting of the output for non-testing options is used. Is used when no \"-t\" argument is given. The output is split into two columns to improve overall experience. The parameter after the \"+w\" is divided by 10 (-10 for negative numbers) to obtain the quotient and remainder (Int8 numbers). The quotient specifies the number of spaces or tabular characters to be used between columns (if the parameter is positive then the spaces are used, otherwise tabular characters). The remainder specifies the option of displaying. If the absolute value of the remainder (the last digit of the parameter) is 1 then the output in the second column is reversed; if it is in the range [2..5] then the output is groupped by the estimation values: if it is 2 then the first column is reversed; if it is 3 then the second column is reversed; if it is 4 then like 2 but additionally the empty line is added between the groups; if it is 5 then like for 3 and additionally the empty line is added between the groups. Otherwise, the second column is reversed. The rules are rather complex, but you can give a try to any number (Int8, [129..128] in the fullscreen terminal). The default value is 54 that corresponds to some reasonable layout.\n"@@ -171,6 +173,7 @@ | xs == "d" = putStrLn "+d \t— if present, then afterwards should be a FilePath to the file with new durations of the Ukrainian AFTOVolio representations. They can be obtained using the information from the section on durations in the REEDME.md file by the following link: \nhttps://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md\n" | xs == "p" = putStrLn "-p \t— if present the minimal grammar transformations (appending and prepending the dependent parts) are not applied. Can be useful also if the text is analyzed as a Ukrainian transcription of text in some other language.\n" | xs == "f" = putStrLn "+f \t— if present with two arguments specifies the file to which the output information should be appended and the mode of appending (which parts to write). The default value if the secodnd parameter is 0 or not element of [1,2,3,4,10,11,12,13,14,15,16,17,18,19] is just the resulting String option. If the second parameter is 1 then the sequential number and the text are written; if it is 2 then the estimation value and the string are written; if it is 3 then the full information is written i. e. number, string and estimation; if it is 4 then the number and estimation (no string).\nThe second arguments greater or equal to 10 take effect only if the meter consists of two syllables (in case of \"+r 21\" command line options given). If it is 10 in such a case then before appending the line option itself to the given file there is hashes information for this line option displayed. If it is 11 — the same hashes information is displayed before processing as for 1. If it is 12 — the same hashes information is displayed before processing as for 2 and so on for 13, 14. If it is 15 up to 19 — it is analogically to the the 10–14 but the hashes information is not only printed on the screen, but appended to the file specified. These values are intended to test the interesting hypothesis about where the pauses can occur. For more information on the hypothesis, see: \n https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text\n"+ | xs == "nm" = putStrLn "+nm ... -nm \t— if specified in the modes without tests and file single line output changes the output so that just the lines with the specified Int numbers are displayed in the order of the specified numbers. Please, delimit the numbers with spaces. To specify some range, use just dash as here: \'34-250\' meaning that lines with numbers between 34 and 250 inclusively will be displayed. Music mode additional information is displayed as well here.\n" | xs == "dc" = putStrLn "+dc \t— if specified with two further arguments then the first one can be 1 or something else. If it is 1 then additionally to every line as usual there is printed also <br> html tag at the end of the line for the two-columns output. Otherwise, nothing is added to each line. The second argument further is a FilePath to the writable existing file or to the new file that will be located in the writable by the user directory. The two-column output will be additionally written to this file if it is possible, otherwise the program will end with an exception.\n" | xs == "a" = putStrLn "+a ... -a \t— if present contains a group of constraints for AFTOVolio. For more information, see: \nhttps://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md in English or in Ukrainian: \nhttps://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.html#%D0%BE%D0%B1%D0%BC%D0%B5%D0%B6%D0%B5%D0%BD%D0%BD%D1%8F-constraints\n" | xs == "b" = putStrLn "+b ... -b \t— if present takes precedence over those ones in the +a ... -a group (the latter ones have no effect). A group of constraints for AFTOVolio using some boolean-based algebra. If you use parentheses there, please, use quotation of the whole expression between the +b and -b (otherwise there will be issues with the shell or command line interpreter related to parentheses). For example, on Linux bash or Windows PowerShell: +b \'P45(A345 B32)\' -b. If you use another command line environment or interpreter, please, refer to the documentation for your case about the quotation and quotes. For more information, see: \nhttps://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md in English or: \nhttps://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioUkr.7.pdf in Ukrainian.\n"@@ -200,6 +203,7 @@ | 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 == "+nm" = ["0","1","OR","4","OR","5","OR","6","OR","8","nm"] | 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"] @@ -219,5 +223,5 @@ | 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","OR","8","l","w","s","d","p","f","dc","a","b","P","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","l","w","s","d","p","f","nm","dc","a","b","P","l2","q","ul","r","c","t","C","k","x","m","m2","cm"]