packages feed

phonetic-languages-ukrainian 0.2.1.0 → 0.2.2.0

raw patch · 3 files changed

+12/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -11,4 +11,9 @@ ## 0.2.1.0 -- 2020-09-25  * Second version revised A. Changed the behaviour of the Languages.Phonetic.Ukrainian.PrepareText.splitLines function so that it splits the lines of the arbitrary length (in words) for the further analysis-by the uniqueness-periods-vector series of programs. This is needed also for non-poetic texts processment. +by the uniqueness-periods-vector series of programs. This is needed for non-poetic texts processment.++## 0.2.2.0 -- 2020-09-25++* Second version revised B. Fixed issue with Languages.Phonetic.Ukrainian.PrepareText.splitLines functions in division of the substrings by their length not by their words count (as is required).+
Languages/Phonetic/Ukrainian/PrepareText.hs view
@@ -51,6 +51,8 @@ prepareText = splitLines . map (unwords . concatenated2. auxiliary1 . complexWords . words .          filter (\t -> isAlpha t || isSpC t)) . filter (not . null) . lines +-- | Concatenates complex words in Ukrainian so that they are not separated further by possible words order rearrangements (because they are treated as a single word). This is+-- needed to preserve basic grammar in phonetic languages.  complexWords :: [String] -> [String] complexWords (xs:ys:zs:ts:xss) =  getBFst' (xs:complexWords (ys:zs:ts:xss),V.fromList [("\1074", @@ -113,11 +115,12 @@     then [xs ++ ys ++ zs] else [xs ++ ys,zs])]) xs complexWords xss = xss +-- | Since 0.2.1.0 version the function is recursive and is applied so that all returned elements ('String') are no longer than 7 words in them.  splitLines :: [String] -> [String] splitLines xss   | null xss = []- | otherwise = mapI (\xs -> compare (length . words $ xs) 7 == GT) (\xs -> -     (\(t,z) -> splitLines [t, z]) . splitAt (length xs `quot` 2) $ xs) $ xss+ | otherwise = mapI (\xs -> compare (length . words $ xs) 7 == GT) (\xs -> let yss = words xs in +     splitLines . map unwords . (\(q,r) -> [q,r]) . splitAt (length yss `quot` 2) $ yss) $ xss  auxiliary1 :: [String] -> [String] auxiliary1 (xs:ys:zs:xss) 
phonetic-languages-ukrainian.cabal view
@@ -2,7 +2,7 @@ --  further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-ukrainian-version:             0.2.1.0+version:             0.2.2.0 synopsis:            Prepares Ukrainian text to be used as a phonetic language text description:         Prepares Ukrainian text to be used as a phonetic language text. Applies needed minimal grammar connections so that the text afterwards can be processed by dobutokO-poetry related programs homepage:            https://hackage.haskell.org/package/phonetic-languages-ukrainian