| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Main
Contents
Synopsis
- main :: IO ()
- createSoundsForSyllable :: IO Integer -> [String] -> ((String, String), (String, Integer)) -> IO ()
- endS :: IO String
- combineSoundsLs3 :: Int -> ByteString -> [((String, String), (String, Integer))]
- words2 :: String -> [ByteString]
- concatPauseRecords :: [ByteString] -> [ByteString]
- assimilationFirst :: [ByteString] -> [ByteString]
- isSpecialNonSpace :: Char -> Bool
- separatePunct :: ByteString -> [ByteString]
- softAssociate :: ByteString -> ByteString
- ukrainianLast2 :: ByteString -> ByteString
- ukrainianJottedLast :: ByteString -> ByteString
- ukrainianJotted1 :: ByteString -> ByteString
- changeAssimilative :: ByteString -> ByteString
- separatePunct0 :: ByteString -> ByteString
- ukrainianToMoreSounding :: ByteString -> ByteString
- changeH2X :: ByteString -> ByteString
- change2BS :: String -> String
- firstChange :: Char -> Char
- readEnglishWithUkrainian :: Char -> String
- numberSounds :: Char -> String
- isFiltered :: Char -> Bool
- pFunctionP :: ((String, String), (String, Integer)) -> Bool
- pFunctionP0 :: ((String, String), (String, Integer)) -> Bool
- hDivideMonths2 :: ((String, String), (String, Integer)) -> [((String, String), (String, Integer))]
- concatSoftSign :: [((String, String), (String, Integer))] -> [((String, String), (String, Integer))]
- bGroups :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]
- hFunctionH :: ((String, String), (String, Integer)) -> [((String, String), (String, Integer))]
- combineSoundsLs :: ByteString -> [((String, String), (String, Integer))]
- createSyllablesReady :: (ByteString, (Maybe Integer, Integer)) -> [((String, String), (String, Integer))]
- accountEmphasis :: ByteString -> (ByteString, (Maybe Integer, Integer))
- isVowelL :: Char -> Bool
- zeroSyllablePart :: ByteString -> [((String, String), (String, Integer))]
- createSyllablesMultiLast2 :: [[String]] -> (Maybe Integer, Integer) -> [((String, String), (String, Integer))]
- divideToUnits :: ByteString -> [[String]]
- isSimPRecord :: Char -> Bool
- concatPunct :: [((String, String), (String, Integer))] -> [((String, String), (String, Integer))]
- convertSyllableToLanguage :: ByteString -> [String]
- createSyllablesMulti :: ByteString -> [ByteString]
- divideToListOfSoundGroupsAsLists :: ByteString -> [[(ByteString, Char)]]
- listOfFrames :: ByteString -> [(Int, Int)]
- divideConsonants :: [(ByteString, Char)] -> [[(ByteString, Char)]]
- prepareToSyllables :: ByteString -> [[(ByteString, Char)]]
- listOfPoints :: ByteString -> [Int]
- createSoundL :: ByteString -> [(ByteString, Char)]
- createSoundGroups :: ByteString -> [ByteString]
- amountOfPartsForKthSyl :: ByteString -> Int -> Int
- createSoundLChar :: Char -> (ByteString, Char)
- isSimilar :: Char -> Char -> Bool
- isConsonantL :: Char -> Bool
- isFilteredForLast2 :: Char -> Bool
- punctuationPauseLength :: Integer -> String -> String -> String -> [String] -> IO ()
- punctuationPauseLength1 :: Integer -> String -> String -> String -> [String] -> IO ()
- endE :: IO String
- addSoftSign :: FilePath -> IO ()
- punctL :: Integer -> Integer -> String -> String -> String -> [String] -> IO ()
- punctOpt :: String -> Integer
- punctL11 :: Integer -> Integer -> String -> String -> String -> [String] -> IO ()
- punctL1 :: Double -> Integer -> String -> IO ()
- isDigitOrDot :: Char -> Bool
- stringToInteger :: String -> Integer
- createZeroSyllable :: (Double, Integer, String, String, String, String, String) -> IO ()
- createSoftSign :: IO ()
- endOfExecutable :: String -> IO String
- isSimilarPauseRecords :: ByteString -> ByteString -> Bool
- specialConcatBS :: [ByteString] -> ByteString
- isVowelOrPunctuation :: Char -> Bool
- isVowelEG :: Char -> Bool
- dropWithFirst :: (a -> Bool) -> [a] -> [a]
- isDigitOrDash :: Char -> Bool
- isPunctOrSpaceB :: Char -> Bool
- oneToTuple2 :: String -> (String, String)
- isPunctOrSpace :: Char -> Bool
- takeWithFirst :: (a -> Bool) -> [a] -> [a]
- changeToEsperanto :: ByteString -> String
- verbSpecialConv :: ByteString -> ByteString
- isSpecial :: Char -> Char -> Bool
- changeToDecoded :: String -> String
- continueLang :: Char -> Bool
- mapLS :: ByteString -> [Int] -> [Int]
Main Function
Functions used in the main function itself
createSoundsForSyllable :: IO Integer -> [String] -> ((String, String), (String, Integer)) -> IO () Source #
Function that for the Ukrainian syllable represented as ((String, String),(String,Integer)) creates sounds Функція, що для українського складу представленого як ((String, String),(String,Integer)) створює звуки
Function that is used to find out the ending of SoX executable installed if any Функція, яка використовується для того, щоб знайти закінчення SoX програми, якщо така встановлена в системі
combineSoundsLs3 :: Int -> ByteString -> [((String, String), (String, Integer))] Source #
Function that prepares a String for processing by the eSpeak and SoX for non-zero-syllable words Функція, яка готує слово з голосним для подальшої обробки eSpeak та SoX
words2 :: String -> [ByteString] Source #
Function that produces the list of Ukrainian strings from the primary Ukrainian string which can be further easily processed Функція, яка створює список українських рядків з початкового українського рядка, які можуть бути легко оброблені далі
Functions used for preprocessing
concatPauseRecords :: [ByteString] -> [ByteString] Source #
Function that is used for creation of the volatile pauses Функція, яка використовується для створення довільних пауз
assimilationFirst :: [ByteString] -> [ByteString] Source #
Additional function to take into account assimilation rules that depend on the position in the word of the group of Ukrainian sounds Додаткова функція, щоб врахувати правила асиміляції, які залежать від положення у слові групи українських звуків
isSpecialNonSpace :: Char -> Bool Source #
Function-predicate used for filtering and indicating that a Char '\x000C' has not space semantics after encoding to ByteString Функція-предикат, яка використовується для фільтрування та вказівки на те, що символ '\x000C' має не семантику пробільного символу після кодування в ByteString
separatePunct :: ByteString -> [ByteString] Source #
Function that separates punctuation from the words for further processing Функція, що відділяє пунктуацію від слів для подальшої обробки
softAssociate :: ByteString -> ByteString Source #
Additional function to check whether its argument takes into account that soft sign is considered as a part of a consonant Додаткова функція, яка перевіряє, чи її аргумент бере до уваги, що м'який знак вважається частиною приголосного
ukrainianLast2 :: ByteString -> ByteString Source #
Function that applies assimilation rules to the Ukrainian preprocessed string Функція, яка застосовує правила асиміляції до українського попередньо обробленого рядка
ukrainianJottedLast :: ByteString -> ByteString Source #
Function to convert Ukrainian "я", "ю", "є" and "ї" into some other String for syllables processing Функція для перетворення українських "я", "ю", "є" та "ї" на деякі інші рядки для обробки складів
ukrainianJotted1 :: ByteString -> ByteString Source #
Optimized function to convert Ukrainian "я", "ю", "є" and "ї" into some other String for syllables processing Оптимізована функція для перетворення українських "я", "ю", "є" та "ї" на деякі інші рядки для обробки складів
changeAssimilative :: ByteString -> ByteString Source #
Function that makes some assimilation changes for correct Ukrainian pronunciation Функція, що робить деякі асиміляційні зміни для правильної української вимови
separatePunct0 :: ByteString -> ByteString Source #
Function that separates punctuation marks from the words Функція, яка відділяє пунктуаційні знаки від слів
ukrainianToMoreSounding :: ByteString -> ByteString Source #
Function that primarily converts Ukrainian line into more sounds-based line and more oriented to more using prosodical information Функція, що початково перетворює український рядок на більш орінтований на звуки рядок і більш орієнтований на використання просодійної інформації
changeH2X :: ByteString -> ByteString Source #
Function for special Ukrainian words where "г" sounds approximately as "х" Функція для спеціальних українських слів, де звук "г" звучить близько до "х"
change2BS :: String -> String Source #
Function that encode the Unicode characters from '\x0430' to '\x2122' for using in the Data.ByteString.Lazy.Char8 functions Функція, що кодує Unicode символи з '\x0430' по '\x2122' для використання у Data.ByteString.Lazy.Char8 функціях
firstChange :: Char -> Char Source #
Function that converts letters to lower case letters and makes some additional punctuation changes Функція, що конвертує літери в прописні літери та робить додаткові пунктуаційні зміни
readEnglishWithUkrainian :: Char -> String Source #
Function that converts Latin text into English-sounding letters in Ukrainian Функція, яка конвертує текст латиницею в літери, які звучать по-англійськи, записані українською
numberSounds :: Char -> String Source #
Function that sounds separated with whitespaces numbers digit by digit Функція, яка озвучує відокремлені пробілами числа цифра за цифрою
isFiltered :: Char -> Bool Source #
Function-predicate to filter the characters used for further processment Функція-предикат, яка використовується для фільтрування потрібних символів для наступної обробки
Functions used to create syllables or special symbol sequences
pFunctionP :: ((String, String), (String, Integer)) -> Bool Source #
Function-predicate that checks whether the hFunctionH must be applied to the ((String, String), (String, Integer)) Функція-предикат, яка перевіряє, чи має бути застосована hFunctionH до ((String, String), (String, Integer))
pFunctionP0 :: ((String, String), (String, Integer)) -> Bool Source #
Function-predicate that checks whether the hFunctionH must be applied to the ((String, String), (String, Integer)) for args containing -W or W Функція-предикат, яка перевіряє, чи має бути застосована hFunctionH до ((String, String), (String, Integer)) для args, які містять -W або W
hDivideMonths2 :: ((String, String), (String, Integer)) -> [((String, String), (String, Integer))] Source #
Function that divides wrongly sounding syllables for abbeviations of esperanto months into parts Функція, яка ділить неправильно озвучувані склади для абревіатур назв місяців мовою есперанто на дві частини
concatSoftSign :: [((String, String), (String, Integer))] -> [((String, String), (String, Integer))] Source #
Function that concatenates alone soft sign with the previous letter (Esperanto or Greek) Функція, яка з'єднує ізольований м'який знак з попереднім приголосним (есперанто чи грецькою)
bGroups :: (a -> Bool) -> (a -> [a]) -> [a] -> [a] Source #
Function that applies additional function h to a if p is True on a Функція, що застосовує додаткову функцію h до a, якщо p є Істина на a
hFunctionH :: ((String, String), (String, Integer)) -> [((String, String), (String, Integer))] Source #
Function that converts zero-syllable groups of consonant sounds into separate sounds for further processing Функція, що перетворює безголосні групи приголосних у окремі звуки для подальшої обробки
combineSoundsLs :: ByteString -> [((String, String), (String, Integer))] Source #
Function that combines the emphasis and dividing into sound groups into languages Функція, що поєднує наголос і поділ на групи звуків для мов
createSyllablesReady :: (ByteString, (Maybe Integer, Integer)) -> [((String, String), (String, Integer))] Source #
Function that creates Ukrainian syllables and groups them with some parameters to be then processed by the eSpeak and SoX executables Функція, що створює українські склади та групує їх з деякими параметрами, щоб потім вони були оброблені програмами eSpeak і SoX
accountEmphasis :: ByteString -> (ByteString, (Maybe Integer, Integer)) Source #
Function that creates from a Ukrainian pre-processed ByteString a data of the type (ByteString, (Maybe Integer, Integer)) that takes into account a word emphasis Функція, що створює з попередньо обробленого українського ByteString дані типу (ByteString, (Maybe Integer, Integer)), що враховують наголос у складі
isVowelL :: Char -> Bool Source #
Function-predicate that checks whether its argument is a Ukrainian vowel letter Функція-предикат, що перевіряє, чи її аргумент є українською голосною літерою
zeroSyllablePart :: ByteString -> [((String, String), (String, Integer))] Source #
Function that takes a Ukrainian String and converts it to the data of the type ((String, String), (String, Integer)) that is used for zero-vowel words Функція, що отримує на вхід український String і конвертує його на дані типу ((String, String), (String, Integer)), що використовується для слів без голосних
createSyllablesMultiLast2 :: [[String]] -> (Maybe Integer, Integer) -> [((String, String), (String, Integer))] Source #
Function that creates data of the type [((String, String),(String,Integer))] for non-zero-syllable words Функція, що створює дані типу [((String, String),(String,Integer))] для слів з голосними
divideToUnits :: ByteString -> [[String]] Source #
Additional function for dividing into units for further processing Додаткова функція для поділу на одиниці для подальшої обробки
isSimPRecord :: Char -> Bool Source #
Function-predicate to check whether its argument is from the special volatile punctuation group that sets the duration of the additional pause Функція-предикат, яка перевіряє, чи її аргумент є зі спеціальної довільної групи, яка встановлює тривалість додаткової паузи
concatPunct :: [((String, String), (String, Integer))] -> [((String, String), (String, Integer))] Source #
Optimized function that is applied to the zero-syllable parts to concatenate the punctuation into the one sample of sounding Оптимізована функція, що застосовується до нуль-складових слів, щоб з'єднати пунктуаційні знаки в одну частину озвучування
convertSyllableToLanguage :: ByteString -> [String] Source #
Additional function that is used inside the createSoundsForSyllable function to convert Ukrainian syllables into Esperanto, or Polish, or Greek ones Додаткова функція, що використовується всередині createSoundsForSyllable для конвертування українського складу в склад мовою есперанто, польською чи грецькою
createSyllablesMulti :: ByteString -> [ByteString] Source #
Function to create a list of syllables from the Ukrainian multi-syllable word Функція, що утворює список складів з українського багатоскладового слова
divideToListOfSoundGroupsAsLists :: ByteString -> [[(ByteString, Char)]] Source #
Intermediate function for creating a Ukrainian syllables Проміжна функція для створення українських складів
listOfFrames :: ByteString -> [(Int, Int)] Source #
Function to create a list of frames for producing syllables in multi-syllable word Функція, щоб створити список обмежень для генерування складів у багатоскладовому слові
divideConsonants :: [(ByteString, Char)] -> [[(ByteString, Char)]] Source #
Function that divides a list of data of the type (String, Char) representing the Ukrainian consonants into two groups for further syllable constuction Функція, що ділить список даних типу (String, Char), що представляють українські приголосні, на дві групи для подальшого конструювання складів
prepareToSyllables :: ByteString -> [[(ByteString, Char)]] Source #
Function that prepares a Ukrainian word to be divided into syllables Функція, що готує українське слово для поділу на склади
listOfPoints :: ByteString -> [Int] Source #
Additional list of the amount of parts to be taken to create syllables Додаткова список кількостей частин, які потрібно узяти, щоб створити склади
createSoundL :: ByteString -> [(ByteString, Char)] Source #
Additional function that is used to divide a Ukrainian word into syllables, it creates a list of data of the type (String, Char) Додаткова функція, що використовується для поділу українського слова на склади, створює список даних типу (String, Char)
createSoundGroups :: ByteString -> [ByteString] Source #
Additional function that is used to divide a Ukrainian word into syllables Додаткова функція, що використовується, щоб поділити українське слово на склади
amountOfPartsForKthSyl :: ByteString -> Int -> Int Source #
Additional function to find out the amount of parts to be taken for the k-th syllable Додаткова функція, щоб визначити, яку кількість частин потрібно взяти для k-го складу
createSoundLChar :: Char -> (ByteString, Char) Source #
Function that converts encoded Char into a tuple (ByteString, Char) for further usage in syllable segmentation Функція, що конвертує кодований символ у кортеж (ByteString, Char) для подальшого використання у поділі на склади
isSimilar :: Char -> Char -> Bool Source #
Function that checks whether its arguments are both consonants Функція, що перевіряє, чи є обидва її аргументи приголосні
isConsonantL :: Char -> Bool Source #
Function-predicate to check whether its argument is a consonant Функція-предикат, яка перевіряє, чи є її аргумент приголосним
isFilteredForLast2 :: Char -> Bool Source #
Function-predicate that is used to eliminate the quantity of ukrainianLast2 applications Функція-предикат, яка використовується для зменшення кількості застосувань функції ukrainianLast2
Functions that are used for sound creation itself
punctuationPauseLength :: Integer -> String -> String -> String -> [String] -> IO () Source #
Function that is used to create punctuation pauses Функція, що використовується для створення пунктуаційних пауз
punctuationPauseLength1 :: Integer -> String -> String -> String -> [String] -> IO () Source #
Function that is used to create punctuation pauses if args include "1", or "2", or "3" Функція, що використовується для створення пунктуаційних пауз, якщо args включають "1", або "2", або "3"
Function that is used to find out the ending of eSpeak executable installed if any Функція, яка використовується для того, щоб знайти закінчення eSpeak програми, якщо така встановлена в системі
addSoftSign :: FilePath -> IO () Source #
Function that checks the eSpeak and SoX executables existence and is used for soft sign sound appending to the syllable or word Функція, що перевіряє існування eSpeak і SoX додатків у системі та використовується для додавання м'якого знаку до кінцевого приголосного у слові чи складі
punctL :: Integer -> Integer -> String -> String -> String -> [String] -> IO () Source #
Function that considers a number of punctuation marks for proper pause creation Функція, яка бере до уваги кількість пунктуаційних знаків для правильного створення пауз
punctOpt :: String -> Integer Source #
Additional function that is used for optimization of the punctL and punctL11 functions Додаткова функція, яка використовується для оптимізації функцій punctL і punctL11
punctL11 :: Integer -> Integer -> String -> String -> String -> [String] -> IO () Source #
Function that considers a number of punctuation marks for proper pause creation Функція, яка бере до уваги кількість пунктуаційних знаків для правильного створення пауз
punctL1 :: Double -> Integer -> String -> IO () Source #
Additional function that is used for pause creation into the functions punctL and punctL11 Додаткова функція, яка використовується всередині функцій punctL і punctL11 для створення пауз
isDigitOrDot :: Char -> Bool Source #
Function-predicate to check whether its argument is a digit or dot Функція-предикат, яка перевіряє, чи є її аргумент цифра чи крапка
stringToInteger :: String -> Integer Source #
Function that converts a String with digits into an Integer Функція, що конвертує String з цифрами в Integer
createZeroSyllable :: (Double, Integer, String, String, String, String, String) -> IO () Source #
Function that is used for zero-syllable creation varied from OS and duration Функція, яка використовується для створення слів без голосних і варіюється в залежності від ОС та тривалості
createSoftSign :: IO () Source #
Function that checks the eSpeak and SoX executables existence and is used for soft sign sound creation Функція, що перевіряє існування eSpeak і SoX додатків у системі та використовується для створення звуку для м'якого знаку
Other functions that are used internally in these ones
endOfExecutable :: String -> IO String Source #
Function that is used instead of System.Info.os to check whether the eSpeak and SoX executables end in .exe Функція, яка використовується замість System.Info.os, щоб перевірити, чи eSpeak і SoX програми закінчуються на .exe
isSimilarPauseRecords :: ByteString -> ByteString -> Bool Source #
Function-predicate to check whether its arguments are both from the special volatile punctuation group that sets the duration of the additional pause (is used to group them by) Функція-предикат, яка перевіряє, чи її аргументи обидва є зі спеціальної довільної групи, яка встановлює тривалість додаткової паузи (використовується, щоб їх згрупувати)
specialConcatBS :: [ByteString] -> ByteString Source #
Function that concatenates a list of ByteString into the single ByteString and is used to set the duration of the additional pause Функція, яка ппоєднує список ByteString у один ByteString і яка використовується для встановлення тривалості додаткової паузи
isVowelOrPunctuation :: Char -> Bool Source #
Function-predicate that checks whether its argument is either a vowel or a punctuation mark Функція-предикат, яка перевіряє, чи є її аргумент голосним або знаком пунктуації
isVowelEG :: Char -> Bool Source #
Function-predicate to check whether its argument is a Vowel sound letter in Esperanto or Greek respesentation of the group of sounds Функція-предикат, щоб визначити, чи її аргумент є літерою, що позначає голосний у представленні грецькою мовою чи есперанто
dropWithFirst :: (a -> Bool) -> [a] -> [a] Source #
Optimized function to take elements of the list after the first occasion of the wrong predicate p excluding the first occurance Оптимізована функція, щоб узяти елементи списку після першої появи хибності у предикаті, виключаючи саму цю першу появу
isDigitOrDash :: Char -> Bool Source #
Function-predicate that checks whether its argument is either a digit character or a dash Функція-предикат, що перевіряє, чи її аргумент є символом цифри чи дефісу
isPunctOrSpaceB :: Char -> Bool Source #
Function-predicate that checks whether its argument is a punctuation mark or a whitespace encoded as ByteString Функція-предикат, яка перевіряє, чи є її аргумент пунктуаційним знаком чи пробілом, закодованим як ByteString
oneToTuple2 :: String -> (String, String) Source #
Function that is used to convert single letters to a respective syllables for sounding Функція, що використовується, щоб перетворити окремі літери на відповідні склади для озвучування
isPunctOrSpace :: Char -> Bool Source #
Function-predicate to check whether its argument is either a space or a punctuation sign Функція-предикат для перевірки, чи її аргумент є чи пробілом, чи знаком пунктуації
takeWithFirst :: (a -> Bool) -> [a] -> [a] Source #
Optimized function to take elements of the list till the first occasion of the wrong predicate p including the first occurance Оптимізована функція, щоб узяти елементи списку до першої появи хибності у предикаті, включаючи саму цю першу появу
changeToEsperanto :: ByteString -> String Source #
Function that actually converts a Ukrainian word written as an encoded ByteString to the Esperanto string for further reading Функція, що власне перетворює українське слово, записане як закодований ByteString, у Esperanto рядок для подальшого озвучування
verbSpecialConv :: ByteString -> ByteString Source #
Function that is used to convert "ться" into the wright letter combination in Esperanto Функція, що використовується для перетворення "ться" на правильну комбінацію літер есперанто
isSpecial :: Char -> Char -> Bool Source #
Function-predicate to group only not special letters Функція-предикат для групування лише не спеціальних літер
changeToDecoded :: String -> String Source #
Function that is used for decoding of the String Функція, яка використовується для декодування String
continueLang :: Char -> Bool Source #
Additional function-predicate to check if its argument is a sound that converts to another language than the default Esperanto one Додаткова функція-предикат, щоб перевірити, чи її аргумент є звуком, що конверується до іншої мови, ніж звичайна есперанто