Copyright | (c) Oleksandr Zhabenko 2020-2024 |
---|---|
License | MIT |
Maintainer | oleksandr.zhabenko@yahoo.com |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Extensions | StrictData |
Aftovolio.RGLPK.General
Description
Can be used to calculate the durations of the approximations of the 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 phonetic language 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 sorted list of the Char
representations of the phonetic language phenomenae.
The length of the String
js is refered to as lng
::Int
. The number of pairs'
function elements in the lists is refered to
as nn
::Int
. The number of constraints is refered here as nc
::Int
. nc == nn
.quot
2
Is generalized from the Numeric.Wrapper.R.GLPK.Phonetics.Ukrainian.Durations module from
the r-glpk-phonetic-languages-ukrainian-durations
package.
Synopsis
- createCoeffsObj :: Int -> [String] -> [Double]
- countCharInWords :: [String] -> Char -> [Int]
- matrix1Column :: PairwiseC -> [String] -> String -> Char -> [Int]
- pairwiseComparings :: Char -> PairwiseC -> [Int] -> [Int]
- data PairwisePL = PW Char Int [Int]
- lengthPW :: PairwisePL -> Int
- charPW :: PairwisePL -> Char
- listPW :: PairwisePL -> [Int]
- data PairwiseC = LL [PairwisePL] Int
- isCorrectPWC :: PairwiseC -> Bool
- pwsC :: PairwiseC -> [PairwisePL]
- pairs' :: PairwiseC -> Char -> [Int]
- matrixLine :: Int -> PairwiseC -> [String] -> String -> String
- objLine :: Int -> [(Int, Int)] -> Array Int Double -> String
- objCoeffsNew :: Int -> [(Int, Int)] -> Array Int Double -> [Double]
- maxLine :: String
- dirLine :: Int -> Int -> [String] -> String -> String
- rhsLineG :: [Double] -> [Double] -> [Double] -> String
- rhsLine :: Int -> Int -> Double -> Double -> Double -> Double -> [Int] -> [Int] -> [Double] -> [Double] -> String
- constraintsR1 :: Int -> [Double]
- minDurations :: Int -> Double -> Double -> Double -> [Int] -> [Int] -> [Double]
- maxDurations :: Int -> Double -> [Double]
- answer :: Int -> Int -> PairwiseC -> Double -> [(Int, Int)] -> Double -> Double -> Double -> [Int] -> [Int] -> Array Int Double -> [String] -> [Double] -> [Double] -> String -> String
- answer2 :: Int -> Int -> PairwiseC -> Double -> [(Int, Int)] -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> [Int] -> [Int] -> Array Int Double -> [String] -> [Double] -> [Double] -> String -> String
Documentation
data PairwisePL Source #
A way to encode the pairs of the phonetic language representations that give some additional associations, connections
between elements, usually being caused by some similarity or commonality of the pronunciation act for the phenomenae
corresponding to these elements.
All [Int
] must be equal in length
throughout the same namespace and this length is given as Int
argument in
the PairwisePL
. This Int
parameter is nn
.
Instances
Read PairwisePL Source # | |
Defined in Aftovolio.RGLPK.General Methods readsPrec :: Int -> ReadS PairwisePL # readList :: ReadS [PairwisePL] # readPrec :: ReadPrec PairwisePL # readListPrec :: ReadPrec [PairwisePL] # | |
Show PairwisePL Source # | |
Defined in Aftovolio.RGLPK.General Methods showsPrec :: Int -> PairwisePL -> ShowS # show :: PairwisePL -> String # showList :: [PairwisePL] -> ShowS # | |
Eq PairwisePL Source # | |
Defined in Aftovolio.RGLPK.General |
lengthPW :: PairwisePL -> Int Source #
charPW :: PairwisePL -> Char Source #
listPW :: PairwisePL -> [Int] Source #
Constructors
LL [PairwisePL] Int |
isCorrectPWC :: PairwiseC -> Bool Source #
pwsC :: PairwiseC -> [PairwisePL] Source #
Arguments
:: Int | The number of |
-> PairwiseC | Actually the data type value that sets the behaviour of the |
-> [String] | |
-> String | A sorted list of the |
-> String |
Actually n
is a length
bss.
Arguments
:: Int | The length of the |
-> [(Int, Int)] | List of pairs of indices that shows how the input data is related to the representation (which coefficients relates to which representation elements). |
-> Array Int Double | An array of coefficients. |
-> String |
Arguments
:: Int | The length of the |
-> [(Int, Int)] | List of pairs of indices that shows how the input data is related to the representation (which coefficients relates to which representation elements). |
-> Array Int Double | An array of coefficients. |
-> [Double] |
A way to reorder the coefficients of the input and the elements representations related to each other.
Arguments
:: Int | The length of the |
-> Int | The number of |
-> [String] | An argument of the |
-> String | A sorted list of the |
-> String |
Arguments
:: Int | The length of the |
-> Int | The number of |
-> Double | Maximum duration of the phonetic language element representation in seconds. |
-> Double | A minimum positive duration value for some group of phonetic language representation (usually, some sorts of phonemes, e. g. vowels) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for some *special* group of phonetic language representation (usually, some sorts of phonemes, e. g. soft sign representation) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for all other phonetic language representations (usually, some sorts of phonemes) to set a general (common) behaviour for the set of resulting values. |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the some group of representations (e. g. vowels). |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the special group of representations (e. g. soft sign). |
-> [Double] | |
-> [Double] | |
-> String |
constraintsR1 :: Int -> [Double] Source #
Arguments
:: Int | The length of the |
-> Double | A minimum positive duration value for some group of phonetic language representation (usually, some sorts of phonemes, e. g. vowels) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for some *special* group of phonetic language representation (usually, some sorts of phonemes, e. g. soft sign representation) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for all other phonetic language representations (usually, some sorts of phonemes) to set a general (common) behaviour for the set of resulting values. |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the some group of representations (e. g. vowels). |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the special group of representations (e. g. soft sign). |
-> [Double] |
Arguments
:: Int | The length of the |
-> Int | The number of |
-> PairwiseC | Actually the data type value that sets the behaviour of the |
-> Double | Maximum duration of the phonetic language element representation in seconds. |
-> [(Int, Int)] | List of pairs of indices that shows how the input data is related to the representation (which coefficients relates to which representation elements). |
-> Double | A minimum positive duration value for some group of phonetic language representation (usually, some sorts of phonemes, e. g. vowels) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for some *special* group of phonetic language representation (usually, some sorts of phonemes, e. g. soft sign representation) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for all other phonetic language representations (usually, some sorts of phonemes) to set a general (common) behaviour for the set of resulting values. |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the some group of representations (e. g. vowels). |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the special group of representations (e. g. soft sign). |
-> Array Int Double | An array of coefficients. |
-> [String] | An argument of the |
-> [Double] | |
-> [Double] | |
-> String | A sorted list of the |
-> String |
A variant of the more general answer2
where the predefined randomization parameters are used to produce every time being run
a new result (e. g. this allows to model accents).
Arguments
:: Int | The length of the |
-> Int | The number of |
-> PairwiseC | Actually the data type value that sets the behaviour of the |
-> Double | Maximum duration of the phonetic language element representation in seconds. |
-> [(Int, Int)] | List of pairs of indices that shows how the input data is related to the representation (which coefficients relates to which representation elements). |
-> Double | A maximum in absolute value (being, usually, a negative one) possible random deviation from the computed value to be additionally applied to emulate 'more natural' behaviour and to get every time while running new sets of values. |
-> Double | A maximum in absolute value (being, usually, a positive one) possible random deviation from the computed value to be additionally applied to emulate 'more natural' behaviour and to get every time while running new sets of values. |
-> Double | A minimum in absolute value (being, usually, a negative one) possible random deviation from the computed value to be additionally applied to emulate 'more natural' behaviour and to get every time while running new sets of values. |
-> Double | A minimum in absolute value (being, usually, a positive one) possible random deviation from the computed value to be additionally applied to emulate 'more natural' behaviour and to get every time while running new sets of values. |
-> Double | A minimum positive duration value for some group of phonetic language representation (usually, some sorts of phonemes, e. g. vowels) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for some *special* group of phonetic language representation (usually, some sorts of phonemes, e. g. soft sign representation) to set some peculiar behaviour for the set of resulting values. |
-> Double | A minimum positive duration value for all other phonetic language representations (usually, some sorts of phonemes) to set a general (common) behaviour for the set of resulting values. |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the some group of representations (e. g. vowels). |
-> [Int] | A list of indices of the phonetic languages representations in their sorted in ascending order sequence that corresponds to the elements from the special group of representations (e. g. soft sign). |
-> Array Int Double | An array of coefficients. |
-> [String] | An argument of the |
-> [Double] | |
-> [Double] | |
-> String | A sorted list of the |
-> String |