Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
Helps to order the 7 or less Ukrainian words (or their concatenations) to obtain somewhat suitable for poetry or music text.
Synopsis
- uniq10Poetical4 :: String -> IO ()
- uniq10Poetical5 :: String -> IO ()
- uniq10PoeticalG :: ([Int] -> Int) -> String -> IO ()
- uniqNPoeticalG :: Int -> ([Int] -> Int) -> String -> IO ()
- uniqNPoetical :: Int -> Vector ([Int], Int, Int, Int, String) -> IO ()
- uniqNPoeticalV :: Int -> Vector ([Int], Int, Int, Int, String) -> IO (Vector ([Int], Int, Int, Int, String))
- uniqNPoeticalVG :: Int -> ([Int] -> Int) -> String -> IO (Vector ([Int], Int, Int, Int, String))
- uniquenessVariantsG :: ([Int] -> Int) -> String -> Vector ([Int], Int, Int, Int, String)
- uniquenessVariants3 :: String -> Vector ([Int], Int, Int, Int, String)
- uniquenessVariants4 :: String -> Vector ([Int], Int, Int, Int, String)
- uniqMaxPoeticalG :: ([Int] -> Int) -> String -> ([Int], Int, Int, Int, String)
- uniqInMaxPoetical :: Vector ([Int], Int, Int, Int, String) -> IO (Vector ([Int], Int, Int, Int, String))
- norm1 :: [Int] -> Int
- norm2 :: [Int] -> Int
- norm3 :: [Int] -> Int
- norm4 :: [Int] -> Int
- norm5 :: [Int] -> Int
- norm6 :: [Int] -> Int
- fourFrom5 :: (a, b, b, b, c) -> (a, b, b, b)
- lastFrom5 :: (a, b, b, b, c) -> c
Main functions
uniq10Poetical4 :: String -> IO () Source #
A variant of uniq10PoeticalG
with the norm4
applied. The list is (according to some model, not universal, but a reasonable one in the most cases) the
most suitable for intonation changing and, therefore, for the accompaniment of the highly changable or variative melody.
uniq10Poetical5 :: String -> IO () Source #
A variant of uniq10PoeticalG
with the norm5
applied. The list is (according to some model, not universal, but a reasonable one in the most cases) the
most suitable for rhythmic speech and two-syllabilistic-based poetry. Therefore, it can be used to create a poetic composition or to emphasize some
thoughts.
uniq10PoeticalG :: ([Int] -> Int) -> String -> IO () Source #
A variant of the uniqNPoeticalG
function with the n
equal to 10.
uniqNPoeticalG :: Int -> ([Int] -> Int) -> String -> IO () Source #
Recursive n :: Int
times application of the uniqInMaxPoetical
function after the uniquenessVariantsG
application to the String
.
Prints n
(or less if there are less of them) maximum elements starting from the first and further to the rest. The norm given defines the way,
in which the elements are considered the "maximum" ones.
uniqNPoetical :: Int -> Vector ([Int], Int, Int, Int, String) -> IO () Source #
Recursive n :: Int
times application of the uniqInMaxPoetical
function. Prints n
(or less if there are less of them) maximum elements starting from
the first and further to the rest. The norm given defines the way, in which the elements are considered the "maximum" ones.
uniqNPoeticalV :: Int -> Vector ([Int], Int, Int, Int, String) -> IO (Vector ([Int], Int, Int, Int, String)) Source #
The result of the recursive n :: Int
times application of the uniqInMaxPoetical
function. The norm given defines the way, in which the elements
are considered the "maximum" ones.
uniqNPoeticalVG :: Int -> ([Int] -> Int) -> String -> IO (Vector ([Int], Int, Int, Int, String)) Source #
The result of the recursive n :: Int
times application of the uniqInMaxPoetical
function after the uniquenessVariantsG
application to the String
.
The norm given defines the way, in which the elements are considered the "maximum" ones.
Additional functions
uniquenessVariantsG :: ([Int] -> Int) -> String -> Vector ([Int], Int, Int, Int, String) Source #
Given a String
consisting of no more than 7 Ukrainian words [some of them can be created by concatenation with preserving the Ukrainian
pronunciation of the parts, e. g. "так як" (actually two correnc Ukrainian words) can be written "такйак" (one phonetical Ukrainian word
obtained with preserving phonetical structure), if you would not like to treat them separately] it returns a Vector
of possible combinations
without repeating of the words in differnet order and for every one of them appends also information about uniquenessPeriods
to it and finds out
three different metrics -- named "norms". Afterwards, depending on these norms it can be specified some phonetical properties of the words that
allow to use them poetically or to create a varied melody with them. Some variants of this generalized function are uniquesessVariants3
and
uniquesessVariants4
with the predefined norms.
uniquenessVariants3 :: String -> Vector ([Int], Int, Int, Int, String) Source #
A variant of uniquesessVariantsG
with the norm being norm3
.
uniquenessVariants4 :: String -> Vector ([Int], Int, Int, Int, String) Source #
A variant of uniquesessVariantsG
with the norm being norm4
.
uniqMaxPoeticalG :: ([Int] -> Int) -> String -> ([Int], Int, Int, Int, String) Source #
Given a norm and a Ukrainian String
consisting of no more than 7 words (see also the information for uniquenessVariantG
) returns the maximum by the
specified norm element of the uniquenessVariantsG
applied to the same arguments.
uniqInMaxPoetical :: Vector ([Int], Int, Int, Int, String) -> IO (Vector ([Int], Int, Int, Int, String)) Source #
Similar to uniqMaxPoeticalG
but instead of resulting in a maximum element, outputs it by parts and returns the rest of the Vector
without this
maximum element.
Different norms
norm1 :: [Int] -> Int Source #
A first norm for the list of positive Int
. For not empty lists equals to the maximum element.
norm2 :: [Int] -> Int Source #
A second norm for the list of positive Int
. For not empty lists equals to the sum of the elements.
norm3 :: [Int] -> Int Source #
A third norm for the list of positive Int
. For not empty lists equals to the sum of the doubled maximum element and a rest elements of the list.
norm5 :: [Int] -> Int Source #
A fifth norm for the list of positive Int
. For not empty lists equals to the sum of the elements quoted with sum of the two most minimum elements.