packages feed

phladiprelio-ukrainian-simple 0.13.2.0 → 0.14.0.0

raw patch · 5 files changed

+27/−12 lines, 5 filesdep ~phladiprelio-general-datatypedep ~phonetic-languages-ukrainian-arrayPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: phladiprelio-general-datatype, phonetic-languages-ukrainian-array

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -185,3 +185,10 @@   additionally a power of 10 for the multiplier that affects the value and groupping. Use for this +q with Int number as the next command line argument in the range [2..6]. The default value is 4. +## 0.14.0.0 -- 2023-11-17++* Fourteenth version. Added a possibility to change the durations of the selected syllables+using the ={set of digits} precisely after the needed syllable. For more information, see the output+of the call of the program with the -h command line argument. This significantly extends the general+possibilities of the program, especially for the music composing.+
Main.hs view
@@ -97,7 +97,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 . prepareTextN2 maxNumWords . unwords) $ arg3s+      ll = take maxNumWords . (if prepare then id else words . mconcat . prepareTextN3 maxNumWords . unwords) $ arg3s       l = length ll       argCs = catMaybes (fmap (readMaybeECG l) -- . (showB l lstW2:)                                                     . getC "+a" $ argsC)@@ -169,7 +169,10 @@       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 "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} or ={set of digits} to a word or between syllables after the needed to be referred to, 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)." +      putStrLn "If you have added _{set of digits} 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. "+      putStrLn "If you have added ={a set of digits} then this number will also be multiplied by the duration of the syllable to which this insertion refers, and the resulting number will be placed instead the duration that it was multiplied by. This allows to make syllables longer or shorter to follow language or creative intentions and rules (e. g. in French there have been noticed that the duration of the last syllable in the word, especially in the sentence or phrase is prolonged to some extent, so you can use '=12' or '=13' or '=14'  here). Not as for the _{set of digits} group, you can place it only after the syllable and only once to change the duration of the syllable. If you use this option, the following _{set of digits} will be referred to the new changed duration here, so that \"так\"=2_05_1 will mean that you will use instead of the usual duration of the syllable \"так\" the twice as much duration, and then half of this twice as much (therefore, equal to duration of the syllable without altering) and then again the twice as much duration etc. The insertion of =1, =10, =100, =1000 etc will not change anything at all, except for the time of computations (you probably do not need this). "+      putStrLn "These two additional possibilities 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 ""
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, isAlpha,toLower)+import Data.Char (isDigit, isAlpha,toLower,isSpace) import System.IO (putStrLn, FilePath,stdout,hSetNewlineMode,universalNewlineMode,getLine,appendFile,print,writeFile) import Rhythmicity.MarkerSeqs hiding (id)  import Data.List hiding (foldr)@@ -28,7 +28,7 @@ import Data.ReversedScientific import Control.Concurrent.Async (mapConcurrently) import Phladiprelio.Tests-import Phladiprelio.General.Datatype (readBasic3, readBasic4, readBasic1G)+import Phladiprelio.General.Datatype3 -- (readBasic3, readBasic4, readBasic1G) import Phladiprelio.General.Distance import Phladiprelio.UniquenessPeriodsG @@ -60,9 +60,9 @@    let syllN = countSyll initstr --       universalSet = map unwords . permutations . words $ rs        f ldc compards syllableDurationsDs grps mxms -- Since the version 0.12.0.0, has a possibility to evaluate diversity property.-            | null selStr = (if null compards then (sum . countHashes2G hashStep hc grps mxms) else (round . (*10^power10) . distanceSqrG2 ldc compards)) . 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) -            | otherwise = fromIntegral . diverse2GGL (selectSounds selStr) [100,101] . convertToProperUkrainianI8 . filter (\c -> not (isDigit c) && c /= '_')+            | null selStr = (if null compards then (sum . countHashes2G hashStep hc grps mxms) else (round . (*10^power10) . distanceSqrG2 ldc compards)) . read3 (not . null . filter (not . isSpace)) 1.0 (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) +            | otherwise = fromIntegral . diverse2GGL (selectSounds selStr) [100,101] . convertToProperUkrainianI8 . filter (\c -> not (isDigit c) && c /= '_' && c/= '=')    hSetNewlineMode stdout universalNewlineMode    if numTest >= 0 && numTest <= 179 && numTest /= 1 && null compards then do      putStrLn "Feet   Val  Stat   Proxim" @@ -100,8 +100,8 @@                                                     sylls = createSyllablesUkrS textP                                                 if code >= 10 && code <= 19 && grps == 2                                                     then do-                                                        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 +                                                        let qqs = readEq4 (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) (map showFS . mconcat . createSyllablesUkrS) . basicSplit $ textP                                                              (breaks, rs) = showZerosFor2PeriodMusic qqs                                                         putStrLn textP                                                         putStrLn breaks
README.md view
@@ -59,6 +59,11 @@ similarity measure) for the line options using the +l2 ... -l2 command line group of options. It is generally a completely new functionality for the package. +Since the version 0.14.0.0 there is a possibility to change the durations of the selected syllables+using the ={set of digits} precisely after the needed syllable. For more information, see the output+of the call of the program with the -h command line argument. This significantly extends the general+possibilities of the program, especially for the music composing.+ To see the help message with synopsis information, run:  phladiprelioUkr -h
phladiprelio-ukrainian-simple.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               phladiprelio-ukrainian-simple-version:            0.13.2.0+version:            0.14.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.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.4.2.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.4.1.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.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.12.1.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.4.2.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.5.1.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.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.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.4.2.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.4.1.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.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.12.1.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.4.2.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.5.1.0, mmsyn2-array ==0.3.1.1, phonetic-languages-basis ==0.3.0.0     hs-source-dirs:   .     default-language: Haskell2010