{-# LANGUAGE BangPatterns #-}
module Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2 where
import CaseBi.Arr (getBFstL')
import Phonetic.Languages.Simplified.DataG.Base
import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2
import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2
chooseMax :: (Ord c) => (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
chooseMax :: (Double -> c) -> Coeffs2 -> String -> FuncRep2 String Double c
chooseMax Double -> c
g Coeffs2
coeffs String
choice
| Int -> String -> String
forall a. Int -> [a] -> [a]
take Int
1 String
choice String -> String -> Bool
forall a. Eq a => a -> a -> Bool
== String
"c" = Double
-> (Double -> c) -> String -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double
-> (Double -> c) -> String -> Coeffs2 -> FuncRep2 String Double c
procRhythmicity23F Double
1.3 Double -> c
g String
choice Coeffs2
coeffs
| Bool -> [(String, Bool)] -> String -> Bool
forall a b. Ord a => b -> [(a, b)] -> a -> b
getBFstL' Bool
False ([String] -> [Bool] -> [(String, Bool)]
forall a b. [a] -> [b] -> [(a, b)]
zip [String
"02y",String
"02z",String
"03y",String
"03z",String
"04y",String
"04z",String
"0y",String
"0z",String
"s01",String
"s02",String
"s03",String
"s04",String
"s11",
String
"s12",String
"s12",String
"s13",String
"s14",String
"s21",String
"s22",String
"s23",String
"s24",String
"s31",String
"s32",String
"s33",String
"s34",String
"s41",String
"s42",String
"s43",String
"s44",
String
"s51",String
"s52",String
"s53",String
"s54",String
"s61",String
"s62",String
"s63",String
"s64",String
"s71",String
"s72",String
"s74",String
"t01",String
"t02",String
"t03",String
"t04",String
"t11",
String
"t12",String
"t13",String
"t14",String
"t21",String
"t22",String
"t23",String
"t24",String
"t31",String
"t32",String
"t33",String
"t34",String
"t41",String
"t42",String
"t43",String
"t44",String
"t51",
String
"t52",String
"t53",String
"t54",String
"t61",String
"t62",String
"t63",String
"t64",String
"t71",String
"t72",String
"t73",String
"t74",String
"u01",String
"u02",String
"u03",String
"u04",String
"u11",
String
"u12",String
"u13",String
"u14",String
"u21",String
"u21",String
"u22",String
"u23",String
"u24",String
"u31",String
"u32",String
"u33",String
"u34",String
"u41",String
"u42",String
"u43",String
"u44",
String
"u51",String
"u52",String
"u53",String
"u54",String
"u61",String
"u62",String
"u63",String
"u64",String
"u71",String
"u72",String
"u73",String
"u74",String
"v01",String
"v02",String
"v03",String
"v04",
String
"v11",String
"v12",String
"v13",String
"v14",String
"v21",String
"v22",String
"v23",String
"v24",String
"v31",String
"v32",String
"v33",String
"v34",String
"v41",String
"v42",String
"v43",String
"v44",
String
"v51",String
"v52",String
"v53",String
"v54",String
"v61",String
"v62",String
"v63",String
"v64",String
"v71",String
"v72",String
"v74",String
"w01",String
"w02",String
"w03",String
"w04",String
"w11",
String
"w12",String
"w13",String
"w14",String
"w21",String
"w22",String
"w23",String
"w24",String
"w31",String
"w32",String
"w33",String
"w34",String
"x01",String
"x02",String
"x03",String
"x04",String
"x11",
String
"x12",String
"x13",String
"x14",String
"x21",String
"x22",String
"x23",String
"x24",String
"x31",String
"x32",String
"x33",String
"x34"] ([Bool] -> [(String, Bool)])
-> (Bool -> [Bool]) -> Bool -> [(String, Bool)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Bool -> [Bool]
forall a. Int -> a -> [a]
replicate Int
1000 (Bool -> [(String, Bool)]) -> Bool -> [(String, Bool)]
forall a b. (a -> b) -> a -> b
$ Bool
True) String
choice =
Double
-> (Double -> c) -> String -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double
-> (Double -> c) -> String -> Coeffs2 -> FuncRep2 String Double c
procRhythmicity23F Double
1.3 Double -> c
g String
choice Coeffs2
coeffs
| Bool
otherwise = FuncRep2 String Double c
-> [(String, FuncRep2 String Double c)]
-> String
-> FuncRep2 String Double c
forall a b. Ord a => b -> [(a, b)] -> a -> b
getBFstL' ((Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth4InvF Double -> c
g Coeffs2
coeffs) [(String
"y",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBothF Double -> c
g Coeffs2
coeffs),(String
"y0",(Double -> c) -> FuncRep2 String Double c
forall c. Ord c => (Double -> c) -> FuncRep2 String Double c
procDiverse2F Double -> c
g),
(String
"y2",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth2F Double -> c
g Coeffs2
coeffs),(String
"y3",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth3F Double -> c
g Coeffs2
coeffs), (String
"y4",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth4F Double -> c
g Coeffs2
coeffs),
(String
"yy",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBothInvF Double -> c
g Coeffs2
coeffs),(String
"yy2",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth2InvF Double -> c
g Coeffs2
coeffs),(String
"yy3",(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
(Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth3InvF Double -> c
g Coeffs2
coeffs),
(String
"z",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBothFF Double
1.3 Double -> c
g Coeffs2
coeffs),(String
"z2",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth2FF Double
1.3 Double -> c
g Coeffs2
coeffs),
(String
"z3",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth3FF Double
1.3 Double -> c
g Coeffs2
coeffs), (String
"z4",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth4FF Double
1.3 Double -> c
g Coeffs2
coeffs),
(String
"zz",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBothInvFF Double
1.3 Double -> c
g Coeffs2
coeffs),(String
"zz2",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth2InvFF Double
1.3 Double -> c
g Coeffs2
coeffs),
(String
"zz3",Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth3InvFF Double
1.3 Double -> c
g Coeffs2
coeffs),(String
"zz4", Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
forall c.
Ord c =>
Double -> (Double -> c) -> Coeffs2 -> FuncRep2 String Double c
procBoth4InvFF Double
1.3 Double -> c
g Coeffs2
coeffs)] String
choice
precChoice :: String -> Maybe Int
precChoice :: String -> Maybe Int
precChoice = Maybe Int -> [(String, Maybe Int)] -> String -> Maybe Int
forall a b. Ord a => b -> [(a, b)] -> a -> b
getBFstL' (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
4) [(String
"02y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"02z",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"03y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"03z",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"04y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),
(String
"04z",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"0y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"0z",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y0",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y2",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"y3",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0), (String
"y4",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),
(String
"z",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"z0",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"z2",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0),(String
"z3",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0), (String
"z4",Int -> Maybe Int
forall a. a -> Maybe a
Just Int
0)]