mmsyn7s 0.6.4.0 → 0.6.5.0
raw patch · 3 files changed
+33/−13 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- MMSyn7s.hs +28/−12
- mmsyn7s.cabal +1/−1
CHANGELOG.md view
@@ -69,3 +69,7 @@ * Sixth version revised D. Fixed issue with the 'notEqC' and respectively 'divideConsonants' functions. Added new functions to deal more with UZP datatype and so with classical sounds in the MMSyn7.Syllable module and respectively in the MMSyn7s and Main modules. Changed the behaviour for "-s2" first command line argument for mmsyn7s executable. Some minor documentation improvements.++## 0.6.4.0 -- 2020-03-01++* Sixth version revised E. Improved the performance of the 'main7s' function for the "-s" first command line parameter.
MMSyn7s.hs view
@@ -107,17 +107,33 @@ ; putStrLn "which shows what sound representations are needed to be created if every sound is unique; " ; putStrLn " the other beginning is equivalent to the \"0\" behaviour." }- "-v" -> putStrLn "mmsyn7s: version 0.6.4.0"- "-s" -> let ys = unwords . drop 1 $ texts in- do { putStrLn $ "Uniqueness periods: " ++ (show . uniquenessPeriods $ ys)- ; putStrLn $ "Possibly unique sounds representations density: " ++ (show . sndsDensity $ ys)- ; putStrLn $ "Number of sounds representations that are enough to cover the text: " ++ (show . countSnds2 $ ys)- ; putStrLn $ "Mean for the uniqueness periods list: " ++ (show . uniqPeriodsMean $ ys)- ; putStrLn $ "Dispersion for the uniqueness periods list: " ++ (show . uniqPeriodsDispersion $ ys)- ; putStrLn $ "Standard quadratic deviation for the uniqueness periods list: " ++ (show . uniqStdQDeviation $ ys)- ; putStrLn $ "The maximum element in the uniqueness periods list: " ++ (show . uniqMax $ ys)- ; putStrLn $ "The minimum element in the uniqueness periods list: " ++ (show . uniqMin $ ys)- }+ "-v" -> putStrLn "mmsyn7s: version 0.6.5.0"+ "-s" -> let ys = unwords . drop 1 $ texts+ zs = uniquenessPeriods ys in+ if zs /= [0::Int]+ then do { let t = sum zs+ m = length zs+ n = fromIntegral t / fromIntegral m+ d = ((sum . fmap (\w -> (fromIntegral w - n) * (fromIntegral w - n)) $ zs) / fromIntegral m)+ s = sqrt d+ mx = maximum zs+ mn = minimum zs+ ; putStrLn $ "Uniqueness periods: " ++ (show zs)+ ; putStrLn $ "Possibly unique sounds representations density: " ++ show (fromIntegral t / (fromIntegral . length . show7s $ ys))+ ; putStrLn $ "Number of sounds representations that are enough to cover the text: " ++ show t+ ; putStrLn $ "Mean for the uniqueness periods list: " ++ show n+ ; putStrLn $ "Dispersion for the uniqueness periods list: " ++ show d+ ; putStrLn $ "Standard quadratic deviation for the uniqueness periods list: " ++ show s+ ; putStrLn $ "The maximum element in the uniqueness periods list: " ++ show mx+ ; putStrLn $ "The minimum element in the uniqueness periods list: " ++ show mn }+ else do { putStrLn $ "Uniqueness periods: [0]"+ ; putStrLn $ "Possibly unique sounds representations density: 0.0"+ ; putStrLn $ "Number of sounds representations that are enough to cover the text: 0"+ ; putStrLn $ "Mean for the uniqueness periods list: 0.0"+ ; putStrLn $ "Dispersion for the uniqueness periods list: 0.0"+ ; putStrLn $ "Standard quadratic deviation for the uniqueness periods list: 0.0"+ ; putStrLn $ "The maximum element in the uniqueness periods list: 0"+ ; putStrLn $ "The minimum element in the uniqueness periods list: 0" } "-s2" -> let n = concat . drop 1 . take 2 $ texts in exceptRead n (drop 2 texts) "1" -> print . fst . show7s5 . unwords . drop 1 $ texts "-1" -> putStrLn . snd . show7s5 . unwords . drop 1 $ texts@@ -272,7 +288,7 @@ -- the Ukrainian sounds representations (non-silent ones) being unique and not duplicated alongside the given text starting from the beginning to the end. -- This function provides some important information about the phonetical and in some cases semantical structures of the text. uniquenessPeriods :: String -> [Int]-uniquenessPeriods xs | any (not . isSpace) xs = map length . show7s6 $ xs+uniquenessPeriods xs | any (not . isSpace) xs = fmap length . show7s6 $ xs | otherwise = [0::Int] -- | Function 'uniqPeriodsMean' is a mathematical expectation for the list obtained by 'uniquenessPeriods' function. It is a statistic metric.
mmsyn7s.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn7s-version: 0.6.4.0+version: 0.6.5.0 synopsis: Shows a sorted list of the Ukrainian sounds representations that can be used by mmsyn7 series of programs description: A program and a library that show a sorted list of the Ukrainian sounds representations that can be used by mmsyn7 series of programs homepage: https://hackage.haskell.org/package/mmsyn7s