phonetic-languages-examples 0.4.0.0 → 0.4.1.0
raw patch · 3 files changed
+34/−19 lines, 3 filesdep ~phonetic-languages-constraintsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-constraints
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−0
- Simple/Main.hs +22/−14
- phonetic-languages-examples.cabal +5/−5
CHANGELOG.md view
@@ -45,3 +45,10 @@ * Fourth version. Added the possibility to use constraints from the phonetic-languages-constraints package (it is also a new leightweight dependency) in the lineVariantsG executable. They allows to reduce number of computations needed and explicitly apply additional needed grammar rules, extend the extent of understandable text and so on.++## 0.4.1.0 -- 2020-11-12++* Fourth version revised A. Fixed issue with incorrect behaviour because of phonetic-languages-constraints inner issue. Changed the dependency boundaries appropriately. Changed +the behaviour of the lineVariantsG so that you can use no coeffs (specially formatted first command line argument), this then is like for the versions before 0.3.0.0. ++
Simple/Main.hs view
@@ -15,7 +15,7 @@ module Main where import Control.Parallel.Strategies-import Languages.UniquenessPeriods.Vector.Constraints.Encoded (decodeLConstraints,readMaybeECG)+import Languages.UniquenessPeriods.Vector.Constraints.Encoded (EncodedCnstrs(..),decodeLConstraints,readMaybeECG) import qualified Data.Vector as VB import Data.Print.Info import Languages.UniquenessPeriods.Vector.General.DebugG@@ -53,25 +53,33 @@ main = do args0 <- getArgs let args = takeWhile (/= "+A") args0 `mappend` (drop 1 . dropWhile (/= "-A") $ args0)- (!numericArgs,!textualArgs) = L.span (all isDigit) . drop 1 $ args- !xs = concat . take 1 . fLines . unwords . drop 1 $ textualArgs- !l = length . words $ xs- argCs = catMaybes (fmap (readMaybeECG l) . drop 1 . dropWhile (/= "+A") . takeWhile (/= "-A") $ args0) coeffs = readCF . concat . take 1 $ args -- The first command line argument. If not sure, just pass \"1_\".- !whspss = VB.fromList " 01-"- !arg0 = fromMaybe 1 $ (readMaybe (concat . take 1 $ numericArgs)::Maybe Int)- !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)- !choice = concat . take 1 $ textualArgs- !v = VB.fromList xs- !subs = subG whspss v- if null argCs then let !perms = genPermutations l in generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v- else do- putStr "Please, check whether the line below corresponds and is consistent with the data you have specified between the +A and -A optins. "+ if isPair coeffs then generalProc2 args0 coeffs (drop 1 args)+ else generalProc2 args0 coeffs args+++generalProc2 :: [String] -> Coeffs2 -> [String] -> IO ()+generalProc2 args0 coeffs args = do+ let (!numericArgs,!textualArgs) = L.span (all isDigit) $ args+ !xs = concat . take 1 . fLines . unwords . drop 1 $ textualArgs+ !l = length . words $ xs+ argCs = catMaybes (fmap (readMaybeECG l) . drop 1 . dropWhile (/= "+A") . takeWhile (/= "-A") $ args0)+ !arg0 = fromMaybe 1 $ (readMaybe (concat . take 1 $ numericArgs)::Maybe Int)+ !numberI = fromMaybe 1 $ (readMaybe (concat . drop 1 . take 2 $ numericArgs)::Maybe Int)+ !choice = concat . take 1 $ textualArgs+ !whspss = VB.fromList " 01-"+ !v = VB.fromList xs+ !subs = subG whspss v+ if null argCs then let !perms = genPermutations l in generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v+ else do+ putStr "Please, check whether the line below corresponds and is consistent with the data you have specified between the +A and -A options. " putStrLn "If it is inconsistent then enter further \"n\", press Enter and then run the program again with better arguments. " putStrLn "If the line is consistent with your input between +A and -A then just press Enter to proceed further. "+ putStrLn xs correct <- getLine if correct == "n" then putStrLn "You stopped the program, please, if needed, run it again with better arguments. " else let !perms = decodeLConstraints argCs . genPermutations $ l in generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v+ generalProc1 :: Coeffs2 -> [String] -> Int -> Int -> String -> Int -> VB.Vector (VB.Vector Int) -> VB.Vector (VB.Vector Char) -> VB.Vector Char -> IO () generalProc1 coeffs numericArgs arg0 numberI choice l perms subs v = do
phonetic-languages-examples.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: phonetic-languages-examples-version: 0.4.0.0+version: 0.4.1.0 synopsis: A generalization of the uniqueness-periods-vector-examples functionality. description: Is intended to use more functionality of the Data.Vector, Data.Foldable, Data.Monoid and Data.SubG modules. homepage: https://hackage.haskell.org/package/phonetic-languages-examples@@ -20,7 +20,7 @@ exposed-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG -- other-modules: other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, phonetic-languages-vector >=0.1 && <1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, vector >=0.11 && < 0.14, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.3.1 && <1+ build-depends: base >=4.7 && <4.15, phonetic-languages-vector >=0.1 && <1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, vector >=0.11 && < 0.14, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.3.2 && <1 -- hs-source-dirs: default-language: Haskell2010 @@ -28,7 +28,7 @@ main-is: Main.hs other-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >=0.1.1.1 && < 1, mmsyn2 >= 0.3 && <1, phonetic-languages-constraints >=0.3.1 && <1+ build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >=0.1.1.1 && < 1, mmsyn2 >= 0.3 && <1, phonetic-languages-constraints >=0.3.2 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Simple default-language: Haskell2010@@ -37,7 +37,7 @@ main-is: Main.hs other-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.3.1 && <1+ build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, parallel >=3.2.0.6 && <4, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.3.2 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Lines default-language: Haskell2010@@ -46,7 +46,7 @@ main-is: Main.hs other-modules: Languages.UniquenessPeriods.Vector.FuncRepRelatedG other-extensions: BangPatterns- build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, uniqueness-periods-vector-stats >=0.1.2 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.3.1 && <1+ build-depends: base >=4.7 && <4.15, ukrainian-phonetics-basic >=0.2.0.2 && <1, vector >=0.11 && <0.14, phonetic-languages-vector >=0.1 && <1, phonetic-languages-general >=0.1 && < 1, phonetic-languages-common >=0.1.1 && <1, phonetic-languages-properties >=0.3 && <1, phonetic-languages-ukrainian >=0.2.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, uniqueness-periods-vector-stats >=0.1.2 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.1 && <1, subG >= 0.1.1.1 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.3.2 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., GetInfo default-language: Haskell2010