mmsyn7s-0.8.0.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

MMSyn7.Syllable

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. This module works with syllable segmentation.

Synopsis

Datatype for the Ukrainian sounds representations

data UZP Source #

Datatype UZP is a simple sound classification type. Its peculiarity is that it is shown as a usual String (by design corresponding to the Ukrainian sound).

Instances
Eq UZP Source # 
Instance details

Defined in MMSyn7.Syllable

Methods

(==) :: UZP -> UZP -> Bool #

(/=) :: UZP -> UZP -> Bool #

Ord UZP Source # 
Instance details

Defined in MMSyn7.Syllable

Methods

compare :: UZP -> UZP -> Ordering #

(<) :: UZP -> UZP -> Bool #

(<=) :: UZP -> UZP -> Bool #

(>) :: UZP -> UZP -> Bool #

(>=) :: UZP -> UZP -> Bool #

max :: UZP -> UZP -> UZP #

min :: UZP -> UZP -> UZP #

Show UZP Source # 
Instance details

Defined in MMSyn7.Syllable

Methods

showsPrec :: Int -> UZP -> ShowS #

show :: UZP -> String #

showList :: [UZP] -> ShowS #

The resulting functions

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

Function syllablesUkr actually converts a String to the list of words being segmented into the syllables in the String format. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

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

Function takeWordS takes a number (which is its first argument) of the Ukrainian words and represents them as a list of list of String, each of which is a syllable in the String format. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

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

Function sylLengths shows number of Ukrainian letters (except ь) in the syllables in the text needed to represent a sounding of the text, which was previously converted with syllablesUkr function. If the syllable does not contain either sounds "дж" / "дз" or prolonged sounds then this number is also a number of sounds in it. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

Working more with UZP format

syllablesUkrP :: String -> [[[UZP]]] Source #

Function syllablesUkrP actually converts a String to the list of words being segmented into the syllables in the UZP format. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

takeWordSP :: Int -> String -> [[[UZP]]] Source #

Function takeWordSP takes a number (which is its first argument) of the Ukrainian words and represents them as a list of list of list of UZP, each list of UZP is a syllable. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

sylLengthsP :: [[[UZP]]] -> [[Int]] Source #

Function sylLengthsP shows number of UZP in the syllables in the text, which was previously converted with syllablesUkrP function. If the syllable does not contain prolonged sounds then this number is also a number of sounds in it. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

sylLengthsP2 :: [[[UZP]]] -> [[Int]] Source #

Function sylLengthsP2 shows number of sounds in the syllables in the text, which was previously converted with syllablesUkrP function. If the Ukrainian word being written down contains an apostrophe or a dash (hyphen) signs (or even both) then they are treated as separators for the distinguished words. This does not influence the syllable structure and so the poetic characteristics of the text.

Used internally

createSyllables :: [[UZP]] -> [String] Source #

Function createSyllables takes a prepared Ukrainian word and joins the parts (each one being a list of UZP) so that they constitute syllables in the String format.

divideConsonants :: [UZP] -> [[UZP]] Source #

Function divideConsonants is used to divide groups of Ukrainian consonants into two-elements lists that later are made belonging to different neighbour syllables if the group is between two vowels in a word. The group must be not empty, but this is not checked. The phonetical information for the proper performance is taken from the: https://msn.khnu.km.ua/pluginfile.php/302375/mod_resource/content/1/%D0%9B.3.%D0%86%D0%86.%20%D0%A1%D0%BA%D0%BB%D0%B0%D0%B4.%D0%9D%D0%B0%D0%B3%D0%BE%D0%BB%D0%BE%D1%81.pdf

groupConsonants :: [[UZP]] -> [[UZP]] Source #

Function groupConsonants is used to apply divideConsonants to the needed groups of consonants.

sndGroups :: [UZP] -> [[UZP]] Source #

Function sndGroups converts a Ukrainian word being a list of UZP to the list of phonetically similar (consonants grouped with consonants and each vowel separately) sounds representations in UZP format.

takeWithV :: [[UZP]] -> [String] Source #

Function takeWithV is used internally in the createSyllables.

vecToUZPs :: Vector String -> [UZP] Source #

Function vecToUZPs is used to convert a Vector of String representing Ukrainian sounds to a list of UZP.

vecWords :: Vector String -> [Vector String] Source #

Function vecWords similarly to words divides a Vector of String into list of them, each element of which is a Ukrainian word (or its part for dashed and hyphenated words or that ones with an apostrophe).

uzpsToList :: [[UZP]] -> [String] Source #

Function uzpsToList converts a Ukrainian word being a list of syllables in UZP format to a list of String.

representProlonged :: [UZP] -> [UZP] Source #

Function representProlonged is used internally in the sylLengthsP2 function. It converts duplicated consequent in the syllable consonants so that they are represented by just one UZP. After applying the function to the list of UZP being a syllable all groups of duplicated consequent consonants in every syllable are represented with only one UZP respectively.

filterC :: (Char -> Bool) -> UZP -> String Source #

Auxiliary function used internally in the notEqC function.

Working more with UZP format

createSyllablesP :: [[UZP]] -> [[UZP]] Source #

Function createSyllablesP takes a prepared Ukrainian word and joins the parts (each one being a list of UZP) so that they constitute syllables in the UZP format.

takeWithVP :: [[UZP]] -> [[UZP]] Source #

Function takeWithVP is used internally in the createSyllablesP.

Auxiliary predicate functions

isNotVowel2 :: UZP -> UZP -> Bool Source #

Binary function-predicate isNotVowel2 checks whether its arguments are both consonant representations in the UZP format.

isSonorous1 :: UZP -> Bool Source #

Function-predicate isSonorous1 checks whether its argument is a sonorous consonant representation in the UZP format.

isVoicedC1 :: UZP -> Bool Source #

Function-predicate isVoicedC1 checks whether its argument is a voiced consonant representation in the UZP format.

isVoicelessC1 :: UZP -> Bool Source #

Function-predicate isVoiceless1 checks whether its argument is a voiceless consonant representation in the UZP format.

isVowel1 :: UZP -> Bool Source #

Function-predicate isVowel1 checks whether its argument is a vowel representation in the UZP format.

isVwl :: Char -> Bool Source #

Function-predicate isVwl checks whether its argument is a vowel representation in the Char format.

notEqC :: UZP -> UZP -> Bool Source #

Binary function-predicate notEqC checks whether its arguments are not the same consonant sound representations (not taking palatalization into account).