phonetic-languages-simplified-properties-lists 0.1.3.0 → 0.1.3.1
raw patch · 3 files changed
+24/−28 lines, 3 filesdep ~ukrainian-phonetics-basicPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ukrainian-phonetics-basic
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Phonetic/Languages/Lists/Ukrainian/PropertiesFuncRepG.hs +17/−26
- phonetic-languages-simplified-properties-lists.cabal +2/−2
CHANGELOG.md view
@@ -16,3 +16,8 @@ ## 0.1.3.0 -- 2020-11-26 * First version revised C. Fixed issue with multiple application of the conversions in the Phonetic.Languages.Lists.Ukrainian.PropertiesFuncRepG module.++## 0.1.3.1 -- 2020-11-26++* First version revised D. Some code optimizations.+
Phonetic/Languages/Lists/Ukrainian/PropertiesFuncRepG.hs view
@@ -211,12 +211,7 @@ -> ([[[S.UZPP2]]] -> [[Float]]) -> Coeffs2 -> FuncRep2 String Float c-procB2F h g coeffs = D (\xs -> let ys = convertToProperUkrainianS . map (\x -> if x == '-' then ' ' else x) $ xs in ((int2Float . fromEnum . diverse2GL " 01-" $ ys)*(eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words . mapMaybe f $ ys))) h- where f x- | x `elem` " 1-" = Just ' '- | x == '0' = Nothing- | otherwise = Just x- {-# INLINE f #-}+procB2F h g coeffs = D (\xs -> let ys = convertToProperUkrainianS . map (\x -> if x == '-' then ' ' else x) $ xs in ((int2Float . fromEnum . diverse2GL " 01-" $ ys)*(eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words1 . mapMaybe f $ ys))) h {-# INLINE procB2F #-} -- | Can be used to find out the minimum element.@@ -225,12 +220,7 @@ -> ([[[S.UZPP2]]] -> [[Float]]) -> Coeffs2 -> FuncRep2 String Float c-procB2Fneg h g coeffs = D (\xs -> let ys = convertToProperUkrainianS . map (\x -> if x == '-' then ' ' else x) $ xs in ((int2Float . negate . fromEnum . diverse2GL " 01-" $ ys)*(eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words . mapMaybe f $ ys))) h- where f x- | x `elem` " 1-" = Just ' '- | x == '0' = Nothing- | otherwise = Just x- {-# INLINE f #-}+procB2Fneg h g coeffs = D (\xs -> let ys = convertToProperUkrainianS . map (\x -> if x == '-' then ' ' else x) $ xs in ((int2Float . negate . fromEnum . diverse2GL " 01-" $ ys)*(eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words1 . mapMaybe f $ ys))) h {-# INLINE procB2Fneg #-} procB2InvF@@ -241,13 +231,8 @@ procB2InvF h g coeffs = D (\xs -> let !ys = convertToProperUkrainianS . map (\x -> if x == '-' then ' ' else x) $ xs !z = diverse2GL " 01-" ys in if z == 0 then (eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds .- S.str2UZPP2s) . words . mapMaybe f $ ys) ** 2.0- else ((eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words . mapMaybe f $ ys) / (int2Float . fromEnum $ z))) h- where f x- | x `elem` " 1-" = Just ' '- | x == '0' = Nothing- | otherwise = Just x- {-# INLINE f #-}+ S.str2UZPP2s) . words1 . mapMaybe f $ ys) ** 2.0+ else ((eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words1 . mapMaybe f $ ys) / (int2Float . fromEnum $ z))) h {-# INLINE procB2InvF #-} -- | Can be used to find out the minimum element.@@ -259,12 +244,18 @@ procB2InvFneg h g coeffs = D (\xs -> let !ys = convertToProperUkrainianS . map (\x -> if x == '-' then ' ' else x) $ xs !z = diverse2GL " 01-" ys in if z == 0 then (negate (eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds .- S.str2UZPP2s) . words . mapMaybe f $ ys) ** 2.0)- else ((eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words . mapMaybe f $ ys) /+ S.str2UZPP2s) . words1 . mapMaybe f $ ys) ** 2.0)+ else ((eval23Coeffs coeffs . mconcat . g . map (S.divVwls . S.reSyllableCntnts . S.groupSnds . S.str2UZPP2s) . words1 . mapMaybe f $ ys) / (int2Float . negate . fromEnum $ z))) h- where f x- | x `elem` " 1-" = Just ' '- | x == '0' = Nothing- | otherwise = Just x- {-# INLINE f #-} {-# INLINE procB2InvFneg #-}++f x+ | x == '0' = Nothing+ | x /= '1' && x /= '-' = Just x+ | otherwise = Just ' '+{-# INLINE f #-}++words1 xs = if null ts then [] else w : words1 s'' -- Practically this is an optimized version for this case 'words' function from Prelude.+ where ts = dropWhile (== ' ') xs+ (w, s'') = span (/= ' ') ts+{-# NOINLINE words1 #-}
phonetic-languages-simplified-properties-lists.cabal view
@@ -2,7 +2,7 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/ name: phonetic-languages-simplified-properties-lists-version: 0.1.3.0+version: 0.1.3.1 synopsis: A generalization of the uniqueness-periods-vector-properties package. description: Is a simplified version of the functionality of the former one. Uses lists as main processment data. homepage: https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists@@ -20,6 +20,6 @@ exposed-modules: Phonetic.Languages.Lists.Ukrainian.PropertiesFuncRepG, Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG -- other-modules: other-extensions: BangPatterns, CPP- build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, phonetic-languages-rhythmicity >=0.1.2 && <1, phonetic-languages-simplified-common >=0.3 && <1, ukrainian-phonetics-basic >=0.3.1 && <1+ build-depends: base >=4.7 && <4.15, vector >=0.11 && <0.14, phonetic-languages-rhythmicity >=0.1.2 && <1, phonetic-languages-simplified-common >=0.3 && <1, ukrainian-phonetics-basic >=0.3.1.2 && <1 -- hs-source-dirs: default-language: Haskell2010