Copyright | (c) OleksandrZhabenko 2020-2023 |
---|---|
License | MIT |
Maintainer | oleksandr.zhabenko@yahoo.com |
Stability | Experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Can be used to calculate the durations of the approximations of the Ukrainian phonemes using some prepared text with its correct (at least mostly) pronunciation. The prepared text is located in the same directory and contains lines --- the Ukrainian word and its duration in seconds separated with whitespace. The library is intended to use the functionality of the :
1) R programming language https://www.r-project.org/
2) Rglpk library https://cran.r-project.org/web/packages/Rglpk/index.html
3) GNU GLPK library https://www.gnu.org/software/glpk/glpk.html
For more information, please, see the documentation for them.
For the model correctness the js here refers to "ABCEFXYabcdefghijklmnopqrstuvxyz". To get such js some of the Ukrainian words in the abovementioned file must contain an apostrophe and there should be somewhat like "їх_друг".
Synopsis
- createCoeffsObj :: Int -> [String] -> [Double]
- countCharInWords :: [String] -> Char -> [Int]
- matrix1Column :: [String] -> String -> Char -> [Int]
- pairwiseComparings :: Char -> [Int] -> [Int]
- pairs' :: Char -> [Int]
- matrixLine :: [String] -> String -> Int -> String
- objLine :: Array Int Double -> String
- objCoeffs :: Array Int Double -> [Double]
- maxLine :: String
- dirLine :: [String] -> String -> String
- rhsLineG :: [Double] -> [Double] -> [Double] -> String
- rhsLine :: [Double] -> [Double] -> String
- constraintsR1 :: Int -> [Double]
- minDurations :: [Double]
- maxDurations :: [Double]
- answer :: Array Int Double -> [String] -> [Double] -> [Double] -> String -> String
- answer2 :: Double -> Double -> Double -> Double -> Array Int Double -> [String] -> [Double] -> [Double] -> String -> String
- charReplace :: [Char] -> [Char]
- s8toChar :: Int8 -> Char
Documentation
pairs' :: Char -> [Int] Source #
Changed the 'f' -- 'v' ('ф' -- 'в') proportions. The Ukrainian 'в' is almost always shorter than 'ф'.
Since: 0.3.0.0
objLine :: Array Int Double -> String Source #
Switched to the array representation as the cheaper one.
Since: 0.3.0.0
objCoeffs :: Array Int Double -> [Double] Source #
Switched to the array representation as the cheaper one.
Since: 0.3.0.0
constraintsR1 :: Int -> [Double] Source #
minDurations :: [Double] Source #
maxDurations :: [Double] Source #
answer :: Array Int Double -> [String] -> [Double] -> [Double] -> String -> String Source #
A variant of the more general answer2
where the randomization parameters are used to produce every time being run a new result (e. g. this
allows to model accents).
answer2 :: Double -> Double -> Double -> Double -> Array Int Double -> [String] -> [Double] -> [Double] -> String -> String Source #
charReplace :: [Char] -> [Char] Source #