packages feed

phonetic-languages-simplified-examples-common 0.1.1.0 → 0.1.2.0

raw patch · 3 files changed

+20/−18 lines, 3 filesdep −subGdep ~basedep ~phonetic-languages-ukrainian-arrayPVP ok

version bump matches the API change (PVP)

Dependencies removed: subG

Dependency ranges changed: base, phonetic-languages-ukrainian-array

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -7,3 +7,10 @@ ## 0.1.1.0 -- 2021-01-20  * First version revised A. Removed unneeded dependency of phonetic-languages-simplified-common (and hidden dependencies vector-related).++## 0.1.2.0 -- 2021-08-31++* First version revised B. Some code improvemts. Updated the dependency boundaries +to include recent improvements and fixes. Removed subG from the dependencies as +it is not needed now.+
Phonetic/Languages/Common.hs view
@@ -17,28 +17,23 @@   , fLinesIO ) where -import Data.SubG (subG) import Melodics.ByteString.Ukrainian.Arr (isUkrainianL) import Phonetic.Languages.Ukrainian.PrepareText-import Data.Char (isAlpha)-+import Data.Char (isAlpha,isSpace)+import Data.Monoid (mappend)  fLines :: Int -> String -> [String]-fLines !toOneLine ys =-  let preText = filter (any (\x -> isUkrainianL x && isAlpha x)) . prepareText . (\z -> if toOneLine == 1 then unwords . words $ z else z) $ ys-      wss = map (length . subG " 01-") preText-        in helpG2 preText wss--helpG2 (t:ts) (r:rs)- | r > 7 = filter (`notElem` "01-") t:helpG2 ts rs- | otherwise = t:helpG2 ts rs-helpG2 _ _ = []+fLines !toOneLine ys = filter (any (\x -> isUkrainianL x && isAlpha x)) . prepareText .+  (\z -> if toOneLine == 1 then unls z else z) $ ys+   -- the 'unls' is taken from the 'Data.List.words' and rewritten to be equal to 'unwords' . 'words'+   where unls s  =  case dropWhile isSpace s of+                      "" -> []+                      s' -> w `mappend` (' ' : unls s'')+                        where (w, s'') = break isSpace s'  fLinesIO :: String -> IO ()-fLinesIO ys =-  let preText = filter (any (\x -> isUkrainianL x && isAlpha x)) . prepareText $ ys-      wss = map (length . subG " 01-") preText-        in mapM_ putStrLn . map (\(i,x) -> show (i + 1) ++ "\t" ++ x) . helpG3 . indexedL "" . helpG2 preText $ wss+fLinesIO ys = mapM_ putStrLn . map (\(i,x) -> show (i + 1) ++ "\t" ++ x) . helpG3 . indexedL "" .+   filter (any (\x -> isUkrainianL x && isAlpha x)) . prepareText $ ys  -- | Is taken mostly from the Phonetic.Languages.Simplified.Lists.UniquenessPeriodsG module from the @phonetic-languages-simplified-common@ package. indexedL :: Foldable t => b -> t b -> [(Int, b)]
phonetic-languages-simplified-examples-common.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-examples-common-version:             0.1.1.0+version:             0.1.2.0 synopsis:            Some commonly used by phonetic-languages-simplified* series functions. description:         Are intended to be used by the phonetic-languages-simplified-lists-examples and phonetic-languages-simplified-examples-array packages. homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-examples-common@@ -20,6 +20,6 @@   exposed-modules:     Phonetic.Languages.Simplified.DeEnCoding, Phonetic.Languages.Simplified.SimpleConstraints, Phonetic.Languages.Common   -- other-modules:   other-extensions:    BangPatterns-  build-depends:       base >=4.8 && <4.15, mmsyn2-array >=0.1.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, heaps >= 0.3.6.1 && <1, subG >=0.4.2 && <1, phonetic-languages-ukrainian-array >=0.1 && <1, ukrainian-phonetics-basic-array >=0.1.1 && <1+  build-depends:       base >=4.8 && <4.16, mmsyn2-array >=0.1.1 && <1, phonetic-languages-constraints-array >=0.1 && <1, heaps >= 0.3.6.1 && <1, phonetic-languages-ukrainian-array >=0.3.1 && <1, ukrainian-phonetics-basic-array >=0.1.1 && <1   -- hs-source-dirs:   default-language:    Haskell2010