-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library to work with the basic Ukrainian phonetics and syllable segmentation. -- -- A library to work with the basic Ukrainian phonetics and syllable -- segmentation. Rewritten from the mmsyn6ukr and mmsyn7s packages. -- Comparing to the ukrainian-phonetics-basic package, all the -- vector-related functionality removed, it also removed from the -- dependencies and the mmsyn2 is changed to mmsyn2-array. Since 0.4.0.0 -- version switched to the more optimized Int8-based functionality. The -- modules that do not use Int8 after ugrading the -- phonetic-languages-simplified-examples-array to the Int8-based -- functionality are planned to be moved to the new package. @package ukrainian-phonetics-basic-array @version 0.4.1.0 -- | Functions provide functionality of a musical instrument synthesizer or -- for Ukrainian speech synthesis especially for poets, translators and -- writers. Is rewritten from the module -- Melodics.ByteString.Ukrainian.Arr for optimization purposes. Contains -- the common for two modules definitions. Phonetic material is taken -- from the : -- -- Solomija Buk, Ján Mačutek, Andrij Rovenchak. Some properties of the -- Ukrainian writing system. [Electronic resource] -- https://arxiv.org/ftp/arxiv/papers/0802/0802.4198.pdf module Melodics.Ukrainian.Common data Triple Z :: Triple O :: Triple T :: Triple isUkrainianL :: Char -> Bool isConsNotJ :: Char -> Bool instance GHC.Show.Show Melodics.Ukrainian.Common.Triple instance GHC.Classes.Ord Melodics.Ukrainian.Common.Triple instance GHC.Classes.Eq Melodics.Ukrainian.Common.Triple -- | Functions provide functionality of a musical instrument synthesizer or -- for Ukrainian speech synthesis especially for poets, translators and -- writers. Is rewritten from the module -- Melodics.ByteString.Ukrainian.Arr for optimization purposes. Phonetic -- material is taken from the : -- -- Solomija Buk, Ján Mačutek, Andrij Rovenchak. Some properties of the -- Ukrainian writing system. [Electronic resource] -- https://arxiv.org/ftp/arxiv/papers/0802/0802.4198.pdf module Melodics.Ukrainian.ArrInt8 -- | Is used to signify the optimization data type of Int8. type Sound8 = Int8 type FlowSound = [Sound8] -- | The function that uses the following correspondence between the -- previous data type UZPP2 and the Sound8. UZ 'A' D дз -- (plain) 8 UZ 'A' K дз (palatalized) 9 UZ 'B' D ж (plain) 10 UZ 'B' K ж -- (semi-palatalized) 11 UZ 'C' S й 27 UZ 'D' N сь 54 UZ 'E' L ч (plain) -- 39 UZ 'E' M ч (semi-palatalized) 40 UZ 'F' L ш (plain) 41 UZ 'F' M ш -- (semi-palatalized) 42 G 55 H 56 I 57 J 58 K 59 L 60 M 61 N нт 62 O ст -- 63 P ть 64 Q дзь 12 R зь 13 S нь 65 T дь 14 UZ 'a' W а 1 UZ 'b' D б -- (plain) 15 UZ 'b' K б (semi-palatalized) 16 UZ 'c' D ц (plain) 38 UZ -- 'd' D д (plain) 17 UZ 'd' K д (palatalized) 18 UZ 'e' W е 2 UZ 'f' L ф -- (plain) 43 UZ 'f' M ф (semi-palatalized) 44 UZ 'g' D ґ (plain) 19 UZ -- 'g' K ґ (semi-palatalized) 20 UZ 'h' D г (plain) 21 UZ 'h' K г -- (semi-palatalized) 22 UZ 'i' W і 6 UZ 'j' D дж (plain) 23 UZ 'j' K дж -- (palatalized) 24 UZ 'k' L к (plain) 45 UZ 'k' M к (semi-palatalized) -- 46 UZ 'l' S л (plain) 28 UZ 'l' O л (palatalized) 29 UZ 'm' S м -- (plain) 30 UZ 'm' O м (semi-palatalized) 31 UZ 'n' S н (plain) 32 UZ -- 'n' O н (palatalized) 33 UZ 'o' W о 3 UZ 'p' L п (plain) 47 UZ 'p' M п -- (semi-palatalized) 48 UZ 'q' E ь 7 UZ 'r' S р (plain) 34 UZ 'r' O р -- (palatalized) 35 UZ 's' L с (plain) 49 UZ 't' L т (plain) 50 UZ 't' M -- т (palatalized) 51 UZ 'u' W у 4 UZ 'v' S в (plain) 36 UZ 'v' O в -- (semi-palatalized) 37 UZ 'w' N ць 66 UZ 'x' L х (plain) 52 UZ 'x' M х -- (semi-palatalized) 53 UZ 'y' W и 5 UZ 'z' D з (plain) 25 UZ 'z' K з -- (palatalized) 26 convertToProperUkrainianI8 :: String -> FlowSound isUkrainianL :: Char -> Bool -- | Can be used to map the Sound8 representation and the -- mmsyn6ukr-array files with some recordings. linkFileNameI8 :: Sound8 -> Char -- | This module works with syllable segmentation in Ukrainian. Uses -- Double whenever possible. Is inspired by the -- DobutokO.Sound.DIS5G6G module from dobutokO2 package. See: -- 'https://hackage.haskell.org/package/dobutokO2-0.43.0.0/docs/DobutokO-Sound-DIS5G6G.html'. -- The initial Double data are gotten from there. module Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 s0DuratD1 :: Sound8 -> Double s0DuratD2 :: Sound8 -> Double s0DuratD3 :: Sound8 -> Double s0DuratD4 :: Sound8 -> Double class (Eq a) => SyllableDurations4 a sDuratsD :: SyllableDurations4 a => a -> Double sDuratsD2 :: SyllableDurations4 a => a -> Double sDuratsD3 :: SyllableDurations4 a => a -> Double sDuratsD4 :: SyllableDurations4 a => a -> Double syllableDurationsGDc :: SyllableDurations4 a => (a -> Double) -> [[[a]]] -> [[Double]] -- | General variant of the syllableDurationsD function. syllableDurationsGD :: (Sound8 -> Double) -> [[[Sound8]]] -> [[Double]] syllableDurationsD :: [[[Sound8]]] -> [[Double]] syllableDurationsD2 :: [[[Sound8]]] -> [[Double]] syllableDurationsD3 :: [[[Sound8]]] -> [[Double]] syllableDurationsD4 :: [[[Sound8]]] -> [[Double]] instance Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8.SyllableDurations4 Melodics.Ukrainian.ArrInt8.Sound8 -- | This module works with syllable segmentation in Ukrainian. It is -- rewritten module MMSyn7.Syllable from the mmsyn7s package : -- https://hackage.haskell.org/package/mmsyn7s The information on -- Ukrainian syllable segmentation 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 module Languages.Phonetic.Ukrainian.Syllable.ArrInt8 -- | Function-predicate isVowel1 checks whether its argument is a -- vowel representation in the Sound8 format. isVowel1 :: Sound8 -> Bool -- | Function-predicate isSonorous1 checks whether its argument is a -- sonorous consonant representation in the Sound8 format. isSonorous1 :: Sound8 -> Bool -- | Function-predicate isVoicedC1 checks whether its argument is a -- voiced consonant representation in the Sound8 format. isVoicedC1 :: Sound8 -> Bool -- | Function-predicate isVoiceless1 checks whether its argument -- is a voiceless consonant representation in the Sound8 format. isVoicelessC1 :: Sound8 -> Bool -- | Binary function-predicate isNotVowel2 checks whether its -- arguments are both consonant representations in the Sound8 -- format. isNotVowel2 :: Sound8 -> Sound8 -> Bool -- | Function sndGroups converts a Ukrainian word being a list of -- Sound8 to the list of phonetically similar (consonants grouped -- with consonants and each vowel separately) sounds representations in -- Sound8 format. sndGroups :: FlowSound -> [FlowSound] groupSnds :: FlowSound -> [FlowSound] -- | Function divCnsnts 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 divCnsnts :: FlowSound -> (FlowSound -> FlowSound, FlowSound -> FlowSound) reSyllableCntnts :: [FlowSound] -> [FlowSound] divVwls :: [FlowSound] -> [FlowSound] createSyllablesUkrS :: String -> [[FlowSound]] -- | Binary function-predicate notEqC checks whether its arguments -- are not the same consonant sound representations (not taking -- palatalization into account). notEqC :: Sound8 -> Sound8 -> Bool -- | Function representProlonged converts duplicated consequent in -- the syllable consonants so that they are represented by just one -- Sound8. After applying the function to the list of -- Sound8 being a syllable all groups of duplicated consequent -- consonants in every syllable are represented with only one -- Sound8 respectively. representProlonged :: FlowSound -> FlowSound -- | Functions provide functionality of a musical instrument synthesizer or -- for Ukrainian speech synthesis especially for poets, translators and -- writers. Is rewritten from the module Melodics.Ukrainian from the -- mmsyn6ukr package : -- 'https://hackage.haskell.org/package/mmsyn6ukr' Phonetic -- material is taken from the : -- -- Solomija Buk, Ján Mačutek, Andrij Rovenchak. Some properties of the -- Ukrainian writing system. [Electronic resource] -- https://arxiv.org/ftp/arxiv/papers/0802/0802.4198.pdf The code -- here is less optimized in time then in the new corresponding module -- Melodics.ByteString.Ukrainian.ArrInt8. It will be moved to the new -- package after the upgrading the -- phonetic-languages-simplified-examples-array to the new optimized -- modules. module Melodics.ByteString.Ukrainian.Arr convertToProperUkrainianS :: String -> String -- | A variant of the convertToProperUkrainian with the -- ByteString result. convertToProperUkrainianB :: String -> ByteString isUkrainianL :: Char -> Bool linkFileName :: Char -> Char showInteresting :: String -> ByteString -- | This module works with syllable segmentation in Ukrainian. It is -- rewritten module MMSyn7.Syllable from the mmsyn7s package : -- https://hackage.haskell.org/package/mmsyn7s module Languages.Phonetic.Ukrainian.Syllable.Arr data UZPP a b UZ :: a -> b -> UZPP a b data PhoneticType W :: PhoneticType S :: PhoneticType O :: PhoneticType D :: PhoneticType K :: PhoneticType L :: PhoneticType M :: PhoneticType N :: PhoneticType E :: PhoneticType type UZPP2 = UZPP Char PhoneticType phoneType :: UZPP2 -> PhoneticType charUkr :: UZPP2 -> Char str2UZPP2s :: String -> [UZPP2] -- | Function-predicate isVowel1 checks whether its argument is a -- vowel representation in the UZPP2 format. isVowel1 :: UZPP2 -> Bool -- | Function-predicate isVwl checks whether its argument is a vowel -- representation in the Char format. isVwl :: Char -> Bool -- | Function-predicate isSonorous1 checks whether its argument is a -- sonorous consonant representation in the UZPP2 format. isSonorous1 :: UZPP2 -> Bool -- | Function-predicate isVoicedC1 checks whether its argument is a -- voiced consonant representation in the UZPP2 format. isVoicedC1 :: UZPP2 -> Bool -- | Function-predicate isVoiceless1 checks whether its argument -- is a voiceless consonant representation in the UZPP2 format. isVoicelessC1 :: UZPP2 -> Bool -- | Binary function-predicate isNotVowel2 checks whether its -- arguments are both consonant representations in the UZPP2 -- format. isNotVowel2 :: UZPP2 -> UZPP2 -> Bool -- | Binary function-predicate notEqC checks whether its arguments -- are not the same consonant sound representations (not taking -- palatalization into account). notEqC :: UZPP2 -> UZPP2 -> Bool -- | Function sndGroups converts a Ukrainian word being a list of -- UZPP2 to the list of phonetically similar (consonants grouped -- with consonants and each vowel separately) sounds representations in -- UZPP2 format. sndGroups :: [UZPP2] -> [[UZPP2]] groupSnds :: [UZPP2] -> [[UZPP2]] -- | Function divCnsnts 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 divCnsnts :: [UZPP2] -> ([UZPP2] -> [UZPP2], [UZPP2] -> [UZPP2]) reSyllableCntnts :: [[UZPP2]] -> [[UZPP2]] divVwls :: [[UZPP2]] -> [[UZPP2]] createSyllablesUkrS :: String -> [[[UZPP2]]] -- | Function representProlonged converts duplicated consequent in -- the syllable consonants so that they are represented by just one -- UZPP2. After applying the function to the list of UZPP2 -- being a syllable all groups of duplicated consequent consonants in -- every syllable are represented with only one UZPP2 -- respectively. representProlonged :: [UZPP2] -> [UZPP2] -- | Is inspired by the DobutokO.Sound.DIS5G6G module from -- dobutokO2 package. See: -- 'https://hackage.haskell.org/package/dobutokO2-0.43.0.0/docs/DobutokO-Sound-DIS5G6G.html'. -- The Float data are gotten from there. -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. str2Durat1 :: String -> Float -- | Just another possible duration approximation obtained by usage of the -- r-glpk-phonetic-languages-ukrainian-durations package -- https://hackage.haskell.org/package/r-glpk-phonetic-languages-ukrainian-durations. -- It is generated for the set of the words-durations pairs that the -- words contents (Char) converts to the elements of the -- "ABCEFXYabcdefghijklmnopqrstuvxyz" (for more information, pleas, refer -- to the -- https://hackage.haskell.org/package/r-glpk-phonetic-languages-ukrainian-durations). -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. uzpp2Durat2 :: UZPP2 -> Float -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. uzpp2Durat1 :: UZPP2 -> Float -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. uzpp2Durat3 :: UZPP2 -> Float -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. uzpp2Durat4 :: UZPP2 -> Float -- | General variant of the syllableDurations function with the -- arbitrary uzpp2Durat1-like function. -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. syllableDurationsG :: (UZPP2 -> Float) -> [[[UZPP2]]] -> [[Float]] -- | Returns list of lists, every inner one of which contains approximate -- durations of the Ukrainian syllables. -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. syllableDurations :: [[[UZPP2]]] -> [[Float]] -- | Likewise syllableDurations, but uses uzpp2Durat2 instead -- of uzpp2Durat1. -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. syllableDurations2 :: [[[UZPP2]]] -> [[Float]] -- | Likewise syllableDurations, but uses uzpp2Durat3 instead -- of uzpp2Durat1. -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. syllableDurations3 :: [[[UZPP2]]] -> [[Float]] -- | Likewise syllableDurations, but uses uzpp2Durat4 instead -- of uzpp2Durat1. -- | Deprecated: Please, if possible, use the corresponding functions -- from the Languages.Phonetic.Ukrainian.Syllable.Double.Arr module. syllableDurations4 :: [[[UZPP2]]] -> [[Float]] instance (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (Languages.Phonetic.Ukrainian.Syllable.Arr.UZPP a b) instance GHC.Classes.Ord Languages.Phonetic.Ukrainian.Syllable.Arr.PhoneticType instance GHC.Classes.Eq Languages.Phonetic.Ukrainian.Syllable.Arr.PhoneticType instance GHC.Show.Show (Languages.Phonetic.Ukrainian.Syllable.Arr.UZPP GHC.Types.Char Languages.Phonetic.Ukrainian.Syllable.Arr.PhoneticType) instance (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (Languages.Phonetic.Ukrainian.Syllable.Arr.UZPP a b) -- | This module works with syllable segmentation in Ukrainian. Uses -- Double whenever possible. module Languages.Phonetic.Ukrainian.Syllable.Double.Arr -- | Is inspired by the DobutokO.Sound.DIS5G6G module from -- dobutokO2 package. See: -- 'https://hackage.haskell.org/package/dobutokO2-0.43.0.0/docs/DobutokO-Sound-DIS5G6G.html'. -- The Double data are gotten from there. str2DuratD1 :: String -> Double -- | Just another possible duration approximation obtained by usage of the -- r-glpk-phonetic-languages-ukrainian-durations package -- https://hackage.haskell.org/package/r-glpk-phonetic-languages-ukrainian-durations. -- It is generated for the set of the words-durations pairs that the -- words contents (Char) converts to the elements of the -- "ABCEFXYabcdefghijklmnopqrstuvxyz" (for more information, pleas, refer -- to the -- https://hackage.haskell.org/package/r-glpk-phonetic-languages-ukrainian-durations). uzpp2DuratD2 :: UZPP2 -> Double uzpp2DuratD1 :: UZPP2 -> Double uzpp2DuratD3 :: UZPP2 -> Double uzpp2DuratD4 :: UZPP2 -> Double -- | General variant of the syllableDurationsD function with the -- arbitrary uzpp2DuratD1-like function. syllableDurationsGD :: (UZPP2 -> Double) -> [[[UZPP2]]] -> [[Double]] -- | Returns list of lists, every inner one of which contains approximate -- durations of the Ukrainian syllables. syllableDurationsD :: [[[UZPP2]]] -> [[Double]] -- | Likewise syllableDurations, but uses uzpp2DuratD2 -- instead of uzpp2DuratD1. syllableDurationsD2 :: [[[UZPP2]]] -> [[Double]] -- | Likewise syllableDurations, but uses uzpp2DuratD3 -- instead of uzpp2DuratD1. syllableDurationsD3 :: [[[UZPP2]]] -> [[Double]] -- | Likewise syllableDurations, but uses uzpp2DuratD4 -- instead of uzpp2DuratD1. syllableDurationsD4 :: [[[UZPP2]]] -> [[Double]]