phonetic-languages-ukrainian-array 0.5.0.0 → 0.6.0.0
raw patch · 3 files changed
+35/−1 lines, 3 files
Files
- ChangeLog.md +4/−0
- Phonetic/Languages/Ukrainian/PrepareText.hs +30/−0
- phonetic-languages-ukrainian-array.cabal +1/−1
ChangeLog.md view
@@ -33,3 +33,7 @@ * Fifth version. Added more reverse concatenations variants to the module Ukrainian.ReverseConcatenations. Introduced additional first argument to specify whether to use just almost 'safe' reverse concatenations (the default one) or also some 'risky' ones where you can obtain splitted normal words.++## 0.6.0.0 -- 2021-09-04++* Sixth version. Added new 'tuned' functions. Exported now also the isUkrainianL function.
Phonetic/Languages/Ukrainian/PrepareText.hs view
@@ -30,6 +30,7 @@ , isPreposition , isConcatenated , isSpC+ , isUkrainianL , concatenated2 , jottedConv -- * The end-user functions@@ -37,6 +38,8 @@ , prepareTextN , growLinesN , prepareGrowTextMN+ , tuneLinesN+ , prepareTuneTextMN -- * Used to transform after convertToProperUkrainian from mmsyn6ukr package , aux4 ) where@@ -318,3 +321,30 @@ -> [String] prepareGrowTextMN m n = growLinesN m . prepareTextN n {-# 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 Ukrainian 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 number of the words or their concatenations in the resulting list of 'String's (except probably the last one).+ -> 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+ -> [String]+prepareTuneTextMN m n = tuneLinesN m . prepareTextN n+{-# INLINE prepareTuneTextMN #-}
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.5.0.0+version: 0.6.0.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