packages feed

phladiprelio-general-simple 0.6.2.0 → 0.7.0.0

raw patch · 4 files changed

+35/−10 lines, 4 filesdep +asyncPVP ok

version bump matches the API change (PVP)

Dependencies added: async

API changes (from Hackage documentation)

- Phladiprelio.General.Simple: generalF :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([[[PRS]]] -> [[Double]]) -> Int -> HashCorrections -> (Int8, [Int8]) -> Bool -> Int -> Bool -> Int8 -> (FilePath, Int) -> [String] -> IO [String]
+ Phladiprelio.General.Simple: generalF :: GWritingSystemPRPLX -> [(Char, Char)] -> CharPhoneticClassification -> SegmentRulesG -> String -> String -> ([[[PRS]]] -> [[Double]]) -> Int -> HashCorrections -> (Int8, [Int8]) -> Bool -> Int -> Bool -> Int8 -> (FilePath, Int) -> Bool -> [String] -> IO [String]

Files

CHANGELOG.md view
@@ -90,3 +90,9 @@ * Sixth version revised B. Switched to the newer version of dependencies so that the library can be  successfully compiled with GHC-9.6.2 compiler. +## 0.7.0.0 -- 2023-07-30++* Seventh version. Added asynchronous concurrent calculations and async as a package dependency. Added+  the possibility to calculate for the text with maximum 9 words or their combinations (using +x+command line option). Added new draft papers with improved theory about the usage of the software.+
Phladiprelio/General/Simple.hs view
@@ -32,6 +32,7 @@ import Phladiprelio.Halfsplit import System.Directory (doesFileExist,readable,writable,getPermissions,Permissions(..)) import Data.ReversedScientific+import Control.Concurrent.Async (mapConcurrently)  generalF   :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.@@ -49,9 +50,10 @@  -> Bool   -> Int8  -> (FilePath, Int)+ -> Bool -- ^ In the testing mode, whether to execute computations in concurrent mode (for speed up) or in single thread. If specified needs the executable to be compiled with -rtsopts and -threaded options and run with the command line +RTS -N -RTS options.  -> [String]   -> IO [String] -generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (fs, code) universalSet +generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (fs, code) concurrently universalSet   | null universalSet = let strOutput = ["You have specified the data and constraints on it that lead to no further possible options.", "Please, specify another data and constraints."] in mapM putStrLn strOutput >> return strOutput  | length universalSet == 1 = mapM putStrLn universalSet >> return universalSet  | otherwise = do@@ -61,7 +63,8 @@    hSetNewlineMode stdout universalNewlineMode    if numTest >= 0 && numTest <= 179 && numTest /= 1 then do       putStrLn "Feet   Val  Stat   Proxim" -      mapM (\(q,qs) -> let m = stat1 syllN (q,qs)+      (if concurrently then mapConcurrently else mapM) +           (\(q,qs) -> let m = stat1 syllN (q,qs)                            (min1,max1) = minMax11ByCList (comparing (f q qs)) universalSet                             mx = f 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 @@ -238,12 +241,13 @@       argCs = catMaybes (fmap (readMaybeECG l) -- . (showB l lstW2:)                                                     . getC "+a" $ argsC)       splitting = fromMaybe 50 (readMaybe (concat . getB "+w" $ argsB)::Maybe Int8) +      concurrently = any (== "-C") args11       filedata = getB "+f" argsB       (filesave,codesave)           | null filedata = ("",-1)         | length filedata == 2 = (head filedata, fromMaybe 0 (readMaybe (last filedata)::Maybe Int))         | otherwise = (head filedata,0)-      ll = take 7 . (if prepare then id else words . mconcat . prepareText ysss zsss xs . unwords) $ args11+      ll = take (if any (== "+x") args11 then 9 else 7) . (if prepare then id else words . mconcat . prepareText ysss zsss xs . unwords) $ args11       l = length ll       argCBs = unwords . getC "+b" $ argsC -- If you use the parenthese with +b ... -b then consider also using the quotation marks for the whole algebraic constraint. At the moment though it is still not working properly for parentheses functionality. The issue should be fixed in the further releases.       !perms @@ -251,7 +255,7 @@         | null argCs = genPermutationsL l         | otherwise = decodeLConstraints argCs . genPermutationsL $ l        variants1 = uniquenessVariants2GNBL ' ' id id id perms ll-  generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (filesave, codesave) variants1 >> return ()+  generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep emptyline splitting (filesave, codesave) concurrently variants1 >> return ()  -- | Specifies the group of the command line arguments for 'processingF', which specifies the -- PhLADiPreLiO constraints. For more information, see:
README.md view
@@ -1,6 +1,6 @@ The library is the new implementation of the ideas related to PhLADiPreLiO (Phonetic Languages Approach to Discovering the Preferred Line Options) for different languages. It uses hashes and-has at the moment (as of the version 0.6.0.0) not the full functionality. The previous implementation +has at the moment (as of the version 0.7.0.0) not the full functionality. The previous implementation  and its documentation are at the links:  https://hackage.haskell.org/package/phonetic-languages-simplified-generalized-examples-array@@ -9,7 +9,14 @@  [English documentation](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf) -The documentation for  the  new implementation is available at the following links.+The new documentation for the usage of the software package for Ukrainian language is by the+following 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)++[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)++The old documentation for the implementation is available at the following links. [Новий текст теорії](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioUkr.7.pdf)  [New implementation](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioEng.7.pdf)@@ -42,7 +49,8 @@  Devotion  ======== -The author would like to devote this project to support the Foundation GASTROSTARS.+The author would like to devote this project to support the Foundation GASTROSTARS. The releas+version 0.7.0.0 is dedicated to Vico Kok.  At the day of publication of the first version of the package (12/03/2023) there is the foundation founder's (this is [Emma Kok](https://www.emmakok.nl)) Birthday.@@ -64,8 +72,15 @@  On the 15/06/2023 there is the final bachelor's exam for Enzo Kok in violin playing in Amsterdam.  +On the 30/07/2023 there is the Birthday of Vico Kok and International Friendship Day. Therefore, the+release version 0.7.0.0 is devoted to Vico Kok.+ If you would like to share some financial support, please, contact the foundation using the URL:  [Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or ++[Donation Page](https://gastrostars.nl/doneren) 
phladiprelio-general-simple.cabal view
@@ -1,12 +1,12 @@ cabal-version:      2.4 name:               phladiprelio-general-simple-version:            0.6.2.0+version:            0.7.0.0  -- A short (one-line) description of the package. synopsis:           A generalized functionality of PhLADiPreLiO for different languages that uses hash algorithms.  -- A longer description of the package.-description:        The basic ideas of PhLADiPreLiO (Phonetic Languages Approach to Discovering Preferred Line Options) are described in the work: [PhLADiPreLiO.Ukr.21.pdf](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Ukr.21.pdf) [PhLADiPreLiO.Eng.21.pdf](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf). This is the generalization and it uses somewhat different approach with the same basic ideas.+description:        The basic ideas of PhLADiPreLiO (Phonetic Languages Approach to Discovering Preferred Line Options). The usage ideas are described in the new scientific draft papers: [Ukranian 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) and [English 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).  -- A URL where users can report bugs. -- bug-reports:@@ -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.3.0.0, phonetic-languages-phonetics-basics ==0.10.0.2, phladiprelio-general-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.2.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0+    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.3.0.0, phonetic-languages-phonetics-basics ==0.10.0.2, phladiprelio-general-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.2.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >=2.2.2 && <3     hs-source-dirs:   .     default-language: Haskell2010