uniqueness-periods-general-0.2.0.0: Can be used to produce the similar to 'String.Ukrainian.UniquenessPeriods' functions.

String.UniquenessPeriodsG

Description

Maintainer : olexandr543@yahoo.com

Can be used to produce the similar to UniquenessPeriods from uniqueness-periods package functions. Provides the generalization of them. For all the used conversion functions of the type g :: String -> Vector String it is important that they are stable for the repeated application (their result after the first application cannot be changed by the rules in the function into new variants). Otherwise, the recursive scheme of the functions in the module will lead to wrong results. So the conversion function should work the following way (xs denotes a word in the language) in GHCi:

let v = g xs
let ys = concat . toList \$ v
let v2 = g ys
v == v2
True

Or in the other words, for the single word, g . concat . toList . g = g;

Synopsis

# Auxiliary functions

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

The same as show7s'' from MMSyn7s module (mmsyn7s package), but the second element in the resulting tuple is again the text with whitespaces (whitespaces are substituted instead of punctuation symbols, too) and some phonetic conversions. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation).

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

Function show7s5 takes a text being a String and returns a tuple, the first element of which is a list of Strings that correspond to the 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 the second one is a String obtained from the remainder list of Strings starting from the first duplicated non-silent sound representation with whitespaces (whitespaces are substituted instead of punctiuation symbols, too) and some phonetic conversions. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation). The second argument is a function that converts a String of the text into the Vector of sound representations for that language.

show7s6 :: [String] -> (String -> Vector String) -> String -> [[String]] Source #

Function show7s6 takes a 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 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. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation). The second argument is a function that converts a String of the text into the Vector of sound representations for that language.

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

The same as show7sn''' from the MMSyn7s module from the mmsyn7s package, but does not concatenate the list of String as the second tuple's element. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation).

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

Converts a list of String each one being a non-silent sound representation into a list of Int using recursively show7sn4'. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation).

## Inner predicate (auxiliary)

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

Function eqSnds compares two non-silent Strings representations for sounds by equality. If one of them is a representation for silence (e. g. pause), then the predicate is False. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation).

## Inner backward conversion function

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

Function listToString converts the list of Strings being the sequential sounds representations into the text with whitespaces (whitespaces are substituted instead of punctuation symbols, too) and some phonetic conversions. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation).

# uniquenessPeriods function

uniquenessPeriods :: [String] -> (String -> Vector String) -> String -> [Int] Source #

Function uniquenessPeriods takes a text being a String and returns a list of Ints. Each Int value is a number of the 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 phonetic and in some cases semantic structures of the text. The first argument must be a list of String, each of which is a representation for the white space (or more generally, non-sound symbol representation). The second argument is a function that converts a String of the text into the Vector of sound representations for that language.