packages feed

phonetic-languages-simplified-lists-examples 0.4.0.0 → 0.5.0.0

raw patch · 7 files changed

+67/−62 lines, 7 filesdep +phonetic-languages-simplified-properties-lists-doubledep −phonetic-languages-simplified-properties-listsdep ~phonetic-languages-plusdep ~phonetic-languages-simplified-commondep ~ukrainian-phonetics-basicPVP ok

version bump matches the API change (PVP)

Dependencies added: phonetic-languages-simplified-properties-lists-double

Dependencies removed: phonetic-languages-simplified-properties-lists

Dependency ranges changed: phonetic-languages-plus, phonetic-languages-simplified-common, ukrainian-phonetics-basic, uniqueness-periods-vector-stats

API changes (from Hackage documentation)

- Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG: chooseMax :: Ord c => (Float -> c) -> Coeffs2 -> String -> FuncRep2 String Float c
- Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG: precChoice :: String -> Maybe Int
+ Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2: chooseMax :: Ord c => (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
+ Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2: precChoice :: String -> Maybe Int

Files

CHANGELOG.md view
@@ -25,5 +25,10 @@  ## 0.4.0.0 -- 2020-12-03 -* Fourth version. Added the new properties ralated to the uzpp2Durat3 function -- 03y, y3 (and yy2 related to -uzpp2Durat2 function). +* Fourth version. Added the new properties ralated to the uzpp2Durat3 function -- 03y, y3 (and yy2 related to+uzpp2Durat2 function).++## 0.5.0.0 -- 2020-12-05++* Fifth version. Switched to the Double instead of Float whenever possible. Some dependencies changes for this.+
GetInfo/Main.hs view
@@ -36,11 +36,11 @@ import Data.Char (isAlpha) import Data.Statistics.RulesIntervals import Data.MinMax.Preconditions-import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG+import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG2 import Phonetic.Languages.Simplified.StrictVG import Phonetic.Languages.Permutations import Phonetic.Languages.Simplified.DataG-import Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG+import Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2   main :: IO ()@@ -109,9 +109,9 @@    let !v2 = words v        !l2 = (length v2) - 2        ((!minE,!maxE),!data2)-         | l2 >= 0 = runEval (parTuple2 rpar rpar (minMax11C . map (toTransMetrices' (chooseMax id coeffs choice)) .-              uniquenessVariants2GNBL ' ' id id id (VB.unsafeIndex permsV5 l2) $ v2, toTransMetrices' (chooseMax id coeffs choice) . unwords . subG " 01-" $ v))-         | otherwise = let !mono = toTransMetrices' (chooseMax id coeffs choice) v in ((mono,mono),mono)+         | l2 >= 0 = runEval (parTuple2 rpar rpar (minMax11C . map (toTransPropertiesF' (chooseMax id coeffs choice)) .+              uniquenessVariants2GNBL ' ' id id id (VB.unsafeIndex permsV5 l2) $ v2, toTransPropertiesF' (chooseMax id coeffs choice) . unwords . subG " 01-" $ v))+         | otherwise = let !mono = toTransPropertiesF' (chooseMax id coeffs choice) v in ((mono,mono),mono)        (!wordsN,!intervalN)          | l2 >= 0 = runEval (parTuple2 rpar rpar (l2 + 2, intervalNRealFrac minE maxE gz data2))          | otherwise = (1,intervalNRealFrac data2 data2 gz data2)@@ -124,7 +124,7 @@           hPutStr stdout . showFFloat (Just 4) (data2 / minE) $ "\t"           hPutStr stdout . showFFloat (Just 4) (maxE / minE) $ "\t"           hPutStr stdout . showFFloat (Just 4) (maxE / data2) $ "\t"-          hPutStr stdout . showFFloat Nothing ratio $ "\t"+          hPutStr stdout . showFFloat (Just 8) ratio $ "\t"           hPutStr stdout ('\t':show (wordsN::Int))           hPutStr stdout ('\t':show (intervalN::Int))           hPutStrLn stdout (if printLine == 1 then '\t':v else ""))
Lines/Main.hs view
@@ -20,7 +20,7 @@ import Data.MinMax.Preconditions import qualified Data.Vector as VB import Data.List (sort)-import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG+import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG2 import Phonetic.Languages.Simplified.StrictVG import Phonetic.Languages.Permutations import Languages.UniquenessPeriods.Vector.Filters (unsafeSwapVecIWithMaxI)@@ -30,7 +30,7 @@ import Languages.Phonetic.Ukrainian.PrepareText import Phonetic.Languages.Simplified.DataG import Data.Char (isDigit)-import Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG+import Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2 import Data.Monoid (mappend)  -- | The function allows to rewrite the Ukrainian text in the file given as the first command line argument to a new file. In between, it is rewritten@@ -73,7 +73,7 @@         !l2 = (subtract 3) . length $ us     if compare l2 0 /= LT then do       let !perms2 = VB.unsafeIndex permsV $ l2-          (!minE,!maxE) = let !frep20 = chooseMax id coeffs choice in minMax11C . map (toMetrices' frep20) .+          (!minE,!maxE) = let !frep20 = chooseMax id coeffs choice in minMax11C . map (toPropertiesF' frep20) .                     uniquenessVariants2GNPBL [] (concat . take 1 $ lasts) ' ' id id id perms2 . init $ us       toFileStr (file ++ ".new.txt") (circle2I coeffs permsV choice [] numberI intervalNmbrs minE maxE $ flines)     else toFileStr (file ++ ".new.txt") ((concat . take 1 $ flines):(circle2I coeffs permsV choice [] numberI intervalNmbrs 0.0 0.0 . drop 1 $ flines))@@ -100,7 +100,7 @@   -- | Processment with rearrangements.-circle2I :: Coeffs2 -> VB.Vector [VB.Vector Int] -> String -> [String] -> Int -> VB.Vector Int -> Float -> Float -> [String] -> [String]+circle2I :: Coeffs2 -> VB.Vector [VB.Vector Int] -> String -> [String] -> Int -> VB.Vector Int -> Double -> Double -> [String] -> [String] circle2I coeffs permsG1 choice yss numberI vI minE maxE xss  | null xss = yss  | otherwise = circle2I coeffs permsG1 choice (yss `mappend` [ws]) numberI vI minE1 maxE1 tss@@ -116,7 +116,7 @@              | compare l3 0 /= LT =                let !perms3 = VB.unsafeIndex permsG1 l3                    !v4 = init w2s-                   !frep20 = chooseMax id coeffs choice in minMax11C . map (toMetrices' frep20) .+                   !frep20 = chooseMax id coeffs choice in minMax11C . map (toPropertiesF' frep20) .                       uniquenessVariants2GNPBL [] (last w2s) ' ' id id id perms3 $ v4              | otherwise = (0.0,0.0) 
− Phonetic/Languages/Simplified/Lists/Ukrainian/FuncRep2RelatedG.hs
@@ -1,34 +0,0 @@--- |--- Module      :  Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG--- Copyright   :  (c) OleksandrZhabenko 2020--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Functions to choose from the 'FuncRep' variants.--{-# LANGUAGE BangPatterns #-}--module Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG where--import CaseBi (getBFst')-import qualified Data.Vector as VB-import Phonetic.Languages.Simplified.DataG-import Phonetic.Languages.Lists.Ukrainian.PropertiesFuncRepG-import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG---- | Allows to choose the variant of the computations in case of usual processment.-chooseMax :: (Ord c) => (Float -> c) -> Coeffs2 -> String -> FuncRep2 String Float c-chooseMax g coeffs choice- | isPair coeffs = getBFst' (procBoth3InvF g coeffs, VB.fromList [("02y",procRhythmicity23F g "02y" coeffs),-    ("03y",procRhythmicity23F g "03y" coeffs), ("0y",procRhythmicity23F g "0y" coeffs),-     ("y",procBothF g coeffs),("y0",procDiverse2F g),("y2",procBoth2F g coeffs),("y3",procBoth3F g coeffs),-       ("yy",procBothInvF g coeffs),("yy2",procBoth2InvF g coeffs)]) choice- | otherwise = getBFst' (procBoth3InvF g coeffs, VB.fromList [("02y",procRhythmicity23F g "02y" coeffs),-    ("03y",procRhythmicity23F g "03y" coeffs),("0y",procRhythmicity23F g "0y" coeffs),-     ("y",procBothF g coeffs),("y0",procDiverse2F g),("y2",procBoth2F g coeffs),("y3",procBoth3F g coeffs),-       ("yy",procBothInvF g coeffs),("yy2",procBoth2InvF g coeffs)]) choice---- | Allows to choose precision in the Numeric.showFFloat function being given a choice parameter.-precChoice :: String -> Maybe Int-precChoice = getBFst' (Just 4, VB.fromList [("02y",Just 0),("03y",Just 0),("0y",Just 0),("y",Just 0),("y0",Just 0),("y2",Just 0),("y3",Just 0)])
+ Phonetic/Languages/Simplified/Lists/Ukrainian/FuncRep2RelatedG2.hs view
@@ -0,0 +1,34 @@+-- |+-- Module      :  Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2+-- Copyright   :  (c) OleksandrZhabenko 2020+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  olexandr543@yahoo.com+--+-- Functions to choose from the 'FuncRep' variants.++{-# LANGUAGE BangPatterns #-}++module Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2 where++import CaseBi (getBFst')+import qualified Data.Vector as VB+import Phonetic.Languages.Simplified.DataG+import Phonetic.Languages.Lists.Ukrainian.PropertiesFuncRepG2+import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG2++-- | Allows to choose the variant of the computations in case of usual processment.+chooseMax :: (Ord c) => (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c+chooseMax g coeffs choice+ | isPair coeffs = getBFst' (procBoth3InvF g coeffs, VB.fromList [("02y",procRhythmicity23F g "02y" coeffs),+    ("03y",procRhythmicity23F g "03y" coeffs), ("0y",procRhythmicity23F g "0y" coeffs),+     ("y",procBothF g coeffs),("y0",procDiverse2F g),("y2",procBoth2F g coeffs),("y3",procBoth3F g coeffs),+       ("yy",procBothInvF g coeffs),("yy2",procBoth2InvF g coeffs)]) choice+ | otherwise = getBFst' (procBoth3InvF g coeffs, VB.fromList [("02y",procRhythmicity23F g "02y" coeffs),+    ("03y",procRhythmicity23F g "03y" coeffs),("0y",procRhythmicity23F g "0y" coeffs),+     ("y",procBothF g coeffs),("y0",procDiverse2F g),("y2",procBoth2F g coeffs),("y3",procBoth3F g coeffs),+       ("yy",procBothInvF g coeffs),("yy2",procBoth2InvF g coeffs)]) choice++-- | Allows to choose precision in the Numeric.showFDouble function being given a choice parameter.+precChoice :: String -> Maybe Int+precChoice = getBFst' (Just 4, VB.fromList [("02y",Just 0),("03y",Just 0),("0y",Just 0),("y",Just 0),("y0",Just 0),("y2",Just 0),("y3",Just 0)])
Simple/Main.hs view
@@ -18,14 +18,14 @@ import Languages.UniquenessPeriods.Vector.Constraints.Encoded (decodeLConstraints,readMaybeECG) import qualified Data.Vector as VB import Phonetic.Languages.Simplified.DataG-import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG+import Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG2 import Languages.UniquenessPeriods.Vector.Filters (unsafeSwapVecIWithMaxI) import Phonetic.Languages.Simplified.StrictVG import Languages.Phonetic.Ukrainian.PrepareText import Data.Char (isDigit,isAlpha) import Melodics.ByteString.Ukrainian (isUkrainianL) import qualified Data.List  as L (span,sort,zip4,isPrefixOf)-import Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG+import Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2 import Phonetic.Languages.Permutations import Data.SubG hiding (takeWhile,dropWhile) import System.Environment@@ -144,14 +144,14 @@   putStrLn xs   getLine -generalProcMs :: Coeffs2 -> [VB.Vector Int] -> [String] -> (VB.Vector Int,Int,Int,String) -> IO [Result [] Char Float Float]+generalProcMs :: Coeffs2 -> [VB.Vector Int] -> [String] -> (VB.Vector Int,Int,Int,String) -> IO [Result [] Char Double Double] generalProcMs coeffs perms subs (intervalNmbrs, arg0, numberI, choice) = do   if compare numberI 2 == LT then let !frep2 = chooseMax id coeffs choice in return . fst . maximumGroupsClassificationR arg0 .     map (toResultR frep2) . uniquenessVariants2GNBL ' ' id id id perms $ subs   else do     let !variants1 = uniquenessVariants2GNBL ' ' id id id perms subs         !frep20 = chooseMax id coeffs choice-        (!minE,!maxE) = minMax11C . map (toMetrices' frep20) $ variants1+        (!minE,!maxE) = minMax11C . map (toPropertiesF' frep20) $ variants1         !frep2 = chooseMax (unsafeSwapVecIWithMaxI minE maxE numberI intervalNmbrs) coeffs choice     return . fst . maximumGroupsClassificationR arg0 . map (toResultR frep2) $ variants1 @@ -190,9 +190,9 @@       g _ _ = []         in g preText wss -print1el :: Bool -> String -> [Result [] Char Float Float] -> IO ()+print1el :: Bool -> String -> [Result [] Char Double Double] -> IO () print1el jstlines choice (x:xs)  | jstlines == True = putStrLn (line x) >> print1el True choice xs- | otherwise = putStrLn (line x) >> putStrLn (showFFloat ch (metrices x) "") >> putStrLn (showFFloat ch (transMetrices x) "") >> print1el False choice xs+ | otherwise = putStrLn (line x) >> putStrLn (showFFloat ch (propertiesF x) "") >> putStrLn (showFFloat ch (transPropertiesF x) "") >> print1el False choice xs        where !ch = precChoice choice print1el _ _ _ = return ()
phonetic-languages-simplified-lists-examples.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-lists-examples-version:             0.4.0.0+version:             0.5.0.0 synopsis:            Simplified and somewhat optimized version of the phonetic-languages-examples. description:         Is intended to use more functionality of lists and subG package. homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-lists-examples@@ -17,36 +17,36 @@ cabal-version:       >=1.10  library-  exposed-modules:     Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG, Phonetic.Languages.Simplified.Lists.DeEnCoding+  exposed-modules:     Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simplified.Lists.DeEnCoding   -- other-modules:   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.15, phonetic-languages-simplified-common >=0.3.4 && <1, phonetic-languages-simplified-properties-lists >=0.3 && <1, vector >=0.11 && < 0.14, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.4 && <1, heaps >= 0.3.6.1 && <1+  build-depends:       base >=4.8 && <4.15, phonetic-languages-simplified-common >=0.4 && <1, phonetic-languages-simplified-properties-lists-double >=0.1 && <1, vector >=0.11 && < 0.14, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.4 && <1, heaps >= 0.3.6.1 && <1   -- hs-source-dirs:   default-language:    Haskell2010  executable lineVariantsG2   main-is:             Main.hs-  other-modules:       Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG, Phonetic.Languages.Simplified.Lists.DeEnCoding+  other-modules:       Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simplified.Lists.DeEnCoding   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.15, ukrainian-phonetics-basic >=0.3.2 && <1, vector >=0.11 && <0.14, phonetic-languages-simplified-common >=0.3.4 && <1, phonetic-languages-simplified-properties-lists >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >=0.4 && < 1, mmsyn2 >= 0.3 && <1, phonetic-languages-constraints >=0.4 && <1, phonetic-languages-permutations >= 0.2 && <1, heaps >= 0.3.6.1 && <1+  build-depends:       base >=4.8 && <4.15, ukrainian-phonetics-basic >=0.4.1 && <1, vector >=0.11 && <0.14, phonetic-languages-simplified-common >=0.4 && <1, phonetic-languages-simplified-properties-lists-double >=0.1 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1.1 && <1, subG >=0.4 && < 1, mmsyn2 >= 0.3 && <1, phonetic-languages-constraints >=0.4 && <1, phonetic-languages-permutations >= 0.2 && <1, heaps >= 0.3.6.1 && <1   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., Simple   default-language:    Haskell2010  executable rewritePoemG2   main-is:             Main.hs-  other-modules:       Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG, Phonetic.Languages.Simplified.Lists.DeEnCoding+  other-modules:       Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simplified.Lists.DeEnCoding   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.15, ukrainian-phonetics-basic >=0.3.2 && <1, vector >=0.11 && <0.14, phonetic-languages-simplified-common >=0.3.4 && <1, phonetic-languages-simplified-properties-lists >=0.3 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.4 && <1, phonetic-languages-permutations >= 0.2 && <1, heaps >= 0.3.6.1 && <1+  build-depends:       base >=4.8 && <4.15, ukrainian-phonetics-basic >=0.4.1 && <1, vector >=0.11 && <0.14, phonetic-languages-simplified-common >=0.4 && <1, phonetic-languages-simplified-properties-lists-double >=0.1 && <1, print-info >=0.1.3 && <1, phonetic-languages-ukrainian >=0.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, vector >=0.11 && <0.14, phonetic-languages-plus >=0.1.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, mmsyn2 >=0.3 && <1, phonetic-languages-constraints >=0.4 && <1, phonetic-languages-permutations >= 0.2 && <1, heaps >= 0.3.6.1 && <1   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., Lines   default-language:    Haskell2010  executable propertiesTextG2   main-is:             Main.hs-  other-modules:       Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG, Phonetic.Languages.Simplified.Lists.DeEnCoding+  other-modules:       Phonetic.Languages.Simplified.Lists.Ukrainian.FuncRep2RelatedG2, Phonetic.Languages.Simplified.Lists.DeEnCoding   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.15, ukrainian-phonetics-basic >=0.3.2 && <1, vector >=0.11 && <0.14, phonetic-languages-simplified-common >=0.3.4 && <1, phonetic-languages-simplified-properties-lists >=0.3 && <1, phonetic-languages-ukrainian >=0.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, uniqueness-periods-vector-stats >=0.1.2 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, phonetic-languages-permutations >= 0.2 && <1, mmsyn2 >= 0.3 && < 1, heaps >= 0.3.6.1 && <1+  build-depends:       base >=4.8 && <4.15, ukrainian-phonetics-basic >=0.4.1 && <1, vector >=0.11 && <0.14, phonetic-languages-simplified-common >=0.4 && <1, phonetic-languages-simplified-properties-lists-double >=0.1 && <1, phonetic-languages-ukrainian >=0.3 && <1, uniqueness-periods-vector-filters >=0.3 && <1, uniqueness-periods-vector-stats >=0.2.1 && <1, parallel >=3.2.0.6 && <4, phonetic-languages-plus >=0.1.1 && <1, subG >= 0.4 && < 1, phonetic-languages-rhythmicity >=0.1.2 && <1, phonetic-languages-permutations >= 0.2 && <1, mmsyn2 >= 0.3 && < 1, heaps >= 0.3.6.1 && <1   ghc-options:         -threaded -rtsopts   hs-source-dirs:      ., GetInfo   default-language:    Haskell2010