packages feed

uniqueness-periods-vector-examples 0.3.0.0 → 0.3.1.0

raw patch · 3 files changed

+11/−3 lines, 3 files

Files

ChangeLog.md view
@@ -20,3 +20,7 @@  * Third version. Added a new executable uniqVec03. It tests a hypothesis that for many Ukrainian poems (for example, by Oleksandr Oles) the actual  diverse2 output lies close between midpoint between the minimum and maximum possible for that line values. ++## 0.3.1.0 -- 2020-09-15++* Third version revised. Some code improvements for uniqVec03 executable for filtering non-Ukrainian texts parts that must not be inlined. 
Proportion/Main.hs view
@@ -5,7 +5,7 @@ -- Stability   :  Experimental -- Maintainer  :  olexandr543@yahoo.com ----- Analyzez a poetic text in Ukrainian for every line prints statistic data and +-- Analyzes a poetic text in Ukrainian, for every line prints statistic data and  -- then for the whole poem prints the hypothesis evaluation information.   module Main where@@ -28,7 +28,7 @@   args <- getArgs   let file = concat . take 1 $ args   contents <- readFile file-  let flines = filter (not . null . filter isAlpha) . prepareText $ contents+  let flines = filter (not . null . filter isAlpha . filter isUkrainian) . prepareText $ contents   data3 <- mapM (\ts -> do    let maxE = (\k -> if k == 0 then 1 else k) . (\rs -> if null rs then 0 else head rs) . firstFrom3 . maximumElBy 1 (V.singleton (oneProperty)) $ UL2 ([],uniquenessVariants2GN " 01-" (V.singleton (oneProperty)) (uniquenessPeriodsVector3 " 01-" .                aux0 . convertToProperUkrainian) (justOneValue2Property . diverse2) $ ts)@@ -42,3 +42,7 @@   let mean1 = sum data3 / fromIntegral (length data3)   putStrLn $ showFFloat (Just 3) mean1 "   +-   " ++ showFFloat (Just 3) (sqrt ((sum (map (**2) data3) / fromIntegral (length data3)) - mean1 ** 2)) ""   +isUkrainian :: Char -> Bool+isUkrainian x+ | x == '\x0404' || (x >= '\x0406' && x <= '\x0407') || (x >= '\x0410' && x <= '\x0429') || x == '\x042C' || (x >= '\x042E' && x <= '\x0449') || x == '\x044C' || (x >= '\x044E' && x <= '\x044F') || x == '\x0454' || (x >= '\x0456' && x <= '\x0457') || isPunctuation x || isSpace x = True+ | otherwise = False
uniqueness-periods-vector-examples.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                uniqueness-periods-vector-examples-version:             0.3.0.0+version:             0.3.1.0 synopsis:            Examples of usage for the uniqueness-periods-vector series of packages description:         Examples of usage for the uniqueness-periods-vector series of packages. Several executables are planned to demonstrate the libraries work. homepage:            https://hackage.haskell.org/package/uniqueness-periods-vector-examples