packages feed

ukrainian-phonetics-basic 0.1.2.0 → 0.1.3.0

raw patch · 3 files changed

+19/−7 lines, 3 files

Files

CHANGELOG.md view
@@ -11,3 +11,8 @@ ## 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.++## 0.1.3.0 -- 2020-10-24++* First version revised. Added a new function convertToProperUkrainianS to the module Melodics.ByteString.Ukrainian that is needed in some other cases.+
Melodics/ByteString/Ukrainian.hs view
@@ -15,7 +15,9 @@ {-# LANGUAGE OverloadedStrings #-}  module Melodics.ByteString.Ukrainian (-  convertToProperUkrainian+  -- * Basic functions+  convertToProperUkrainianS+  , convertToProperUkrainian   , convertToProperUkrainianX   , convertToProperUkrainianB   , isUkrainianL@@ -43,14 +45,19 @@ -- | The function that converts a written Ukrainian text into the sounding in the program phonetical respesentation.  -- It is not exact phonetically but you can make for yourself a general impression of the Ukrainian sounding. convertToProperUkrainian :: String -> V.Vector Char-convertToProperUkrainian ys = toVector . correctA . applyChanges . bsToCharUkr . createTuplesByAnalysis . secondConv . filterUkr . changeJotted .-   filter (\x -> isUkrainianL x || isSpace x || isControl x || isPunctuation x) . map toLower $ ys+convertToProperUkrainian ys = toVector . convertToProperUkrainianS $ ys+{-# INLINE convertToProperUkrainian #-}  -- | 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 .+convertToProperUkrainianX ys = toVectorB . convertToProperUkrainianS $ ys+{-# INLINE convertToProperUkrainianX #-}++convertToProperUkrainianS :: String -> String+convertToProperUkrainianS ys = correctB . correctA . applyChanges . bsToCharUkr . createTuplesByAnalysis . secondConv . filterUkr . changeJotted .    filter (\x -> isUkrainianL x || isSpace x || isControl x || isPunctuation x) . map toLower $ ys+{-# INLINE convertToProperUkrainianS #-}     isUkrainianL :: Char -> Bool isUkrainianL y | (y >= '\1070' && y <= '\1097') = True@@ -319,8 +326,8 @@  -- | A variant of the 'convertToProperUkrainian' with the 'B.ByteString' result. convertToProperUkrainianB :: String -> B.ByteString-convertToProperUkrainianB ys = B.pack . correctB . correctA . applyChanges . bsToCharUkr . createTuplesByAnalysis . secondConv . filterUkr . changeJotted .-   filter (\x -> isUkrainianL x || isSpace x || isControl x || isPunctuation x) . map toLower $ ys+convertToProperUkrainianB ys = B.pack . convertToProperUkrainianS $ ys+{-# INLINE convertToProperUkrainianB #-}  linkFileName :: Char -> Char linkFileName x = getBFst' (x,V.fromList . zip "ABCDEFLMabcdefghijklmnopqrstuvwxyz" $ "GILUbc00ABZEHXfDeFMNOPQRdSTVWCaYKJ") x
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.2.0+version:             0.1.3.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