packages feed

phladiprelio-ukrainian-simple 0.20.0.0 → 0.20.1.0

raw patch · 5 files changed

+22/−15 lines, 5 filesdep +deepseqdep ~halfsplitdep ~phladiprelio-general-datatypedep ~phladiprelio-ukrainian-sharedPVP ok

version bump matches the API change (PVP)

Dependencies added: deepseq

Dependency ranges changed: halfsplit, phladiprelio-general-datatype, phladiprelio-ukrainian-shared

API changes (from Hackage documentation)

+ Phladiprelio.Ukrainian.IO: instance Control.DeepSeq.NFData Phladiprelio.Ukrainian.IO.PhladiprelioUkr
+ Phladiprelio.Ukrainian.IO: instance GHC.Generics.Generic Phladiprelio.Ukrainian.IO.PhladiprelioUkr

Files

CHANGELOG.md view
@@ -223,3 +223,7 @@  * Twentieth version. Switched to Word8 instead of Double. Made a window to provide in the future possible updates for the Double-related functionality. Updated some important dependencies. Now the results can differ significantly from the earlier ones because the values are calculated in a significantly different way. + ## 0.20.1.0 -- 2024-04-08++* Twentieth version revised A. Fixed issue with phladiprelio-general-datatype as a dependency. Added explicit dependency of deepseq, which is installed by default by GHC installation (therefore, no additional overhead). Some performance and memory usage improvements.+ 
Main.hs view
@@ -30,6 +30,7 @@ import Phladiprelio.Ukrainian.SyllableWord8 import Phladiprelio.Ukrainian.ReadDurations import Data.ChooseLine+import Control.DeepSeq (force)   main :: IO () main = do@@ -107,18 +108,18 @@     let line2comparewith            | oneC "+l2" argsC || null linecomp3 = unwords . getC "+l2" $ argsC           | otherwise = linecomp3-        basecomp = read3 (not . null . filter (not . isSpace)) 1.0 (mconcat . (if null fileDu then case sylD of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} -                           else  if length syllableDurationsDs >= sylD then syllableDurationsDs !! (sylD - 1) else syllableDurationsD2) . createSyllablesUkrS) line2comparewith+        basecomp = force . read3 (not . null . filter (not . isSpace)) 1.0 (mconcat . (if null fileDu then case sylD of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} +                           else  if length syllableDurationsDs >= sylD then syllableDurationsDs !! (sylD - 1) else syllableDurationsD2) . createSyllablesUkrS) $ line2comparewith  -        example = read3 (not . null . filter (not . isSpace)) 1.0 (mconcat . (if null fileDu then case sylD of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} -                           else  if length syllableDurationsDs >= sylD then syllableDurationsDs !! (sylD - 1) else syllableDurationsD2) . createSyllablesUkrS) (unwords arg3s)+        example = force . read3 (not . null . filter (not . isSpace)) 1.0 (mconcat . (if null fileDu then case sylD of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} +                           else  if length syllableDurationsDs >= sylD then syllableDurationsDs !! (sylD - 1) else syllableDurationsD2) . createSyllablesUkrS) $ (unwords arg3s)         le = length example         lb = length basecomp         gcd1 = gcd le lb         ldc = (le * lb) `quot` gcd1         mulp = ldc `quot` lb --        max2 = maximum basecomp-        compards = concatMap (replicate mulp) basecomp+        compards = force . concatMap (replicate mulp) $ basecomp         (filesave,codesave)             | null filedata = ("",-1)           | length filedata == 2 = (head filedata, fromMaybe 0 (readMaybe (last filedata)::Maybe Int))@@ -131,7 +132,7 @@           | null argCs = genPermutationsL l           | otherwise = decodeLConstraints argCs . genPermutationsL $ l          descending = oneA "+n" argsA-        variants1 = uniquenessVariants2GNBL ' ' id id id perms ll+        variants1 = force . uniquenessVariants2GNBL ' ' id id id perms $ ll     if helpMessage then do        hSetNewlineMode stdout universalNewlineMode       helpPrint helpArg
Phladiprelio/Ukrainian/IO.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables #-}+{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, DeriveGeneric, DeriveAnyClass #-}  module Phladiprelio.Ukrainian.IO where @@ -7,6 +7,7 @@ import GHC.Word import GHC.Num (Num(..),Integer,(+),(-),(*)) import GHC.Real (Integral(..),fromIntegral,(/),rem,quotRem,round,(^))+import GHC.Generics import GHC.Enum (fromEnum) import Text.Show (Show(..)) import Text.Read (readMaybe)@@ -36,6 +37,7 @@ import Phladiprelio.General.Distance import Phladiprelio.UniquenessPeriodsG import Control.Exception+import Control.DeepSeq    generalF  :: Int -- ^ A power of 10. The distance value is quoted by 10 in this power if the next ['Word8'] argument is not empty. The default one is 0. The right values are in the range [0..4].@@ -71,7 +73,7 @@    if numTest >= 0 && numTest <= 179 && numTest /= 1 && null compards then testsOutput concurrently syllN 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 = (:[]) . halfsplit1G (\(S _ y _) -> y) (if html then "<br>" else "") (jjj splitting) $ sRepresent+            strOutput = force . (:[]) . halfsplit1G (\(S _ y _) -> y) (if html then "<br>" else "") (jjj splitting) $ sRepresent                         in do                              let lns1 = unlines strOutput                              putStrLn lns1@@ -115,7 +117,7 @@     putStrLn . unlines $ strOutput     return strOutput -data PhladiprelioUkr = S Int Integer String deriving Eq+data PhladiprelioUkr = S Int Integer String deriving (Eq, NFData, Generic)  instance Show PhladiprelioUkr where   show (S i j xs) = showBignum 7 j `mappend` " " `mappend` xs `mappend` "  " `mappend` showWithSpaces 4 i@@ -180,7 +182,7 @@           then mapConcurrently           else mapM) (\(q,qs) ->                            let m = stat1 syllN (q,qs)-                              (min1, max1) = fromJust . minMax11By (comparing (f ldc [] syllableDurationsDs q qs)) $ universalSet +                              (min1, max1) = force . fromJust . minMax11By (comparing (f ldc [] syllableDurationsDs q qs)) $ universalSet                                mx = f ldc [] 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 
README.md view
@@ -80,7 +80,7 @@  Breaking changes since 0.20.0.0  =============================== -Since the version 0.20.0.0 the way of calculation is significantly changed, therefore the results are expected to be different. Please, have this in mind. It is expected to have larger groups and more options to choose from. Nevertheless, the approach becomes more stable. The performance and resources consumtion are very closely comparable with probably some subtle differences between versions 0.15.* and 0.20.0.0.+Since the version 0.20.0.0 the way of calculation is significantly changed, therefore the results are expected to be different. Please, have this in mind. It is expected to have larger groups and more options to choose from. Nevertheless, the approach becomes more stable. The performance and resources consumtion are very closely comparable with probably some subtle differences between versions 0.16.* and 0.20.0.0.   Devotion  ========@@ -131,7 +131,7 @@  On the 08/03/2024 there is International Women's Day. -On the 12/03/2024 there was a Birthday of Emma Kok, the foundation founder. She turned 16. Therefore, the release 0.20.0.0 is additionally devoted i.e. tributed to her.+On the 12/03/2024 there was a Birthday of Emma Kok, the foundation founder. She turned 16. Therefore, the releases 0.20.0.0 and 0.20.1.0 are additionally devoted i.e. tributed to her.  Besides, you can support Ukrainian people in various forms. 
phladiprelio-ukrainian-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               phladiprelio-ukrainian-simple-version:            0.20.0.0+version:            0.20.1.0  -- A short (one-line) description of the package. synopsis:           A PhLADiPreLiO implementation for Ukrainian that uses hashes and asynchronous concurrency.@@ -28,7 +28,7 @@      -- LANGUAGE extensions used by modules in this package.     other-extensions: NoImplicitPrelude, BangPatterns-    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, ukrainian-phonetics-basic-array ==0.10.0.0, phonetic-languages-ukrainian-array ==0.12.2.0, phladiprelio-ukrainian-shared ==0.5.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.5.0.0, phonetic-languages-constraints-array ==0.8.0.0, phonetic-languages-simplified-base ==0.9.0.0, halfsplit ==0.4.2.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0, phladiprelio-general-datatype ==0.10.0.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0, minmax ==0.1.1.0+    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, ukrainian-phonetics-basic-array ==0.10.0.0, phonetic-languages-ukrainian-array ==0.12.2.0, phladiprelio-ukrainian-shared ==0.5.0.1, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.5.0.0, phonetic-languages-constraints-array ==0.8.0.0, phonetic-languages-simplified-base ==0.9.0.0, halfsplit ==0.4.3.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0, phladiprelio-general-datatype ==0.10.0.1, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2     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-    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, ukrainian-phonetics-basic-array ==0.10.0.0, phonetic-languages-ukrainian-array ==0.12.2.0, phladiprelio-ukrainian-shared ==0.5.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.5.0.0, phonetic-languages-constraints-array ==0.8.0.0, phonetic-languages-simplified-base ==0.9.0.0, halfsplit ==0.4.2.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0, phladiprelio-general-datatype ==0.10.0.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0, minmax ==0.1.1.0+    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, ukrainian-phonetics-basic-array ==0.10.0.0, phonetic-languages-ukrainian-array ==0.12.2.0, phladiprelio-ukrainian-shared ==0.5.0.1, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.5.0.0, phonetic-languages-constraints-array ==0.8.0.0, phonetic-languages-simplified-base ==0.9.0.0, halfsplit ==0.4.3.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0, phladiprelio-general-datatype ==0.10.0.1, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2     hs-source-dirs:   .     default-language: Haskell2010