packages feed

phladiprelio-general-simple 0.2.1.0 → 0.2.2.0

raw patch · 4 files changed

+18/−10 lines, 4 filesdep ~rhythmic-sequencesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: rhythmic-sequences

API changes (from Hackage documentation)

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

Files

CHANGELOG.md view
@@ -24,3 +24,9 @@ * Second version revised A. Added the possibility to use "-t 2" as options to perform weaker and more permissive test for irregularities that influence the prosody. +## 0.2.2.0 -- 2023-03-29++* Second version revised B. Added the possibility to use "-t 3" as options to perform test related+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.+
Phladiprelio/General/Simple.hs view
@@ -35,17 +35,18 @@  -> Int  -> HashCorrections   -> (Int8,[Int8])- -> Bool + -> Bool+ -> 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 rss = do+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-       f grps mxms = sum . countHashesG hc grps mxms . mconcat . h . createSyllablesPL wrs ks arr gs us vs-   if numTest `elem` [0,2] then do+       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       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]:(if numTest == 0 then [[2,1],[3,2],[4,3,2],[5,4,3],[6,5,4,3,2]] else [[2],[3],[4,3],[5,4],[6,5,4]]))+        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]]}))    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  countSyll @@ -83,11 +84,12 @@  -> [[String]]   -> [[String]]   -> Bool+ -> Int -- ^ The hashing function step. The default value is 20. Is expected to be greater than 2, and better greater than 12.   -> String   -> IO ()-processingF wrs ks arr gs us vs h numTest hc (grps,mxms) ysss zsss descending xs = do+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 str1 >> return ()+  generalF wrs ks arr gs us vs h numTest hc (grps,mxms) descending hashStep str1 >> return ()  
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.0.0) not the full functionality. The previous implementation +has at the moment (as of the version 0.2.2.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
phladiprelio-general-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               phladiprelio-general-simple-version:            0.2.1.0+version:            0.2.2.0  -- A short (one-line) description of the package. synopsis:           A generalized functionality of PhLADiPreLiO for different languages that uses hash algorithms.@@ -27,7 +27,7 @@      -- LANGUAGE extensions used by modules in this package.     other-extensions: NoImplicitPrelude-    build-depends:    base >=4.13 && <5, rhythmic-sequences ==0.2.3.1, 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     hs-source-dirs:   .     default-language: Haskell2010