phonetic-languages-simplified-properties-lists 0.1.2.0 → 0.1.3.0
raw patch · 3 files changed
+36/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- Phonetic/Languages/Lists/Ukrainian/PropertiesFuncRepG.hs +31/−8
- phonetic-languages-simplified-properties-lists.cabal +1/−1
CHANGELOG.md view
@@ -12,3 +12,7 @@ * First version revised B. Fixed issue with procB2InvF function from the Phonetic.Languages.Lists.Ukrainian.PropertiesFuncRepG module. Removed the vector-based functions from the Phonetic.Languages.Lists.Ukrainian.PropertiesSyllablesG module (they are not needed here).++## 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.
Phonetic/Languages/Lists/Ukrainian/PropertiesFuncRepG.hs view
@@ -49,7 +49,7 @@ import GHC.Float (int2Float) import Melodics.ByteString.Ukrainian import qualified Languages.Phonetic.Ukrainian.Syllable as S-import Data.Maybe (isNothing,fromMaybe)+import Data.Maybe (isNothing,fromMaybe,mapMaybe) import Text.Read (readMaybe) #ifdef __GLASGOW_HASKELL__@@ -211,7 +211,12 @@ -> ([[[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 . S.createSyllablesUkrS $ ys))) h+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 #-} {-# INLINE procB2F #-} -- | Can be used to find out the minimum element.@@ -220,7 +225,12 @@ -> ([[[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 . S.createSyllablesUkrS $ ys))) h+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 #-} {-# INLINE procB2Fneg #-} procB2InvF@@ -230,7 +240,14 @@ -> FuncRep2 String Float c 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 . S.createSyllablesUkrS $ ys) * (eval23Coeffs coeffs . mconcat . g . S.createSyllablesUkrS $ ys)) else ((eval23Coeffs coeffs . mconcat . g . S.createSyllablesUkrS $ ys) / (int2Float . fromEnum $ z))) h+ !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 #-} {-# INLINE procB2InvF #-} -- | Can be used to find out the minimum element.@@ -240,8 +257,14 @@ -> Coeffs2 -> FuncRep2 String Float c 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 . S.createSyllablesUkrS $ ys) * (eval23Coeffs coeffs .- mconcat . g . S.createSyllablesUkrS $ ys)) else ((eval23Coeffs coeffs . mconcat . g . S.createSyllablesUkrS $ ys) / (int2Float . negate .- fromEnum $ z))) h+ 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) /+ (int2Float . negate . fromEnum $ z))) h+ where f x+ | x `elem` " 1-" = Just ' '+ | x == '0' = Nothing+ | otherwise = Just x+ {-# INLINE f #-} {-# INLINE procB2InvFneg #-}
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.2.0+version: 0.1.3.0 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