phonetic-languages-ukrainian-array 0.8.0.0 → 0.8.1.0
raw patch · 4 files changed
+17/−6 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Phonetic.Languages.Ukrainian.PrepareText: participleConc :: [String] -> [String]
Files
- ChangeLog.md +5/−0
- LICENSE +1/−1
- Phonetic/Languages/Ukrainian/PrepareText.hs +8/−2
- phonetic-languages-ukrainian-array.cabal +3/−3
ChangeLog.md view
@@ -50,3 +50,8 @@ ## 0.8.0.0 -- 2021-10-31 * Eigth version. Switched back to the CaseBi.Arr.getBFstLSorted' functionality.++## 0.8.1.0 -- 2022-01-13++* Eigth version revised A. Changed the behaviour of the participles "б" / "ж" so that now they by default are appended to the+previous word, if any. Added for this a new function participleConc.
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020-2021 OleksandrZhabenko+Copyright (c) 2020-2022 OleksandrZhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Phonetic/Languages/Ukrainian/PrepareText.hs view
@@ -24,6 +24,7 @@ module Phonetic.Languages.Ukrainian.PrepareText ( -- * Basic functions complexWords+ , participleConc , splitLines , splitLinesN , auxiliary1@@ -127,7 +128,7 @@ else auxiliary4 wwss), ("\1093\1086\1095\1072", if ys == "\1073" then auxiliary3 wwss else auxiliary4 wwss)]) xs complexWords [xs,ys]- | ys == "\1073" || ys == "\1073\1060" = [xs ++ ys]+ | ys `elem` ["\1073","\1073\1060","\1078\1077","\1078"] = [xs ++ ys] | xs == "\1076\1072\1088\1084\1072" && ys == "\1097\1086" = [xs ++ ys] | otherwise = [xs,ys] complexWords xss = xss@@ -165,8 +166,13 @@ -- | A generalized variant of the 'prepareText' with the arbitrary maximum number of the words in the lines given as the first argument. prepareTextN :: Int -> String -> [String] prepareTextN n = filter (any isUkrainianL) . splitLinesN n .- map (unwords . concatenated2. auxiliary1 . complexWords . words . filter (\t -> isAlpha t || isSpC t)) .+ map (unwords . concatenated2. auxiliary1 . participleConc . complexWords . words . filter (\t -> isAlpha t || isSpC t)) . filter (not . null) . lines++participleConc :: [String] -> [String]+participleConc xss@(xs:ys:yss)+ | ys `elem` ["\1073","\1073\1060","\1078\1077","\1078"] = (xs ++ ys):participleConc yss+ | otherwise = xs:participleConc (ys:yss) auxiliary1 :: [String] -> [String] auxiliary1 (xs:ys:zs:xss)
phonetic-languages-ukrainian-array.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: phonetic-languages-ukrainian-array-version: 0.8.0.0+version: 0.8.1.0 synopsis: Prepares Ukrainian text to be used as a phonetic language text description: Applies needed minimal grammar connections so that the text afterwards can be processed by dobutokO-poetry or phonetic languages approach related programs. Uses arrays instead of vectors. Besides can be used to reverse many of the done concatenations. homepage: https://hackage.haskell.org/package/phonetic-languages-ukrainian-array@@ -20,7 +20,7 @@ exposed-modules: Phonetic.Languages.Ukrainian.PrepareText, Ukrainian.ReverseConcatenations -- other-modules: other-extensions: CPP, BangPatterns- build-depends: base >=4.8 && <4.16, mmsyn2-array >=0.3 && <1, mmsyn5 >=0.5 && <1+ build-depends: base >=4.8 && <5, mmsyn2-array >=0.3 && <1, mmsyn5 >=0.5 && <1 -- hs-source-dirs: default-language: Haskell2010 @@ -28,7 +28,7 @@ main-is: Main.hs other-modules: Ukrainian.ReverseConcatenations other-extensions: CPP, BangPatterns- build-depends: base >=4.8 && <4.16, mmsyn2-array >= 0.3 && <1, mmsyn5 >=0.5 && <1+ build-depends: base >=4.8 && <5, mmsyn2-array >= 0.3 && <1, mmsyn5 >=0.5 && <1 ghc-options: -threaded -rtsopts hs-source-dirs: ., Ukrainian default-language: Haskell2010