phladiprelio-ukrainian-simple 0.10.0.0 → 0.11.0.0
raw patch · 5 files changed
+35/−12 lines, 5 filesdep +phladiprelio-general-datatypedep ~phonetic-languages-ukrainian-arraydep ~rhythmic-sequencesPVP ok
version bump matches the API change (PVP)
Dependencies added: phladiprelio-general-datatype
Dependency ranges changed: phonetic-languages-ukrainian-array, rhythmic-sequences
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−0
- Main.hs +9/−1
- Phladiprelio/Ukrainian/IO.hs +7/−7
- README.md +9/−1
- phladiprelio-ukrainian-simple.cabal +3/−3
CHANGELOG.md view
@@ -141,3 +141,10 @@ command line arguments. Moved the shared with phladiprelio-general-simple code to the new package phladiprelio-tests to reduce code duplication. Updated the dependencies. +## 0.11.0.0 -- 2023-10-01++* Eleventh version. Added the "music" mode of processment that allows to create better lyrics and+ music. Some documentation improvements. Updated the dependencies. Now the text does not filter out the+underscores and digits. Nevertheless, they are treated only in the music mode as really meaningful+symbols, otherwise, they are treated as spaces.+
Main.hs view
@@ -71,7 +71,7 @@ | null filedata = ("",-1) | length filedata == 2 = (head filedata, fromMaybe 0 (readMaybe (last filedata)::Maybe Int)) | otherwise = (head filedata,0)- ll = take maxNumWords . (if prepare then id else words . mconcat . prepareText . unwords) $ arg3s+ ll = take maxNumWords . (if prepare then id else words . mconcat . prepareTextN2 maxNumWords . unwords) $ arg3s l = length ll argCs = catMaybes (fmap (readMaybeECG l) -- . (showB l lstW2:) . getC "+a" $ argsC)@@ -125,6 +125,14 @@ putStrLn "+x \t— If specified with the further natural number then means that instead of maximum 7 words or their concatenations that can be analysed together as a line there will be taken the specified number here or 9 if the number is greater than 8. More words leads to more computations, therefore, please, use with this caution in mind. It can be useful mostly for the cases with the additional constraints specified (+a ... -a or +b ... -b groups, see above)." putStrLn "" putStrLn "+m \t— If present followed with two arguments — the name of the file to be used for reading data for multiline processment and the second one — the number of line to be processed. The numeration of the lines in the file for the phladiprelioUkr program here starts from 1 (so, it is: 1, 2, 3, 4,.. etc). The program then uses instead of text the specified line from the file specified here and prints information about its previous and next lines (if available)."+ putStrLn ""+ putStrLn "You can also use the \"music\" mode, which allows you to write better lyrics and music. To do this, you can add a record of the form _{set of digits} to a word or between syllables, and this set of digits will be converted to a positive double-precision number by the program so that the first digit in the record is a whole number and the rest is a fraction (mantissa). Then this number will be multiplied by the duration of the syllable to which this insertion refers, and the resulting number will be placed among the others in the place where this entry is inserted. This allows you to change rhythmic structures, and interpret this insert as a musical pause or, conversely, a musical phrase inserted to change the rhythm. What syllable does this insertion refer to? If it's at the beginning of a line, it refers to the first syllable in the line (which comes after the insertion). If it comes after a syllable, it refers to that syllable. There can be several such inserts, their number is not limited by the program itself (in the program code), but a significant number of inserts can significantly increase the duration of the calculation."+ putStrLn ""+ putStrLn "When the results of the program are displayed on the screen, these inserts will also be displayed in the appropriate places."+ putStrLn ""+ putStrLn "If you specify _1, _10, _100, _1000, etc. as such an insertion, the program will assume that this insertion duration is equal to the duration of the syllable to which it refers. If the set of digits is preceded by a 0, the insertion has a shorter duration, if the 1 in the first 4 examples above is followed by digits other than 0, or if another digit is used instead of 1 or 0, the insertion has a longer duration. For example, _05 means exactly half the duration of the syllable, and _2 means double the duration."+ putStrLn ""+ putStrLn "For the \"music\" mode the number of syllables printed for the line does not include the inserts. So the property value can be greater than this number." putStrLn "" else generalF (prestr, poststr) lineNmb fileDu numTest hc grpp sylD descending hashStep emptyline splitting (filesave, codesave) concurrently (unwords arg3s) variants1 >> return ()
Phladiprelio/Ukrainian/IO.hs view
@@ -9,7 +9,7 @@ import GHC.Enum (fromEnum,toEnum) import Text.Show (Show(..)) import Text.Read (readMaybe)-import Data.Char (isDigit)+import Data.Char (isDigit, isAlpha) import System.IO (putStrLn, FilePath,stdout,hSetNewlineMode,universalNewlineMode,getLine,appendFile,print) import Rhythmicity.MarkerSeqs hiding (id) import Data.List hiding (foldr)@@ -27,6 +27,7 @@ import Data.ReversedScientific import Control.Concurrent.Async (mapConcurrently) import Phladiprelio.Tests+import Phladiprelio.General.Datatype (readBasic3, readBasic4, readBasic1G) generalF :: (String, String) -- ^ If the next element is not equal to -1, then the prepending and appending lines to be displayed. Used basically for working with the multiline textual input data.@@ -49,9 +50,8 @@ syllableDurationsDs <- readSyllableDurations file let syllN = countSyll initstr -- universalSet = map unwords . permutations . words $ rs- f syllableDurationsDs grps mxms = sum . countHashes2G hashStep hc grps mxms . mconcat . - (if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} - else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS+ f syllableDurationsDs grps mxms = sum . countHashes2G hashStep hc grps mxms . readBasic3 ((if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} + else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS) (mconcat) hSetNewlineMode stdout universalNewlineMode if numTest >= 0 && numTest <= 179 && numTest /= 1 then do putStrLn "Feet Val Stat Proxim" @@ -88,8 +88,9 @@ sylls = createSyllablesUkrS textP if code >= 10 && code <= 19 && grps == 2 then do- let structData = (if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 -> syllableDurationsD3; 4 -> syllableDurationsD4} else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS . (\(S _ _ ts) -> ts) $ lineOption- (breaks,rs) = showZerosFor2Period structData syllN (showS8) sylls+ let qqs = readBasic4 ((if null file then case k of { 1 -> syllableDurationsD; 2 -> syllableDurationsD2; 3 ->+ syllableDurationsD3; 4 -> syllableDurationsD4} else if length syllableDurationsDs >= k then syllableDurationsDs !! (k - 1) else syllableDurationsD2) . createSyllablesUkrS) (mconcat) (mconcat . createSyllablesUkrS) (map showFS) . readBasic1G $ textP + (breaks, rs) = showZerosFor2PeriodMusic qqs putStrLn textP putStrLn breaks putStrLn . show $ rs@@ -142,5 +143,4 @@ if isNothing num || num > Just l1 || num == Just 0 then parseLineNumber l1 else return . fromJust $ num-
README.md view
@@ -1,6 +1,6 @@ The executable is the new implementation of the ideas related to PhLADiPreLiO (Phonetic Languages Approach to Discovering the Preferred Line Options) for Ukrainian language. It uses hashes and-has at the moment (as of the version 0.9.0.1) not the full functionality. The previous implementation +has at the moment (as of the version 0.11.0.0) not the full functionality. The previous implementation and its documentation are at the links: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array@@ -36,6 +36,9 @@ https://www.facebook.com/100012184148486/posts/1767318773684244 +Three videos with examples of the usage of the new music mode are by the following link:+https://www.facebook.com/Oleksandr.S.Zhabenko/posts/pfbid02Vtcxuo5d73ZqsmgbxoRxLJoxLLmfpZ5B4VB9g7AQzuVTnydLHVtGRD48Q8RWLy2dl+ Examples of the new functionality in the version 0.5.1.1 are in the videos: https://www.facebook.com/Oleksandr.S.Zhabenko/posts/pfbid033gzq8MCRQsm65mPrzJL25MZNgvW7mezQSywULiVMnqmTBMtSW2jW4ABh6HVMWZNLl@@ -86,6 +89,11 @@ Therefore, the release versions 0.9.0.0 and 0.9.0.1 are devoted to Vico. The version 0.10.0.0 is devoted to [Enzo Kok](https://enzokok.nl) whose Birthday is on the 14th of August.++On the 01/10/2023 there are World Music Day and André's Rieu Birthday. So the version 0.3.0.0 is+additionally devoted to him as well as to the Kok family — Emma and Enzo 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. If you would like to share some financial support, please, contact the mentioned foundation using the URL:
phladiprelio-ukrainian-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: phladiprelio-ukrainian-simple-version: 0.10.0.0+version: 0.11.0.0 -- A short (one-line) description of the package. synopsis: A PhLADiPreLiO implementation for Ukrainian that uses hashes and asynchronous concurrency.@@ -28,7 +28,7 @@ -- LANGUAGE extensions used by modules in this package. other-extensions: NoImplicitPrelude, BangPatterns- build-depends: base >=4.13 && <5, rhythmic-sequences ==0.4.0.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.10.0.0, phladiprelio-ukrainian-shared ==0.1.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.4.0.0, phonetic-languages-constraints-array ==0.7.3.0, phonetic-languages-simplified-base ==0.7.1.0, halfsplit ==0.3.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >=2.2.2 && <3, phladiprelio-tests ==0.1.0.0+ build-depends: base >=4.13 && <5, rhythmic-sequences ==0.4.1.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.11.0.0, phladiprelio-ukrainian-shared ==0.1.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.4.0.0, phonetic-languages-constraints-array ==0.7.3.0, phonetic-languages-simplified-base ==0.7.1.0, halfsplit ==0.3.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0, phladiprelio-general-datatype ==0.3.1.0 hs-source-dirs: . default-language: Haskell2010 @@ -40,7 +40,7 @@ ghc-options: -threaded -rtsopts -- LANGUAGE extensions used by modules in this package. other-extensions: NoImplicitPrelude, BangPatterns- build-depends: base >=4.13 && <5, rhythmic-sequences ==0.4.0.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.10.0.0, phladiprelio-ukrainian-shared ==0.1.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.4.0.0, phonetic-languages-constraints-array ==0.7.3.0, phonetic-languages-simplified-base ==0.7.1.0, halfsplit ==0.3.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0+ build-depends: base >=4.13 && <5, rhythmic-sequences ==0.4.1.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-ukrainian-array ==0.11.0.0, phladiprelio-ukrainian-shared ==0.1.0.0, cli-arguments ==0.7.0.0, phonetic-languages-permutations-array ==0.4.0.0, phonetic-languages-constraints-array ==0.7.3.0, phonetic-languages-simplified-base ==0.7.1.0, halfsplit ==0.3.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, phladiprelio-tests ==0.1.0.0, phladiprelio-general-datatype ==0.3.1.0 hs-source-dirs: . default-language: Haskell2010