Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
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
- data UZP
- syllablesUkr :: String -> [[String]]
- takeWordS :: Int -> String -> [[String]]
- sylLengths :: [[String]] -> [[Int]]
- createSyllables :: [[UZP]] -> [String]
- divideConsonants :: [UZP] -> [[UZP]]
- groupConsonants :: [[UZP]] -> [[UZP]]
- sndGroups :: [UZP] -> [[UZP]]
- takeWithV :: [[UZP]] -> [String]
- vecToUZPs :: Vector String -> [UZP]
- vecWords :: Vector String -> [Vector String]
- uzpsToList :: [[UZP]] -> [String]
- isNotVowel2 :: UZP -> UZP -> Bool
- isSonorous1 :: UZP -> Bool
- isVoicedC1 :: UZP -> Bool
- isVoicelessC1 :: UZP -> Bool
- isVowel1 :: UZP -> Bool
- isVwl :: Char -> Bool
- notEqC :: UZP -> UZP -> Bool
Datatype for the Ukrainian sounds representations
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).
The resulting functions
syllablesUkr :: String -> [[String]] Source #
Function syllablesUkr
actually converts a String
to the list of words being segmented into the syllables. 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.
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.
Used internally
createSyllables :: [[UZP]] -> [String] Source #
Function createSyllables
takes a prepared Ukrainian word and joins the parts (being a list of UZP
) so that they constitute syllables.
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.
takeWithV :: [[UZP]] -> [String] Source #
Function takeWithV
is used internally in the createSyllables
.
uzpsToList :: [[UZP]] -> [String] Source #
Function uzpsToList
converts a Ukrainian word being a list of syllables in UZP
format to a list of String
.
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.