packages feed

phladiprelio-ukrainian-simple 0.15.2.0 → 0.15.3.0

raw patch · 6 files changed

+32/−22 lines, 6 filesdep +minmaxdep ~phladiprelio-general-datatypedep ~phonetic-languages-constraints-arraydep ~phonetic-languages-permutations-arrayPVP ok

version bump matches the API change (PVP)

Dependencies added: minmax

Dependency ranges changed: phladiprelio-general-datatype, phonetic-languages-constraints-array, phonetic-languages-permutations-array, phonetic-languages-simplified-base

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -208,3 +208,7 @@  * Fifteenth version revised B. Changed the function to count syllables in test and other cases modes. Now it includes the "\_{set of digits}" groups as syllables. Some code deduplication in help function. Some minor documentation improvements. +## 0.15.3.0 -- 2024-01-29++* Fifteenth version revised C. Some performance improvements. Fixed issue with just one syllable in case of application '=' mode afterwards. Some minor documentation improvements. Switched to containers and minimax as additional dependencies.+
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2023 Oleksandr Zhabenko+Copyright (c) 2023-2024 Oleksandr Zhabenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Main.hs view
@@ -9,7 +9,7 @@ import Text.Read (readMaybe) import Text.Show (show) -- Added in 0.14.1.0 import System.IO (putStrLn,readFile, hSetNewlineMode, stdout, universalNewlineMode)-import Rhythmicity.MarkerSeqs hiding (id) +import qualified Rhythmicity.MarkerSeqs as R hiding (id)  import Data.List hiding (foldr) import Data.Char (isSpace) import Data.Maybe (fromMaybe,catMaybes) @@ -39,7 +39,7 @@       sylD = let k = snd (fromMaybe 2 (readMaybe (concat . getB "+s" $ argsB)::Maybe Int) `quotRemInt` 4) in if k == 0 then 4 else k   syllableDurationsDs <- readSyllableDurations fileDu   let maxNumWords = let k = fromMaybe 7 (readMaybe (concat . getB "+x" $ argsB)::Maybe Int) in if k == 0 || abs k >= 9 then 9 else max (abs k) 2-      hc = readHashCorrections . concat . getB "+c" $ argsB+      hc = R.readHashCorrections . concat . getB "+c" $ argsB       dcspecs = getB "+dc" argsB       power10' = fromMaybe 4 (readMaybe (concat . getB "+q" $ argsB)::Maybe Int)       power10 @@ -50,7 +50,7 @@         | otherwise = (head dcspecs == "1",last dcspecs)       prepare = oneA "-p" argsA       selStr = concat . getB "+ul" $ argsB-      grpp = grouppingR . concat . getB "+r" $ argsB+      grpp = R.grouppingR . concat . getB "+r" $ argsB       splitting = fromMaybe 50 (readMaybe (concat . getB "+w" $ argsB)::Maybe Int8)       emptyline = oneA "+l" argsA       numTest = fromMaybe 1 (readMaybe (concat . getB "-t" $ argsB)::Maybe Int)
Phladiprelio/Ukrainian/IO.hs view
@@ -3,7 +3,7 @@ module Phladiprelio.Ukrainian.IO where  import GHC.Arr-import GHC.Base+import GHC.Base  import GHC.Num (Num(..),Integer,(+),(-),(*)) import GHC.Real (Integral(..),fromIntegral,(/),quot,rem,quotRem,round,(^)) import GHC.Enum (fromEnum,toEnum)@@ -11,7 +11,7 @@ import Text.Read (readMaybe) import Data.Char (isDigit, isAlpha,toLower,isSpace) import System.IO (putStrLn, FilePath,stdout,hSetNewlineMode,universalNewlineMode,getLine,appendFile,print,writeFile)-import Rhythmicity.MarkerSeqs hiding (id) +import qualified Rhythmicity.MarkerSeqs as R hiding (id) import Data.List hiding (foldr) import Data.Foldable (Foldable) import Data.Maybe (isNothing,fromJust) @@ -19,6 +19,7 @@ import Phladiprelio.Ukrainian.Syllable  import Phladiprelio.Ukrainian.SyllableDouble import Phladiprelio.Ukrainian.Melodics +import Control.Monad (sequence)  import GHC.Int (Int8) import CaseBi.Arr (getBFst') import Phladiprelio.Ukrainian.ReadDurations@@ -29,6 +30,7 @@ import Data.ReversedScientific import Control.Concurrent.Async (mapConcurrently) import Phladiprelio.Tests+import Data.MinMax1  import Phladiprelio.General.Datatype3  import Phladiprelio.General.Distance import Phladiprelio.UniquenessPeriodsG@@ -44,7 +46,7 @@  -> Int -- ^ The number of the line in the file to be read the lines from. If equal to -1 then neither reading from the file is done nor the first argument influences the processment results.  -> FilePath -- ^ The file to read the sound representation durations from.  -> Int - -> HashCorrections + -> R.HashCorrections   -> (Int8,[Int8])   -> Int   -> Bool @@ -61,7 +63,7 @@    let syllN = countSyll initstr --       universalSet = map unwords . permutations . words $ rs        f ldc compards syllableDurationsDs grps mxms -- Since the version 0.12.0.0, has a possibility to evaluate diversity property.-            | null selStr = (if null compards then (sum . countHashes2G hashStep hc grps mxms) else (round . (*10^power10) . distanceSqrG2 ldc compards)) . read3 (not . null . filter (not . isSpace)) 1.0 (mconcat . (if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} +            | null selStr = (if null compards then (sum . R.countHashes2G hashStep hc grps mxms) else (round . (*10^power10) . distanceSqrG2 ldc compards)) . read3 (not . null . filter (not . isSpace)) 1.0 (mconcat . (if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4}                           else  if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS)              | otherwise = fromIntegral . diverse2GGL (selectSounds selStr) [100,101] . convertToProperUkrainianI8 . filter (\c -> not (isDigit c) && c /= '_' && c/= '=')    hSetNewlineMode stdout universalNewlineMode@@ -160,7 +162,7 @@           then mapConcurrently           else mapM) (\(q,qs) ->                            let m = stat1 syllN (q,qs)-                              (min1, max1) = minMax11ByCList (comparing (f ldc [] syllableDurationsDs q qs)) universalSet +                              (min1, max1) = 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 @@ -191,5 +193,5 @@                  sylls = createSyllablesUkrS textP                  outputS = outputSel lineOption code                  qqs = readEq4 (mconcat . (if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS) (map showFS . mconcat . createSyllablesUkrS) . basicSplit $ textP -                 (breaks, rs) = showZerosFor2PeriodMusic qqs+                 (breaks, rs) = R.showZerosFor2PeriodMusic qqs 
README.md view
@@ -3,24 +3,24 @@ has at the moment (as of the version 0.11.0.0) not the full functionality. The previous implementation  and its documentation are at the links: -https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array+[Old approach](https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array) -[Ukrainian documentation](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.pdf)+[Підхід фонетичних (просодичних) мов до відкриття більш бажаних варіантів текстового рядка (PhLADiPreLiO) з використанням Haskell](https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.pdf) -[English documentation](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf)+[Phonetic languages approach to discovering preferred line options (PhLADiPreLiO) using Haskell](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf)  The draft scientific papers on prosody and the software that are based on the question of why some lines are easy to pronounce and read while others are not. They are in two languages by the  following links: -[Ukranian text](https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83)+[Чому деякі рядки легко вимовляти, а інші — ні, або просодична неспрогнозованість як характеристика тексту](https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83) -[English text](https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text)+[Why some lines are easy to pronounce and others are not, or prosodic unpredictability as a characteristic of text](https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text)  The old documentation for the implementation is available at the following links.-[Новий текст теорії](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioUkr.7.pdf)+[Більш бажані варіанти текстового рядка на основі PhLADiPreLiO з використанням Haskell — базові ідеї](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioUkr.7.pdf) -[New implementation](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioEng.7.pdf)+[Preferred line options based on the PhLADiPreLiO using Haskell](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioEng.7.pdf)  The examples of the using the new functionality in the 0.10.0.0 version is in two short videos by the links below:@@ -34,7 +34,7 @@  The video with the demonstration of the new functionality in the version 0.7.0.0 is by the link: -https://www.facebook.com/100012184148486/posts/1767318773684244+[new functionality in 0.7.0.0](https://www.facebook.com/100012184148486/posts/1767318773684244)  Three videos with examples of the usage of the new music mode are by the following link: https://www.facebook.com/Oleksandr.S.Zhabenko/posts/pfbid02Vtcxuo5d73ZqsmgbxoRxLJoxLLmfpZ5B4VB9g7AQzuVTnydLHVtGRD48Q8RWLy2dl@@ -72,6 +72,8 @@  Since the version 0.15.1.0 there is a possibility to see selective help just for one command line option (e. g. +dc) with general context or without it. To get the help message for the option with general context (extended help for one command line argument), use combination of "-h <full first command line argument in the command line option signing>" (e. g. -h +dc). To get just help on this option without context, use the option without "+" or "-" (e. g. "-h dc"). +The version 0.15.3.0 adds some performance improvements and fixes the issue with just one syllable before '=' symbol in music mode.+ For the list of bash aliases a few of which are used in the videos, see: https://github.com/Oleksandr-Zhabenko/phladiprelio-alias/blob/main/.bashrc @@ -119,6 +121,8 @@ On the 11/11/2023 there is St. Martin of Tours Day for Roman Catholics and Poland Independence Day.  The version 0.15.0.0 is also devoted to the bright memory of the Artem Sachuk, who perished as a soldier defending Ukraine from the Russian occupants. Kingdom of God to his soul and eternal memory! Condolences to everybody who knows him.++The version 0.15.3.0 is also devoted to Sophie Kok, a sister of Emma Kok, who turned 18 on the 06/01/2024. Besides, on the 22/01/2024 there is Day of Unity of Ukraine and on the 23/01/2024 there is for Orthodox Church memory of St. Paulinus of Nola.  All support is welcome, including donations for the needs of the Ukrainian army, IDPs and refugees. 
phladiprelio-ukrainian-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               phladiprelio-ukrainian-simple-version:            0.15.2.0+version:            0.15.3.0  -- A short (one-line) description of the package. synopsis:           A PhLADiPreLiO implementation for Ukrainian that uses hashes and asynchronous concurrency.@@ -9,7 +9,7 @@ description:        It is another project that is based on the similar ideas as [phonetic-languages-simplified-examples-array package](https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array). For actual usage ideas see the documentation by the links [English draft paper](https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text) and [Ukrainian draft paper](https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83)  -- A URL where users can report bugs.--- bug-reports:+bug-reports:        https://github.com/Oleksandr-Zhabenko/phladiprelio-ukrainian-simple/issues  -- The license under which the package is released. license:            MIT@@ -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.4.1.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.12.1.0, phladiprelio-ukrainian-shared ==0.1.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.4.0.0, phonetic-languages-constraints-array ==0.7.3.0, phonetic-languages-simplified-base ==0.7.1.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.5.2.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0+    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.4.1.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.12.1.0, phladiprelio-ukrainian-shared ==0.1.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.8.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.7.0.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0, minmax ==0.1.1.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-    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.4.1.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.12.1.0, phladiprelio-ukrainian-shared ==0.1.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.4.0.0, phonetic-languages-constraints-array ==0.7.3.0, phonetic-languages-simplified-base ==0.7.1.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.5.2.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0+    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.4.1.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.12.1.0, phladiprelio-ukrainian-shared ==0.1.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.8.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.7.0.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0, minmax ==0.1.1.0     hs-source-dirs:   .     default-language: Haskell2010