packages feed

phonetic-languages-ukrainian 0.1.0.0 → 0.2.0.0

raw patch · 3 files changed

+44/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Languages.Phonetic.Ukrainian.PrepareText: aux0 :: Vector String -> Vector Char
+ Languages.Phonetic.Ukrainian.PrepareText: aux4 :: String -> Char

Files

ChangeLog.md view
@@ -3,3 +3,7 @@ ## 0.1.0.0 -- 2020-09-07  * First version. Released on an unsuspecting world.++## 0.2.0.0 -- 2020-09-09++* Second version. Added new functions aux4 and aux0 to be used after convertToProperUkrainian from the Melodics.Ukrainian module from the mmsyn6ukr package.
Languages/Phonetic/Ukrainian/PrepareText.hs view
@@ -20,7 +20,21 @@ -- https://uk.wikipedia.org/wiki/%D0%A7%D0%B0%D1%81%D1%82%D0%BA%D0%B0_(%D0%BC%D0%BE%D0%B2%D0%BE%D0%B7%D0%BD%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D0%BE) --  -module Languages.Phonetic.Ukrainian.PrepareText where+module Languages.Phonetic.Ukrainian.PrepareText (+  -- * Basic functions+  prepareText+  , complexWords+  , splitLines+  , auxiliary1+  , isPreposition+  , isConcatenated+  , isSpC+  , concatenated2+  , jottedConv+  -- * Used to transform after convertToProperUkrainian from mmsyn6ukr package+  , aux4+  , aux0+) where  import CaseBi (getBFst') import Data.List.InnToOut.Basic (mapI)@@ -216,3 +230,27 @@       ('\1111', '\1081':'\1110':jottedConv xs)]) y)   | otherwise = x:jottedConv (y:xs) jottedConv xs = xs++-- | Can be used to prepare the text after 'convertToProperUkrainian' from 'Melodics.Ukrainian' module from @mmsyn6ukr@ package so that all the 'String' can +-- be represented as unique 'Char'. +aux4 :: String -> Char+aux4 xs +  | xs == "\1076\1078" = 'j'+  | xs == "\1076\1079" = 'z'+  | xs == "\1089\1100" = 's'+  | xs == "\1094\1100" = 'c'+  | null xs = error "Languages.Phonetic.Ukrainian.PrepareText.aux4: Empty String. "+  | otherwise = head xs+  +-- | Can be used to prepare the text after 'convertToProperUkrainian' from 'Melodics.Ukrainian' module from @mmsyn6ukr@ package so that all the 'String' can +-- be represented as unique 'Char'. Afterwards, all the palatalized or semi-palatalized sounds are represented just the same as not palatalized ones. +aux0 :: V.Vector String -> V.Vector Char+aux0 v +  | V.null v = V.empty+  | otherwise = V.map head . V.filter (not. null) . V.map (\xs -> +     case xs of +      "\1089\1100" -> "\1089"+      "\1094\1100" -> "\1094"+      "\1076\1078" -> "j"+      "\1076\1079" -> "z"+      _            -> xs) . V.filter (/= "\1100") $ v
phonetic-languages-ukrainian.cabal view
@@ -2,7 +2,7 @@ --  further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-ukrainian-version:             0.1.0.0+version:             0.2.0.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