{-# LANGUAGE CPP, BangPatterns #-}
module Languages.UniquenessPeriods.Vector.PropertiesFuncRepG (
procDiverse2I
, procDiverse2Ineg
, procDiverse2F
, procDiverse2Fneg
, procRhythmicity23F
, procRhythmicity23Fneg
, procBothF
, procBothFneg
, procBothInvF
, procBothInvFneg
, procRhythmicity232F
, procRhythmicity232Fneg
, procBoth2F
, procBoth2Fneg
, procBoth2InvF
, procBoth2InvFneg
) where
#ifdef __GLASGOW_HASKELL__
#if __GLASGOW_HASKELL__>=710
/* code that applies only to GHC 7.10.* and higher versions */
import GHC.Base (mconcat)
#endif
#endif
import GHC.Int
import qualified Data.Vector as VB
import qualified Data.Vector.Unboxed as V
import String.Languages.UniquenessPeriods.VectorG
import Languages.UniquenessPeriods.Vector.PropertiesSyllablesG
import Languages.UniquenessPeriods.Vector.PropertiesG
import Languages.Rhythmicity
import Languages.UniquenessPeriods.Vector.DataG
import GHC.Float (int2Float)
import Melodics.ByteString.Ukrainian
import Languages.Phonetic.Ukrainian.Syllable
import Data.Maybe (isNothing,fromMaybe)
import Text.Read (readMaybe)
#ifdef __GLASGOW_HASKELL__
#if __GLASGOW_HASKELL__==708
/* code that applies only to GHC 7.8.* */
mconcat = concat
#endif
#endif
procDiverse2I :: FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Int16]
procDiverse2I :: FuncRep (Vector Char) (UniquenessGeneral2 Char) [Int16]
procDiverse2I = (Vector Char -> UniquenessGeneral2 Char)
-> (UniquenessGeneral2 Char -> [Int16])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Int16]
forall a b c. (a -> b) -> (b -> c) -> FuncRep a b c
D2 ([Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> (Vector Char -> Vector Char)
-> Vector Char
-> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> Vector Char
convertToProperUkrainianV2X) ((Int16 -> [Int16] -> [Int16]
forall a. a -> [a] -> [a]
:[]) (Int16 -> [Int16])
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> [Int16]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2)
{-# INLINE procDiverse2I #-}
procDiverse2Ineg :: FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Int16]
procDiverse2Ineg :: FuncRep (Vector Char) (UniquenessGeneral2 Char) [Int16]
procDiverse2Ineg = (Vector Char -> UniquenessGeneral2 Char)
-> (UniquenessGeneral2 Char -> [Int16])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Int16]
forall a b c. (a -> b) -> (b -> c) -> FuncRep a b c
D2 ([Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> (Vector Char -> Vector Char)
-> Vector Char
-> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> Vector Char
convertToProperUkrainianV2X) ((Int16 -> [Int16] -> [Int16]
forall a. a -> [a] -> [a]
:[]) (Int16 -> [Int16])
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> [Int16]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int16
forall a. Num a => a -> a
negate (Int16 -> Int16)
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> Int16
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2)
{-# INLINE procDiverse2Ineg #-}
procDiverse2F :: FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procDiverse2F :: FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procDiverse2F = (Vector Char -> UniquenessGeneral2 Char)
-> (UniquenessGeneral2 Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> b) -> (b -> c) -> FuncRep a b c
D2 ([Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> (Vector Char -> Vector Char)
-> Vector Char
-> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> Vector Char
convertToProperUkrainianV2X) ((Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) (Float -> [Float])
-> (UniquenessGeneral2 Char -> Float)
-> UniquenessGeneral2 Char
-> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Float
int2Float (Int -> Float)
-> (UniquenessGeneral2 Char -> Int)
-> UniquenessGeneral2 Char
-> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int
forall a. Enum a => a -> Int
fromEnum (Int16 -> Int)
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2)
{-# INLINE procDiverse2F #-}
procDiverse2Fneg :: FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procDiverse2Fneg :: FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procDiverse2Fneg = (Vector Char -> UniquenessGeneral2 Char)
-> (UniquenessGeneral2 Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> b) -> (b -> c) -> FuncRep a b c
D2 ([Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> (Vector Char -> Vector Char)
-> Vector Char
-> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> Vector Char
convertToProperUkrainianV2X) ((Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) (Float -> [Float])
-> (UniquenessGeneral2 Char -> Float)
-> UniquenessGeneral2 Char
-> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Float
int2Float (Int -> Float)
-> (UniquenessGeneral2 Char -> Int)
-> UniquenessGeneral2 Char
-> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int
forall a. Num a => a -> a
negate (Int -> Int)
-> (UniquenessGeneral2 Char -> Int)
-> UniquenessGeneral2 Char
-> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int
forall a. Enum a => a -> Int
fromEnum (Int16 -> Int)
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2)
{-# INLINE procDiverse2Fneg #-}
procRhythmicity23F :: String -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity23F :: [Char]
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity23F [Char]
choice Coeffs2
coeffs = [Char]
-> ([Char] -> Coeffs2 -> Vector Char -> Float)
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23F [Char]
choice [Char] -> Coeffs2 -> Vector Char -> Float
rhythmicityV Coeffs2
coeffs
{-# INLINE procRhythmicity23F #-}
procRhythmicity23Fneg :: String -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity23Fneg :: [Char]
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity23Fneg [Char]
choice Coeffs2
coeffs = [Char]
-> ([Char] -> Coeffs2 -> Vector Char -> Float)
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23Fneg [Char]
choice [Char] -> Coeffs2 -> Vector Char -> Float
rhythmicityV Coeffs2
coeffs
{-# INLINE procRhythmicity23Fneg #-}
procBothF :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBothF :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBothF Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2F [[[UZPP2]]] -> [[Float]]
syllableDurations Coeffs2
coeffs
{-# INLINE procBothF #-}
procBothFneg :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBothFneg :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBothFneg Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2Fneg [[[UZPP2]]] -> [[Float]]
syllableDurations Coeffs2
coeffs
{-# INLINE procBothFneg #-}
procBothInvF :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBothInvF :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBothInvF Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvF [[[UZPP2]]] -> [[Float]]
syllableDurations Coeffs2
coeffs
{-# INLINE procBothInvF #-}
procBothInvFneg :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBothInvFneg :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBothInvFneg Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvFneg [[[UZPP2]]] -> [[Float]]
syllableDurations Coeffs2
coeffs
{-# INLINE procBothInvFneg #-}
procRhythmicity232F :: String -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity232F :: [Char]
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity232F [Char]
choice Coeffs2
coeffs = [Char]
-> ([Char] -> Coeffs2 -> Vector Char -> Float)
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23F [Char]
choice [Char] -> Coeffs2 -> Vector Char -> Float
rhythmicityV Coeffs2
coeffs
{-# INLINE procRhythmicity232F #-}
procRhythmicity232Fneg :: String -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity232Fneg :: [Char]
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythmicity232Fneg [Char]
choice Coeffs2
coeffs = [Char]
-> ([Char] -> Coeffs2 -> Vector Char -> Float)
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23Fneg [Char]
choice [Char] -> Coeffs2 -> Vector Char -> Float
rhythmicityV Coeffs2
coeffs
{-# INLINE procRhythmicity232Fneg #-}
procBoth2F :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2F :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2F Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2F [[[UZPP2]]] -> [[Float]]
syllableDurations2 Coeffs2
coeffs
{-# INLINE procBoth2F #-}
procBoth2Fneg :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2Fneg :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2Fneg Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2Fneg [[[UZPP2]]] -> [[Float]]
syllableDurations2 Coeffs2
coeffs
{-# INLINE procBoth2Fneg #-}
procBoth2InvF :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2InvF :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2InvF Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvF [[[UZPP2]]] -> [[Float]]
syllableDurations2 Coeffs2
coeffs
{-# INLINE procBoth2InvF #-}
procBoth2InvFneg :: Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2InvFneg :: Coeffs2 -> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procBoth2InvFneg Coeffs2
coeffs = ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvFneg [[[UZPP2]]] -> [[Float]]
syllableDurations2 Coeffs2
coeffs
{-# INLINE procBoth2InvFneg #-}
eval23Coeffs :: Coeffs2 -> [Float] -> Float
eval23Coeffs :: Coeffs2 -> [Float] -> Float
eval23Coeffs (CF2 Maybe Float
x Maybe Float
y) = Float -> Float -> [Float] -> Float
forall a. (RealFrac a, Floating a) => a -> a -> [a] -> a
evalRhythmicity23K (Float -> Maybe Float -> Float
forall a. a -> Maybe a -> a
fromMaybe Float
1.0 Maybe Float
x) (Float -> Maybe Float -> Float
forall a. a -> Maybe a -> a
fromMaybe Float
1.0 Maybe Float
y)
eval23Coeffs Coeffs2
CF0 = [Float] -> Float
forall a. (RealFrac a, Floating a) => [a] -> a
evalRhythmicity23
procRhythm23F :: String -> (String -> Coeffs2 -> VB.Vector Char -> Float) -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23F :: [Char]
-> ([Char] -> Coeffs2 -> Vector Char -> Float)
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23F [Char]
choice [Char] -> Coeffs2 -> Vector Char -> Float
g Coeffs2
coeffs = (Vector Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> c) -> FuncRep a b c
U1 ((Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) (Float -> [Float])
-> (Vector Char -> Float) -> Vector Char -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Coeffs2 -> Vector Char -> Float
g [Char]
choice Coeffs2
coeffs)
{-# INLINE procRhythm23F #-}
procRhythm23Fneg :: String -> (String -> Coeffs2 -> VB.Vector Char -> Float) -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23Fneg :: [Char]
-> ([Char] -> Coeffs2 -> Vector Char -> Float)
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procRhythm23Fneg [Char]
choice [Char] -> Coeffs2 -> Vector Char -> Float
g Coeffs2
coeffs = (Vector Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> c) -> FuncRep a b c
U1 ((Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) (Float -> [Float])
-> (Vector Char -> Float) -> Vector Char -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Float -> Float
forall a. Num a => a -> a
negate (Float -> Float) -> (Vector Char -> Float) -> Vector Char -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Coeffs2 -> Vector Char -> Float
g [Char]
choice Coeffs2
coeffs)
{-# INLINE procRhythm23Fneg #-}
procB2F :: ([[[UZPP2]]] -> [[Float]]) -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procB2F :: ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2F [[[UZPP2]]] -> [[Float]]
g Coeffs2
coeffs = (Vector Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> c) -> FuncRep a b c
U1 (\Vector Char
v -> let ys :: [Char]
ys = Vector Char -> [Char]
convertToProperUkrainianV2S (Vector Char -> [Char])
-> (Vector Char -> Vector Char) -> Vector Char -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Char) -> Vector Char -> Vector Char
forall a b. (a -> b) -> Vector a -> Vector b
VB.map (\Char
x -> if Char
x Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== Char
'-' then Char
' ' else Char
x) (Vector Char -> [Char]) -> Vector Char -> [Char]
forall a b. (a -> b) -> a -> b
$ Vector Char
v in (Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) ((Int -> Float
int2Float (Int -> Float) -> ([Char] -> Int) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int
forall a. Enum a => a -> Int
fromEnum (Int16 -> Int) -> ([Char] -> Int16) -> [Char] -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2 (UniquenessGeneral2 Char -> Int16)
-> ([Char] -> UniquenessGeneral2 Char) -> [Char] -> Int16
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> ([Char] -> Vector Char) -> [Char] -> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. [a] -> Vector a
VB.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys)Float -> Float -> Float
forall a. Num a => a -> a -> a
*(Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys)))
{-# INLINE procB2F #-}
procB2Fneg :: ([[[UZPP2]]] -> [[Float]]) -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procB2Fneg :: ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2Fneg [[[UZPP2]]] -> [[Float]]
g Coeffs2
coeffs = (Vector Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> c) -> FuncRep a b c
U1 (\Vector Char
v -> let ys :: [Char]
ys = Vector Char -> [Char]
convertToProperUkrainianV2S (Vector Char -> [Char])
-> (Vector Char -> Vector Char) -> Vector Char -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Char) -> Vector Char -> Vector Char
forall a b. (a -> b) -> Vector a -> Vector b
VB.map (\Char
x -> if Char
x Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== Char
'-' then Char
' ' else Char
x) (Vector Char -> [Char]) -> Vector Char -> [Char]
forall a b. (a -> b) -> a -> b
$ Vector Char
v in (Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) ((Int -> Float
int2Float (Int -> Float) -> ([Char] -> Int) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int
forall a. Num a => a -> a
negate (Int -> Int) -> ([Char] -> Int) -> [Char] -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int
forall a. Enum a => a -> Int
fromEnum (Int16 -> Int) -> ([Char] -> Int16) -> [Char] -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2 (UniquenessGeneral2 Char -> Int16)
-> ([Char] -> UniquenessGeneral2 Char) -> [Char] -> Int16
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> ([Char] -> Vector Char) -> [Char] -> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[Char] -> Vector Char
forall a. [a] -> Vector a
VB.fromList([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys)Float -> Float -> Float
forall a. Num a => a -> a -> a
*(Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys)))
{-# INLINE procB2Fneg #-}
procB2InvF :: ([[[UZPP2]]] -> [[Float]]) -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvF :: ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvF [[[UZPP2]]] -> [[Float]]
g Coeffs2
coeffs = (Vector Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> c) -> FuncRep a b c
U1 (\Vector Char
v ->
let !ys :: [Char]
ys = Vector Char -> [Char]
convertToProperUkrainianV2S (Vector Char -> [Char])
-> (Vector Char -> Vector Char) -> Vector Char -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Char) -> Vector Char -> Vector Char
forall a b. (a -> b) -> Vector a -> Vector b
VB.map (\Char
x -> if Char
x Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== Char
'-' then Char
' ' else Char
x) (Vector Char -> [Char]) -> Vector Char -> [Char]
forall a b. (a -> b) -> a -> b
$ Vector Char
v
!zs :: UniquenessGeneral2 Char
zs = [Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> ([Char] -> Vector Char) -> [Char] -> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. [a] -> Vector a
VB.fromList ([Char] -> UniquenessGeneral2 Char)
-> [Char] -> UniquenessGeneral2 Char
forall a b. (a -> b) -> a -> b
$ [Char]
ys in if UniquenessGeneral2 Char -> Bool
forall a. Vector a -> Bool
VB.null UniquenessGeneral2 Char
zs then (Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) (([Float] -> Float
forall a. (RealFrac a, Floating a) => [a] -> a
evalRhythmicity23 ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys) Float -> Float -> Float
forall a. Num a => a -> a -> a
* (Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys)) else (Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) ((Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys) Float -> Float -> Float
forall a. Fractional a => a -> a -> a
/ (Int -> Float
int2Float (Int -> Float)
-> (UniquenessGeneral2 Char -> Int)
-> UniquenessGeneral2 Char
-> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int
forall a. Enum a => a -> Int
fromEnum (Int16 -> Int)
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2 (UniquenessGeneral2 Char -> Float)
-> UniquenessGeneral2 Char -> Float
forall a b. (a -> b) -> a -> b
$ UniquenessGeneral2 Char
zs)))
{-# INLINE procB2InvF #-}
procB2InvFneg :: ([[[UZPP2]]] -> [[Float]]) -> Coeffs2 -> FuncRep (VB.Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvFneg :: ([[[UZPP2]]] -> [[Float]])
-> Coeffs2
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
procB2InvFneg [[[UZPP2]]] -> [[Float]]
g Coeffs2
coeffs = (Vector Char -> [Float])
-> FuncRep (Vector Char) (UniquenessGeneral2 Char) [Float]
forall a b c. (a -> c) -> FuncRep a b c
U1 (\Vector Char
v ->
let !ys :: [Char]
ys = Vector Char -> [Char]
convertToProperUkrainianV2S (Vector Char -> [Char])
-> (Vector Char -> Vector Char) -> Vector Char -> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Char) -> Vector Char -> Vector Char
forall a b. (a -> b) -> Vector a -> Vector b
VB.map (\Char
x -> if Char
x Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
== Char
'-' then Char
' ' else Char
x) (Vector Char -> [Char]) -> Vector Char -> [Char]
forall a b. (a -> b) -> a -> b
$ Vector Char
v
!zs :: UniquenessGeneral2 Char
zs = [Char] -> Vector Char -> UniquenessGeneral2 Char
forall a. Eq a => [a] -> Vector a -> UniquenessGeneral2 a
uniquenessPeriodsVector3 [Char]
" 01-" (Vector Char -> UniquenessGeneral2 Char)
-> ([Char] -> Vector Char) -> [Char] -> UniquenessGeneral2 Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
.[Char] -> Vector Char
forall a. [a] -> Vector a
VB.fromList ([Char] -> UniquenessGeneral2 Char)
-> [Char] -> UniquenessGeneral2 Char
forall a b. (a -> b) -> a -> b
$ [Char]
ys in if UniquenessGeneral2 Char -> Bool
forall a. Vector a -> Bool
VB.null UniquenessGeneral2 Char
zs then (Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) (Float -> Float
forall a. Num a => a -> a
negate (Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys) Float -> Float -> Float
forall a. Num a => a -> a -> a
* (Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
[UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys)) else (Float -> [Float] -> [Float]
forall a. a -> [a] -> [a]
:[]) ((Coeffs2 -> [Float] -> Float
eval23Coeffs Coeffs2
coeffs ([Float] -> Float) -> ([Char] -> [Float]) -> [Char] -> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[Float]] -> [Float]
forall a. Monoid a => [a] -> a
mconcat ([[Float]] -> [Float])
-> ([Char] -> [[Float]]) -> [Char] -> [Float]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[[UZPP2]]] -> [[Float]]
g ([[[UZPP2]]] -> [[Float]])
-> ([Char] -> [[[UZPP2]]]) -> [Char] -> [[Float]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Vector Char -> [[UZPP2]]) -> [Vector Char] -> [[[UZPP2]]]
forall a b. (a -> b) -> [a] -> [b]
map ([[UZPP2]] -> [[UZPP2]]
divVwls ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [[UZPP2]] -> [[UZPP2]]
reSyllableCntnts ([[UZPP2]] -> [[UZPP2]])
-> (Vector Char -> [[UZPP2]]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [UZPP2] -> [[UZPP2]]
groupSnds ([UZPP2] -> [[UZPP2]])
-> (Vector Char -> [UZPP2]) -> Vector Char -> [[UZPP2]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
Vector Char -> [UZPP2]
vec2UZPP2s) ([Vector Char] -> [[[UZPP2]]])
-> ([Char] -> [Vector Char]) -> [Char] -> [[[UZPP2]]]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Vector Char -> [Vector Char]
vecWords (Vector Char -> [Vector Char])
-> ([Char] -> Vector Char) -> [Char] -> [Vector Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Char -> Bool) -> Vector Char -> Vector Char
forall a. Unbox a => (a -> Bool) -> Vector a -> Vector a
V.filter (Char -> Char -> Bool
forall a. Eq a => a -> a -> Bool
/=Char
'0') (Vector Char -> Vector Char)
-> ([Char] -> Vector Char) -> [Char] -> Vector Char
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Vector Char
forall a. Unbox a => [a] -> Vector a
V.fromList ([Char] -> Float) -> [Char] -> Float
forall a b. (a -> b) -> a -> b
$ [Char]
ys) Float -> Float -> Float
forall a. Fractional a => a -> a -> a
/ (Int -> Float
int2Float (Int -> Float)
-> (UniquenessGeneral2 Char -> Int)
-> UniquenessGeneral2 Char
-> Float
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int
forall a. Num a => a -> a
negate (Int -> Int)
-> (UniquenessGeneral2 Char -> Int)
-> UniquenessGeneral2 Char
-> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int16 -> Int
forall a. Enum a => a -> Int
fromEnum (Int16 -> Int)
-> (UniquenessGeneral2 Char -> Int16)
-> UniquenessGeneral2 Char
-> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. UniquenessGeneral2 Char -> Int16
forall a. Eq a => UniquenessGeneral2 a -> Int16
diverse2 (UniquenessGeneral2 Char -> Float)
-> UniquenessGeneral2 Char -> Float
forall a b. (a -> b) -> a -> b
$ UniquenessGeneral2 Char
zs)))
{-# INLINE procB2InvFneg #-}