packages feed

phladiprelio-general-simple 0.2.4.0 → 0.3.0.0

raw patch · 4 files changed

+39/−14 lines, 4 filesdep +phonetic-languages-constraints-arraydep +phonetic-languages-permutations-arraydep +phonetic-languages-simplified-basePVP ok

version bump matches the API change (PVP)

Dependencies added: phonetic-languages-constraints-array, phonetic-languages-permutations-array, phonetic-languages-simplified-base

API changes (from Hackage documentation)

+ Phladiprelio.General.Simple: cSpecs :: CLSpecifications

Files

CHANGELOG.md view
@@ -40,3 +40,9 @@ * Second version revised D. Added the possibility to see example lines for minimum and maximum values for the properties in  the test mode using the "-t <one of 7, 8, or 9>" command line arguments. +## 0.3.0.0 -- 2023-05-13++* Third version. Added two new command line groups of arguments - "-p" (no minimal grammar+rules application) and "+a ... -a" (constraints). Updated documentation (especially new pdfs). +Added new lightweight dependencies. +
Phladiprelio/General/Simple.hs view
@@ -16,13 +16,17 @@ import Rhythmicity.MarkerSeqs hiding (id)  import Rhythmicity.BasicF  import Data.List hiding (foldr)-import Data.Maybe (fromMaybe, mapMaybe) +import Data.Maybe (fromMaybe, mapMaybe, catMaybes)  import Data.Tuple (fst,snd) import CLI.Arguments import CLI.Arguments.Get import CLI.Arguments.Parsing import GHC.Int (Int8) import Data.Ord (comparing)+import Phladiprelio.PermutationsRepresent+import Phladiprelio.ConstraintsEncoded+import Phladiprelio.PermutationsArr+import Phladiprelio.StrictVG  generalF   :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.@@ -39,9 +43,9 @@  -> Int -- ^ The hashing function step. The default value is 20. Is expected to be greater than 2, and better greater than 12.   -> [String]   -> IO [()] -generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep rss = do-   let syllN = sum . map (countSyll wrs arr us vs) $ rss-       universalSet = map unwords . permutations $ rss+generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep universalSet = do+   let syllN = countSyll wrs arr us vs . concat . take 1  $ universalSet+--       universalSet = map unwords . permutations $ rss        f grps mxms = sum . countHashes2G hashStep hc grps mxms . mconcat . h . createSyllablesPL wrs ks arr gs us vs    if numTest `elem` 0:[2..9] then do       hSetNewlineMode stdout universalNewlineMode@@ -95,8 +99,21 @@  -> String   -> IO () processingF wrs ks arr gs us vs h numTest hc (grps,mxms) ysss zsss descending hashStep xs = do-  args <- getArgs-  let str1 = take 7 . words . mconcat . prepareText ysss zsss xs . unwords $ args-  generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep str1 >> return ()-+  args0 <- getArgs+  let (argsC, args) = takeCs1R ('+','-') cSpecs args0+      prepare = any (== "-p") args+      argCs = catMaybes (fmap (readMaybeECG (l - 1)) -- . (showB l lstW2:)+                                                    . getC "+a" $ argsC)+      ll = take 7 . (if prepare then id else words . mconcat . prepareText ysss zsss xs . unwords) $ args+      l = length ll+      perms +        | 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 variants1 >> return () +-- | Specifies the group of the command line arguments for 'processingF', which specifies the+-- PhLADiPreLiO constraints. For more information, see:+-- https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#constraints +cSpecs :: CLSpecifications+cSpecs = [("+a",-1)]
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.2.2.0) not the full functionality. The previous implementation +has at the moment (as of the version 0.3.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@@ -10,9 +10,9 @@ [English documentation](https://oleksandrzhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.pdf)  The documentation for  the  new implementation is available at the following links.-[Новий текст теорії](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioUkr.pdf)+[Новий текст теорії](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioUkr.new.4.pdf) -[New implementation](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioEng.pdf)+[New implementation](https://oleksandr-zhabenko.github.io/uk/rhythmicity/phladiprelioEng.new.4.pdf)  Example of the new functionality in the version 0.3.0.0 of the related prototype project for  Ukrainian is in the video:@@ -42,6 +42,8 @@  On the 19/04/2023 there is Emma's namesday, the memory of St. Emma of Lesum or Emma of Stiepel  (also known as Hemma and Imma) Day.++On the 14/05/2023 there is Mother's Day. It is also a good opportunity to support the foundation.  If you would like to share some financial support, please, contact the foundation using the URL:
phladiprelio-general-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               phladiprelio-general-simple-version:            0.2.4.0+version:            0.3.0.0  -- A short (one-line) description of the package. synopsis:           A generalized functionality of PhLADiPreLiO for different languages that uses hash algorithms.@@ -18,7 +18,7 @@  -- A copyright notice. copyright:          Oleksandr Zhabenko--- category:+category:           Language, Math, Music extra-source-files: CHANGELOG.md, README.md  library@@ -27,7 +27,7 @@      -- LANGUAGE extensions used by modules in this package.     other-extensions: NoImplicitPrelude-    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+    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.2.0.0, phonetic-languages-simplified-base ==0.7.0.0     hs-source-dirs:   .     default-language: Haskell2010