packages feed

phonetic-languages-phonetics-basics 0.8.3.0 → 0.8.4.0

raw patch · 3 files changed

+36/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Phonetic.Languages.PrepareText: prepareTuneTextMN :: Int -> Int -> [[String]] -> String -> String -> [String]
+ Data.Phonetic.Languages.PrepareText: tuneLinesN :: Int -> [String] -> [String]

Files

ChangeLog.md view
@@ -108,3 +108,7 @@ ## 0.8.3.0 -- 2021-08-31  * Eigth version revised C. Fixed issue with splitLinesN function.++## 0.8.4.0 -- 2021-09-04++* Eigth version revised D. Added new 'tuned' functions to the Data.Phonetic.Languages.PrepareText module.
Data/Phonetic/Languages/PrepareText.hs view
@@ -40,6 +40,8 @@   , prepareTextN   , growLinesN   , prepareGrowTextMN+  , tuneLinesN+  , prepareTuneTextMN   -- * Used to transform after convertToProperphonetic language from mmsyn6ukr package   , isPLL ) where@@ -179,3 +181,32 @@  -> [String] prepareGrowTextMN m n ysss xs = growLinesN m . prepareTextN n ysss xs {-# INLINE prepareGrowTextMN #-}++-------------------------------------++{-| @ since 0.6.0.0+Recursively splits the concatenated list of lines of words so that in every resulting 'String' in the list+except the last one there is just 'Int' -- the first argument -- words.+-}+tuneLinesN :: Int -> [String] -> [String]+tuneLinesN n xss+ | null xss || n < 0 = []+ | otherwise =+    let wss = words . unwords $ xss+        (yss,zss) = splitAt n wss+          in unwords yss : tuneLinesN n zss++{-| @ since 0.6.0.0+The function combines the 'prepareTextN' and 'tuneLinesN' functions. Applies needed phonetic language preparations+to the phonetic language text and splits the list of 'String's so that the number of the words in each of them (except the last one)+is equal the given first 'Int' number.+-}+prepareTuneTextMN+  :: Int -- ^ A maximum number of the words or their concatenations in the resulting list of 'String's.+  -> Int -- ^ A number of words in every 'String' that the function firstly forms. To have some sense of usage, must be less than the first argument.+  -> [[String]] -- ^ Is intended to become a valid 'Concatenations'.+  -> String -- ^ A sorted 'String' of possible characters in the phonetic language representation.+  -> String+  -> [String]+prepareTuneTextMN m n ysss xs = tuneLinesN m . prepareTextN n ysss xs+{-# INLINE prepareTuneTextMN #-}
phonetic-languages-phonetics-basics.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-phonetics-basics-version:             0.8.3.0+version:             0.8.4.0 synopsis:            A library for working with generalized phonetic languages usage. description:         There already exists a Ukrainian implementation for the phonetic languages approach published at: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array. It is optimized for the Ukrainian only and needs to be rewritten for every new language mostly from scratch using it as a template. To avoid this boilerplate, this one is provided. It can be used for different languages and even for music or other fields. Now it combines the functionality of the @r-glpk-phonetic-languages-ukrainian-durations@ and @phonetic-languages-ukrainian-array@ and some dependencies of the mentioned one. homepage:            https://hackage.haskell.org/package/phonetic-languages-phonetics-basics