mmsyn7s-0.9.1.0: Shows a sorted list of the Ukrainian sounds representations that can be used by mmsyn7 series of programs

Copyright(c) OleksandrZhabenko 2020
LicenseMIT
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

MMSyn7s

Contents

Description

Maintainer : olexandr543@yahoo.com

A program and a library that show a sorted list of the Ukrainian sounds representations that can be used by mmsyn7 series of programs.

Synopsis

Used in the program

main7s :: IO () Source #

Function takes the first command line argument and (may be) a Ukrainian text being written without quotes as the next command line arguments and prints the sorted list of the Ukrainian sounds representations that can be used further in mmsyn7 series of programs.

Depending on the first command line argument the program behaves as follows:

"-h" -- prints help and exits;

"-v" -- prints version number and exits;

"-s" -- prints some general descriptive statistics metrices for the given text;

"-s2" -- prints a syllable segmentation for the {number of words (or their parts) to be taken for statistics, which is a second command line argument} and some information about its structure that can be interesting.

"1" -- prints the list of String being unique (without silence) and then the rest of the text with whitespaces and some phonetical conversions;

"-1" -- prints the rest of the text after the first duplicated sound representation (except silent ones) including it with whitespaces and some phonetical conversions;

"0" -- prints the list of String being the Ukrainian sounds representations for the whole text.

"2" -- prints the list of String being the Ukrainian sounds representations for the whole text where every sound representation is unique;

"3" -- prints the list of lists of Strings being the Ukrainian sounds representations for the whole text, which shows what sound representations are needed to be created if every sound is unique;

All other variants of the beginning for the command line arguments are the same as "0" (the arguments are treated as a Ukrainian text and processed as a whole one object).

Library functions

For the text as a whole object

show7s2 :: String -> String Source #

Function takes a Ukrainian text being a String and returns a String that shows a sorted list of the Ukrainian sounds representations that can be used further in mmsyn7 series of programs.

For the text being treated as partial one

show7s' :: [String] -> ([String], [String]) Source #

Function show7s' is auxiliary to the show7s3 and is used internally in the latter one.

show7s'' :: [String] -> ([String], [String]) Source #

The same as show7s', but the first list in the tuple is filtered from the silent representations and is sorted not in the order of appearance in the text, but in the ascending order.

show7s''' :: [String] -> ([String], String) Source #

The same as show7s'', but the second element in the resulting tuple is again the Ukrainian text with whitespaces (whitespaces are substituted instead of punctuation symbols, too) and some phonetical conversions.

show7s3 :: String -> ([String], [String]) Source #

Function show7s3 takes a Ukrainian text being a String and returns a tuple, the first element of which is a list of Strings that correspond to the Ukrainian sounds representations that (except pauses) are unique and are not repeated starting from the beginning of the given text, and the second one is a remainder list of Strings starting from the first duplicated non-silent Ukrainian sound representation.

show7s4 :: String -> ([String], [String]) Source #

Function show7s4 takes a Ukrainian text being a String and returns a tuple, the first element of which is a list of Strings that correspond to the Ukrainian sounds representations that (except pauses) are unique and are not repeated starting from the beginning of the given text (this list is filtered from the representations for the silence and then sorted in the ascending order), and the second one is a remainder list of Strings starting from the first duplicated non-silent Ukrainian sound representation.

show7s5 :: String -> ([String], String) Source #

Function show7s5 takes a Ukrainian text being a String and returns a tuple, the first element of which is a list of Strings that correspond to the Ukrainian sounds representations that (except pauses) are unique and are not repeated starting from the beginning of the given text (this list is filtered from the representations for the silence and then sorted in the ascending order), and the second one is a String obtained from the remainder list of Strings starting from the first duplicated non-silent Ukrainian sound representation with whitespaces (whitespaces are substituted instead of punctiuation symbols, too) and some phonetical conversions.

show7s6 :: String -> [[String]] Source #

Function show7s6 takes a Ukrainian text being a String and returns a list of lists of Strings, each latter one of which is obtained for the unique parts of the text from the Ukrainian sounds representations point of view. It can show how many and what sound representations are needed to be created to completely cover the given text providing all the needed sound parameters.

show7s7 :: String -> (String, String) Source #

Function show7s7 takes a Ukrainian text being a String and returns a tuple of Strings. The first element is a String corresponding to the beginning of the text with only unique non-silent sounds representations, and the second one is the rest of the text. Each resulting String is modified so that it contains some phonetical conversions and (may be) changed punctuation and whitespaces.

show7s8 :: String -> [String] Source #

Function show7s8 takes a Ukrainian text being a String and returns a list of Strings. Each String contains only unique Ukrainian sounds representations so that being sequenced from head of the list they all correspond to the whole text.

show7s9 :: String -> [String] Source #

Function show7s9 takes a Ukrainian text being a String and returns a list of Strings. Each String is a Ukrainian sound representation of the duplicated non-silent sounds, it begins a new second list of Strings in the show7s4 function. This information can be helpful e. g. in music and composing.

Inner predicate (auxiliary)

eqSnds :: String -> String -> Bool Source #

Function eqSnds compares two non-silent Strings representations for Ukrainian sounds by equality. If one of them is a representation for silence (e. g. pause), then the predicate is False.

Inner backward conversion function

listToString :: [String] -> String Source #

Function listToString converts the list of Strings being the sequential Ukrainian sounds representations into the Ukrainian text with whitespaces (whitespaces are substituted instead of punctuation symbols, too) and some phonetical conversions.

Some descriptive statistics metrices

countSnds :: [[String]] -> Int Source #

Function countSnds counts total number of Strings in the list of list of Strings. It can be successfully used to count how many Ukrainian sounds representations are needed to be created to completely cover the given Ukrainian text. It can be used as a some statistics parameter for the text.

countSnds2 :: String -> Int Source #

Function countSnds2 gives the same result as (countSnds . show7s6), but may be is sligtly more efficient in calculation.

sndsDensity :: String -> Double Source #

Function sndsDensity counts the ratio of total number of Ukrainian sounds representations (each of which gives an opportunity to use unique ones) to the total number of the Ukrainian sounds representations if all the non-silent sounds in the text are the same for the one sound representation no matter where it is located. It can be used as a some statistics parameter for the text. The greater is the result, the greater number of the Ukrainian sounds representations is needed to be created for the text to create a unique sound for every location alongside the text. If it is equal to 1.0, then every non-silent sound in the text appears just once (if at all appears).

uniquenessPeriods :: String -> [Int] Source #

Function uniquenessPeriods takes a Ukrainian text being a String and returns a list of Ints. Each Int value is a number of the Ukrainian sounds representations (non-silent ones) being unique and not duplicated alongside the given text starting from the beginning to the end. This function provides some important information about the phonetical and in some cases semantical structures of the text.

uniqMax :: String -> Int Source #

Function uniqMax is a maximum element in the uniquenessPeriods function for the same argument. It is provided as a standard element for the descriptive statistics.

uniqMin :: String -> Int Source #

Function uniqMin is a minimum element in the uniquenessPeriods function for the same argument. It is provided as a standard element for the descriptive statistics.

uniqPeriodsMean :: String -> Float Source #

Function uniqPeriodsMean is a mathematical expectation for the list obtained by uniquenessPeriods function. It is a statistic metric. It is a mean for the quantities of the unique (not duplicated, not repeated) Ukrainian sounds in the given Ukrainian text as a String. If there are no Ukrainian letters in the text, it is equal to 0.0. The greater it is, the more diverse (phonetically) the text is.

uniqPeriodsDispersion :: String -> Float Source #

Function uniqPeriodsDispersion is a dispersion for the list obtained by uniquenessPeriods function. It is a statistic metric. It is a dispersion for the quantities of the unique (not duplicated, not repeated) Ukrainian sounds in the given Ukrainian text as a String. If there are no Ukrainian letters in the text, it is equal to 0.0. The greater it is, the more suitable for changing pronunciation for the sounds (and may be for intonation changes, too) the text is.

uniqStdQDeviation :: String -> Float Source #

Function uniqStdQDeviation is a standard quadratic deviation for the list obtained by uniquenessPeriods function. It is a statistic metric. It is a standard quadratic deviation for the quantities of the unique (not duplicated, not repeated) Ukrainian sounds in the given Ukrainian text as a String. If there are no Ukrainian letters in the text, it is equal to 0.0. The greater it is, the more suitable for changing pronunciation for the sounds (and may be for intonation changes, too) the text is.