packages feed

phonetic-languages-ukrainian-array 0.10.0.0 → 0.12.2.0

raw patch · 7 files changed

Files

ChangeLog.md view
@@ -83,3 +83,19 @@  * Tenth version. Switched to NoImplicitPrelude extension. Updated the metadata and dependencies boundaries. +## 0.11.0.0 -- 2023-10-01++* Eleventh version. Added new generalized functions to prepare text. Added README.md file. ++## 0.12.0.0 -- 2023-11-16++* Twelfth version. Changed the prepareTextN2 function so that also '=' is not filtered out.++## 0.12.1.0 -- 2023-11-16++* Twelfth version revised A. Downgraded the prepareTextN2 function so that it is like in the 0.11.0.0 version and introduced the function prepareTextN3 with '=' is being not filtered out.++## 0.12.2.0 -- 2024-02-22++* Twelfth version revised B. Changed dependency to intermediate-structures instead of mmsyn5. Added Git repository with bug-tracker. Some changes in README.md. +
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020-2023 Oleksandr Zhabenko+Copyright (c) 2020-2024 Oleksandr Zhabenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Main.hs view
@@ -1,6 +1,6 @@ -- | -- Module      :  Main--- Copyright   :  (c) OleksandrZhabenko 2021-2023+-- Copyright   :  (c) OleksandrZhabenko 2021-2024 -- License     :  MIT -- Stability   :  Experimental -- Maintainer  :  oleksandr.zhabenko@yahoo.com
Phladiprelio/Ukrainian/PrepareText.hs view
@@ -1,16 +1,14 @@ -- | -- Module      :  Phladiprelio.Ukrainian.PrepareText--- Copyright   :  (c) OleksandrZhabenko 2020-2023+-- Copyright   :  (c) OleksandrZhabenko 2020-2024 -- License     :  MIT -- Stability   :  Experimental -- Maintainer  :  oleksandr.zhabenko@yahoo.com ----- Helps to order the 7 or less Ukrainian words (or their concatenations)--- to obtain (to some extent) suitable for poetry or music text. -- Earlier it has been a module DobutokO.Poetry.Ukrainian.PrepareText -- from the @dobutokO-poetry@ package. -- In particular, this module can be used to prepare the Ukrainian text--- by applying the most needed grammar to avoid misunderstanding+-- by applying the most needed grammar for PhLADiPreLiO to avoid misunderstanding -- for the produced text. The attention is paid to the prepositions, pronouns, conjunctions -- and particles that are most commonly connected (or not) in a significant way -- with the next text.@@ -43,10 +41,15 @@   -- * The end-user functions   , prepareText   , prepareTextN+  , prepareTextN2+  , prepareTextN3+  , prepareTextNG   , growLinesN   , prepareGrowTextMN+  , prepareGrowTextMNG   , tuneLinesN   , prepareTuneTextMN+  , prepareTuneTextMNG   -- * Used to transform after convertToProperUkrainian from mmsyn6ukr package   , aux4 ) where@@ -55,8 +58,8 @@ import GHC.Base import Data.List import CaseBi.Arr (getBFstLSorted')-import Data.List.InnToOut.Basic (mapI)-import Data.Char (isAlpha,toLower)+import Data.IntermediateStructures1 (mapI)+import Data.Char (isAlpha,toLower,isDigit) import GHC.Arr import GHC.Num ((+)) @@ -174,9 +177,29 @@  -- | A generalized variant of the 'prepareText' with the arbitrary maximum number of the words in the lines given as the first argument. prepareTextN :: Int -> String -> [String]-prepareTextN n = filter (any isUkrainianL) . splitLinesN n .-  map (unwords . concatenated2 . participleConc . auxiliary1 . complexWords . words . filter (\t -> isAlpha t || isSpC t)) .+prepareTextN = prepareTextNG (\t -> isAlpha t || isSpC t) +{-# INLINE prepareTextN #-}++-- | A generalized variant of the 'prepareText' with the arbitrary maximum number of the words in the lines given as the first argument. The \'_\' is not filtered out.+prepareTextN2 :: Int -> String -> [String]+prepareTextN2 = prepareTextNG (\t -> isAlpha t || isSpC t || t == '_' || isDigit t) +{-# INLINE prepareTextN2 #-}++-- | A generalized variant of the 'prepareText' with the arbitrary maximum number of the words in the lines given as the first argument. Both \'_\' and \'=\' are not filtered out.+prepareTextN3 :: Int -> String -> [String]+prepareTextN3 = prepareTextNG (\t -> isAlpha t || isSpC t || t == '_' || t == '=' || isDigit t) +{-# INLINE prepareTextN3 #-}++-- | An even more generalized variant of the 'prepareTextN' with the arbitrary maximum number of the words in the lines given as the second argument and the possibility to provide custom function for filtering.+prepareTextNG +  :: (Char -> Bool) -- ^ A predicate to filter the symbols during preparation.+  -> Int +  -> String +  -> [String]+prepareTextNG f n = filter (any isUkrainianL) . splitLinesN n .+  map (unwords . concatenated2 . participleConc . auxiliary1 . complexWords . words . filter f) .        filter (not . null) . lines+{-# INLINE prepareTextNG #-}  participleConc :: [String] -> [String] participleConc (xs:ys:zs:yss)@@ -317,7 +340,7 @@   | xs == "\1076\1079" = 'z'   | xs == "\1089\1100" = 's'   | xs == "\1094\1100" = 'c'-  | null xs = error "Phonetic.Languages.Ukrainian.PrepareText.aux4: Empty String. "+  | null xs = error "Phladiprelio.Ukrainian.PrepareText.aux4: Empty String. "   | otherwise = head xs  -- | Is taken from the @mmsyn6ukr@ package version 0.8.1.0 so that the amount of dependencies are reduced (and was slightly modified).@@ -352,6 +375,18 @@ prepareGrowTextMN m n = growLinesN m . prepareTextN n {-# INLINE prepareGrowTextMN #-} +{-| @ since 0.11.0.0+The generalized version of the 'prepareGrowTextMN' with additional possibility to provide custom function for symbols filtering inside.+-}+prepareGrowTextMNG+  :: (Char -> Bool) -- ^ A predicate to filter the symbols during preparation.+  -> 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+  -> [String]+prepareGrowTextMNG f m n = growLinesN m . prepareTextNG f n+{-# INLINE prepareGrowTextMNG #-}+ -------------------------------------  {-| @ since 0.6.0.0@@ -378,3 +413,16 @@   -> [String] prepareTuneTextMN m n = tuneLinesN m . prepareTextN n {-# INLINE prepareTuneTextMN #-}++{-| @ since 0.11.0.0+The generalized version of the 'prepareTuneTextMN' with additional possibility to provide custom function for symbols filtering inside.+-}+prepareTuneTextMNG+  :: (Char -> Bool) -- ^ A predicate to filter the symbols during preparation.+  -> 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]+prepareTuneTextMNG f m n = tuneLinesN m . prepareTextNG f n+{-# INLINE prepareTuneTextMNG #-}+
Phladiprelio/Ukrainian/ReverseConcatenations.hs view
@@ -1,6 +1,6 @@ -- | -- Module      :  Phladiprelio.Ukrainian.ReverseConcatenations--- Copyright   :  (c) OleksandrZhabenko 2020-2023+-- Copyright   :  (c) OleksandrZhabenko 2020-2024 -- License     :  MIT -- Stability   :  Experimental -- Maintainer  :  oleksandr.zhabenko@yahoo.com@@ -19,7 +19,7 @@ import GHC.Base import Data.List  import CaseBi.Arr (getBFstLSorted')-import Data.List.InnToOut.Basic (mapI)+import Data.IntermediateStructures1 (mapI)  {-| Reverses many phonetic languages approach related concatenations for the Ukrainian text. Is intended to be used with the text on several lines. -}
+ README.md view
@@ -0,0 +1,24 @@+ Devotion+ ========++The author would like to devote this project to support the [Foundation Gastrostars](https://gastrostars.nl).++On the 01/10/2023 there are International Music Day and [André's Rieu](https://www.andrerieu.com/en) Birthday. So the version 0.11.0.0 is+additionally devoted to him as well as to the Kok family — [Emma](https://emmakok.nl) and [Enzo](https://enzokok.nl) are amazing and fantastic musicians, Vico+works with PhilZuid, Sophie sings in the classical manner. Nathalie Kok with love to her family and +appreciation for André's Rieu support also celebrates the Day. In Ukraine this day has several +important celebrations — Intercession of the Holy Theotokos (Pokrova), Cossacks' Day, Day of Defenders of Ukraine (especially relevant during the Russian war against Ukraine).++On the 21/02/2024 there is an International Mother Tongue Day — that is Ukrainian for the author of the package. ++All support is welcome, including donations for the needs of the Ukrainian army, IDPs and refugees. ++If you would like to share some financial support with the Foundation Gastrostars, please, contact the mentioned foundation+using the URL:++[Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or ++[Donation Page](https://gastrostars.nl/doneren)+
phonetic-languages-ukrainian-array.cabal view
@@ -2,25 +2,26 @@ --  further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-ukrainian-array-version:             0.10.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.+version:             0.12.2.0+synopsis:            Prepares Ukrainian text to be used as a PhLADiPreLiO text+description:         Applies needed minimal grammar connections so that the text afterwards can be processed PhLADiPreLiO related programs. Besides can be used to reverse many of the done concatenations. homepage:            https://hackage.haskell.org/package/phonetic-languages-ukrainian-array+bug-reports:         https://github.com/Oleksandr-Zhabenko/phonetic-languages-ukrainian-array/issues license:             MIT license-file:        LICENSE-author:              OleksandrZhabenko+author:              Oleksandr Zhabenko maintainer:          oleksandr.zhabenko@yahoo.com copyright:           Oleksandr Zhabenko category:            Language,Game build-type:          Simple-extra-source-files:  ChangeLog.md+extra-source-files:  ChangeLog.md, README.md cabal-version:       >=1.10  library   exposed-modules:     Phladiprelio.Ukrainian.PrepareText, Phladiprelio.Ukrainian.ReverseConcatenations   -- other-modules:   other-extensions:    BangPatterns, NoImplicitPrelude-  build-depends:       base >=4.13 && <5, mmsyn2-array ==0.3.1.1, mmsyn5 ==0.6.0.0+  build-depends:       base >=4.13 && <5, mmsyn2-array ==0.3.1.1, intermediate-structures == 0.1.1.0   -- hs-source-dirs:   default-language:    Haskell2010 @@ -28,7 +29,7 @@   main-is:             Main.hs   other-modules:       Phladiprelio.Ukrainian.ReverseConcatenations   other-extensions:    BangPatterns, NoImplicitPrelude-  build-depends:       base >=4.13 && <5, mmsyn2-array ==0.3.1.1, mmsyn5 ==0.6.0.0+  build-depends:       base >=4.13 && <5, mmsyn2-array ==0.3.1.1, intermediate-structures == 0.1.1.0   ghc-options:         -threaded -rtsopts --  hs-source-dirs:         default-language:    Haskell2010