phonetic-languages-ukrainian-array 0.9.0.0 → 0.9.1.0
raw patch · 3 files changed
+17/−7 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- Phonetic/Languages/Ukrainian/PrepareText.hs +11/−6
- phonetic-languages-ukrainian-array.cabal +1/−1
ChangeLog.md view
@@ -65,3 +65,8 @@ * Ninth version. Changed the behaviour of many functions in case of sequences of official parts of language like participles, prepositions etc, so that they are concatenated together with the next word. This is not always suitable, but is sensible in many cases and allows to preserve more meaning.++## 0.9.1.0 -- 2022-01-14++* Ninth version revised A. Taken into account some more complex participle usage situations, though still not all possible.+Some rather uncommon (rarely used) options are still not properly converted.
Phonetic/Languages/Ukrainian/PrepareText.hs view
@@ -170,10 +170,14 @@ -- | 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 . participleConc . auxiliary1 . complexWords . words . filter (\t -> isAlpha t || isSpC t)) . filter (not . null) . lines participleConc :: [String] -> [String]+participleConc xss@(xs:ys:zs:yss)+ | isParticipleAppended ys = if isParticipleAppended zs then (xs `mappend` ys `mappend` zs):participleConc yss+ else (xs `mappend` ys):participleConc (zs:yss)+ | otherwise = xs:participleConc (ys:zs:yss) participleConc xss@(xs:ys:yss) | ys `elem` ["\1073","\1073\1060","\1078\1077","\1078"] = (xs `mappend` ys):participleConc yss | otherwise = xs:participleConc (ys:yss)@@ -192,12 +196,13 @@ jottedCnv xs = drop 1 . jottedConv $ ' ':xs auxiliary1 :: [String] -> [String]-auxiliary1 yss@(xs:xss)- | isPrepended xs = concatMap jottedCnv (tss `mappend` wss):auxiliary1 vss- | otherwise = xs:auxiliary1 xss- where (tss,uss) = break (not . isPrepended) yss+auxiliary1 yss@(xs:zs:xss)+ | isParticipleAppended xs && not (isPrepended zs) = xs:zs:auxiliary1 xss+ | isPreposition xs || isConcatenated xs = concatMap jottedCnv (tss `mappend` wss):auxiliary1 vss+ | otherwise = xs:auxiliary1 (zs:xss)+ where (tss,uss) = span isPrepended yss (wss,vss) = splitAt 1 uss-auxiliary1 _ = []+auxiliary1 xss = xss isPreposition :: String -> Bool isPreposition ts =
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.9.0.0+version: 0.9.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