packages feed

phonetic-languages-simplified-base 0.1.0.0 → 0.2.0.0

raw patch · 4 files changed

+17/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Phonetic.Languages.Simplified.Lists.UniquenessPeriodsG.Base: uniquenessPeriodsG :: Foldable t => String -> t Char -> [Int16]

Files

CHANGELOG.md view
@@ -3,3 +3,7 @@ ## 0.1.0.0 -- 2020-12-31  * First version. Released on an unsuspecting world.++## 0.2.0.0 -- 2021-02-15++* Second version. Added a function uniquenessPeriodsG to the Phonetic.Languages.Simplified.Lists.UniquenessPeriodsG.Base module.
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020 OleksandrZhabenko+Copyright (c) 2020-2021 OleksandrZhabenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Phonetic/Languages/Simplified/Lists/UniquenessPeriodsG/Base.hs view
@@ -15,7 +15,8 @@  module Phonetic.Languages.Simplified.Lists.UniquenessPeriodsG.Base (   -- * List functions-  diverse2GL+  uniquenessPeriodsG+  , diverse2GL )where  import GHC.Int@@ -24,9 +25,14 @@  -- | A lists variant of the diverse2 metrics from the @phonetic-languages-properties@ package. diverse2GL :: Foldable t => String -> t Char -> Int16-diverse2GL whspss ws- | null ws = 0- | otherwise = sum . mapMaybe (helpG sum whspss) . unfoldr f $ ks+diverse2GL whspss = sum . uniquenessPeriodsG whspss+{-# INLINE diverse2GL #-}+ +-- | A generalization of the uniquenessPeriods function of the @uniqueness-periods@ package.+uniquenessPeriodsG :: Foldable t => String -> t Char -> [Int16]+uniquenessPeriodsG whspss ws+ | null ws = []+ | otherwise = mapMaybe (helpG sum whspss) . unfoldr f $ ks      where !ks = indexedL '\00' ws            !vs = mapMaybe g ks            g x@@ -34,7 +40,7 @@             | otherwise = Nothing            {-# INLINE g #-}            f !x = if null x then Nothing else let !idX0 = snd . head $ x in Just . (\vws (v2,v3) -> ((helpUPV3 vws [] .-                    map fst $ v2,snd . head $ v2),v3)) vs . partition (\(_,xs) -> xs == idX0) $ x+                    map fst $ v2,snd . head $ v2),v3)) vs . partition (\(_,xs) -> xs == idX0) $ x                      -- | The first and the third list arguments of numbers (if not empty) must be sorted in the ascending order. helpUPV3 :: [Int16] -> [Int16] -> [Int16] -> [Int16]
phonetic-languages-simplified-base.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-base-version:             0.1.0.0+version:             0.2.0.0 synopsis:            A simplified version of the phonetic-languages functionality common for some different realizations. description:         A simplified version of the phonetic-languages functionality. Tries to use only necessary functionality and reduce the other ones. homepage:            https://hackage.haskell.org/package/phonetic-languages-simlified-base