packages feed

phladiprelio-general-simple 0.2.2.0 → 0.2.3.0

raw patch · 4 files changed

+19/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -30,3 +30,8 @@ to search potentially the most irregular or unstable line options. Added the possibility to specify the own hash step with "+k" command line option. Updated the dependency boundaries. +## 0.2.3.0 -- 2023-04-04++* Second version revised C. Added the possibility to see example lines for minimum and maximum values+  for the properties in the test mode using the "-t <one of 4, 5, or 6>" command line arguments.+
Phladiprelio/General/Simple.hs view
@@ -12,7 +12,7 @@ import System.Environment (getArgs) import GHC.Num ((+),(-),(*)) import Text.Read (readMaybe)-import System.IO (putStrLn, FilePath)+import System.IO (putStrLn, FilePath,stdout,universalNewlineMode,hSetNewlineMode) import Rhythmicity.MarkerSeqs hiding (id)  import Rhythmicity.BasicF  import Data.List hiding (foldr)@@ -43,11 +43,15 @@    let syllN = sum . map (countSyll wrs arr us vs) $ rss        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,3] then do+   if numTest `elem` 0:[2..6] then do+      hSetNewlineMode stdout universalNewlineMode       putStrLn "Feet   Val  Stat   Proxim" -      mapM (\(q,qs) -> let m = stat1 syllN (q,qs) in let max1 = maximumBy (comparing (f q qs)) universalSet in let mx = f q qs max1 in putStrLn (show (fromEnum q) `mappend` "   |   " `mappend`  show mx `mappend` "     " `mappend` show m `mappend` "  -> " `mappend` show (100 * fromIntegral mx / fromIntegral m) `mappend` "%")) . -        zip [2..7] $ ([1]:(case numTest of { 0 -> [[2,1],[3,2],[4,3,2],[5,4,3],[6,5,4,3,2]]; 2 -> [[2],[3],[4,3],[5,4],[6,5,4]]; 3 -> [[1],[2,1],[3,2,1],[3,2],[4,3,2]]}))+      mapM (\(q,qs) -> let m = stat1 syllN (q,qs) in let max1 = maximumBy (comparing (f q qs)) universalSet in let mx = f q qs max1 in putStrLn (show (fromEnum q) `mappend` "   |   " `mappend`  show mx `mappend` "     " `mappend` show m `mappend` "  -> " `mappend` show (100 * fromIntegral mx / fromIntegral m) `mappend` "%" `mappend` (if numTest >= 4 then let min1 = minimumBy (comparing (f q qs)) universalSet in ("\n" `mappend` min1 `mappend` "\n" `mappend` max1 `mappend` "\n")  else ""))) . zip [2..7] $ ([1]:sel numTest)    else mapM (\(x,y) -> putStrLn (show x `mappend` (' ':y)))  . (let h1 (u,w) = if descending then ((-1)*u,w) else (u,w) in sortOn h1) . map (\xss -> (f grps mxms xss, xss)) $ universalSet+      where sel x +              | x == 0 || x == 4 = [[2,1],[3,2],[4,3,2],[5,4,3],[6,5,4,3,2]]+              | x == 2 || x == 5 = [[2],[3],[4,3],[5,4],[6,5,4]]+              | otherwise = [[1],[2,1],[3,2,1],[3,2],[4,3,2]]  countSyll    :: GWritingSystemPRPLX -- ^ Data used to obtain the phonetic language representation of the text.
README.md view
@@ -19,6 +19,11 @@  https://www.facebook.com/Oleksandr.S.Zhabenko/posts/pfbid0QT1BCWf9fmgQHasfUrSSqCenR9YT1C6CtL8PV4ieGrCTWGwatRh6TTUcxho8irkHl +Example of the new functionality in the version 0.3.3.0 of the related prototype project for+Ukrainian is in the video:++https://www.facebook.com/Oleksandr.S.Zhabenko/posts/pfbid03qAMdEk6ehnQjQXLqNeAULQiTMKJUpQYUjM1eipcJy7hkxLCMuoh7cvZVUEHUUAfl+ Video recordings as examples of the working prototype usage and how you can listen to  Ukrainian text using Google services are at the links below: 
phladiprelio-general-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               phladiprelio-general-simple-version:            0.2.2.0+version:            0.2.3.0  -- A short (one-line) description of the package. synopsis:           A generalized functionality of PhLADiPreLiO for different languages that uses hash algorithms.