ukrainian-phonetics-basic 0.1.1.0 → 0.1.2.0
raw patch · 3 files changed
+15/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Melodics.ByteString.Ukrainian: convertToProperUkrainianX :: String -> Vector Char
Files
- CHANGELOG.md +3/−0
- Melodics/ByteString/Ukrainian.hs +11/−0
- ukrainian-phonetics-basic.cabal +1/−1
CHANGELOG.md view
@@ -8,3 +8,6 @@ * First version revised A. Fixed issue with existence of multi-vowel syllables in the module Languages.Phonetic.Ukrainian.Syllable. .+## 0.1.2.0 -- 2020-10-24++* First version revised B. Added a new function convertToProperUkrainianX to the Melodics.Ukrainian module to get the boxed Vector of Char's.
Melodics/ByteString/Ukrainian.hs view
@@ -16,6 +16,7 @@ module Melodics.ByteString.Ukrainian ( convertToProperUkrainian+ , convertToProperUkrainianX , convertToProperUkrainianB , isUkrainianL , linkFileName@@ -45,6 +46,12 @@ convertToProperUkrainian ys = toVector . correctA . applyChanges . bsToCharUkr . createTuplesByAnalysis . secondConv . filterUkr . changeJotted . filter (\x -> isUkrainianL x || isSpace x || isControl x || isPunctuation x) . map toLower $ ys +-- | Unlike the 'convertToProperUkrainian', it returns a boxed 'VB.Vector' instead of unboxed one 'V.Vector',+-- @ since 0.1.2.0+convertToProperUkrainianX :: String -> VB.Vector Char+convertToProperUkrainianX ys = toVectorB . correctA . applyChanges . bsToCharUkr . createTuplesByAnalysis . secondConv . filterUkr . changeJotted .+ filter (\x -> isUkrainianL x || isSpace x || isControl x || isPunctuation x) . map toLower $ ys+ isUkrainianL :: Char -> Bool isUkrainianL y | (y >= '\1070' && y <= '\1097') = True | otherwise = getBFst' (False, V.fromList . map (\x -> (x, True)) $ "'-\700\1028\1030\1031\1068\1100\1102\1103\1108\1110\1111\1168\1169\8217") y@@ -299,6 +306,10 @@ toVector :: [Char] -> V.Vector Char toVector ts = V.fromList . correctB $ ts {-# INLINE toVector #-}++toVectorB :: [Char] -> VB.Vector Char+toVectorB ts = VB.fromList . correctB $ ts+{-# INLINE toVectorB #-} correctB :: [Char] -> [Char] correctB ys@(x:xs)
ukrainian-phonetics-basic.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: ukrainian-phonetics-basic-version: 0.1.1.0+version: 0.1.2.0 synopsis: A library to work with the basic Ukrainian phonetics and syllable segmentation. description: A library to work with the basic Ukrainian phonetics and syllable segmentation. Rewritten from the mmsyn6ukr and mmsyn7s packages. homepage: https://hackage.haskell.org/package/ukrainian-phonetics-basic