aftovolio 0.2.0.0 → 0.2.1.0
raw patch · 14 files changed
+32/−43 lines, 14 filesdep ~intermediate-structuresdep ~quantizerPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: intermediate-structures, quantizer
API changes (from Hackage documentation)
Files
- Aftovolio/Basis.hs +2/−2
- Aftovolio/Coeffs.hs +2/−2
- Aftovolio/ConstraintsEncoded.hs +1/−4
- Aftovolio/General/Base.hs +1/−1
- Aftovolio/General/Datatype3.hs +6/−7
- Aftovolio/General/Simple.hs +1/−1
- Aftovolio/General/Syllables.hs +1/−1
- Aftovolio/PermutationsRepresent.hs +2/−2
- Aftovolio/RGLPK/General.hs +1/−1
- Aftovolio/Ukrainian/Common2.hs +1/−1
- Aftovolio/Ukrainian/IO.hs +1/−1
- Aftovolio/Ukrainian/SyllableWord8.hs +2/−13
- CHANGELOG.md +4/−0
- aftovolio.cabal +7/−7
Aftovolio/Basis.hs view
@@ -1,9 +1,9 @@ {-# OPTIONS_HADDOCK show-extensions #-}-{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE NoImplicitPrelude, StrictData #-} -- | -- Module : Aftovolio.Basis--- Copyright : (c) OleksandrZhabenko 2020-2023+-- Copyright : (c) OleksandrZhabenko 2020-2024 -- License : MIT -- Stability : Experimental -- Maintainer : oleksandr.zhabenko@yahoo.com
Aftovolio/Coeffs.hs view
@@ -1,9 +1,9 @@ {-# OPTIONS_HADDOCK show-extensions #-}-{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE NoImplicitPrelude, StrictData #-} -- | -- Module : Aftovolio.Coeffs--- Copyright : (c) OleksandrZhabenko 2020-2023+-- Copyright : (c) OleksandrZhabenko 2020-2024 -- License : MIT -- Stability : Experimental -- Maintainer : oleksandr.zhabenko@yahoo.com
Aftovolio/ConstraintsEncoded.hs view
@@ -1,8 +1,5 @@ {-# OPTIONS_HADDOCK show-extensions #-} --- -- | -- Module : Aftovolio.ConstraintsEncoded -- Copyright : (c) OleksandrZhabenko 2020-2024@@ -13,7 +10,7 @@ -- Provides a way to encode the needed constraint with possibly less symbols. -- Uses arrays instead of vectors. -{-# LANGUAGE FlexibleInstances, FlexibleContexts, NoImplicitPrelude, BangPatterns #-}+{-# LANGUAGE FlexibleInstances, FlexibleContexts, NoImplicitPrelude, BangPatterns, StrictData #-} module Aftovolio.ConstraintsEncoded ( -- * Data types
Aftovolio/General/Base.hs view
@@ -2,7 +2,7 @@ {-# OPTIONS_GHC -funbox-strict-fields -fobject-code #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE UnboxedTuples #-}+{-# LANGUAGE UnboxedTuples, StrictData #-} {-# LANGUAGE MagicHash #-} -- |
Aftovolio/General/Datatype3.hs view
@@ -6,7 +6,7 @@ -- Maintainer : oleksandr.zhabenko@yahoo.com {-# OPTIONS_GHC -funbox-strict-fields #-}-{-# LANGUAGE NoImplicitPrelude, BangPatterns #-}+{-# LANGUAGE NoImplicitPrelude, BangPatterns, StrictData #-} module Aftovolio.General.Datatype3 ( Read0@@ -28,7 +28,7 @@ import GHC.Word import GHC.Real (floor,fromIntegral,(/)) import GHC.Float (int2Double) -import Data.List (groupBy,find)+import Data.List (groupBy,find,maximumBy,minimumBy) import Data.Char (isDigit, isSpace,isLetter) import Text.Read (readMaybe) import Text.Show (Show(..))@@ -37,6 +37,7 @@ import Data.Tuple (fst,snd) import qualified Data.Foldable as F (foldr) import qualified Data.Sequence as S+import Data.Ord (comparing) import ListQuantizer (round2GL) -- | Is a way to read duration of the additional added time period into the line.@@ -194,14 +195,12 @@ showRead0AsInsert d@(C ts) = ts {-# INLINE showRead0AsInsert #-} --- | Is intended to be used to transform the earlier data for AFTOVolio representations durations from 'Double' to 'Word8' values. It was used during the transition from the ukrainian-phonetics-basic-array-0.7.1.1 to ukrainian-phonetics-basic-array-0.10.0.0.+-- | Is intended to be used to transform the earlier data for AFTOVolio representations durations from 'Double' to 'Word8' values. It was used during the transition from the ukrainian-phonetics-basic-array-0.7.1.1 to ukrainian-phonetics-basic-array-0.10.0.0. zippedDouble2Word8 xs = map (\(t, u) -> (t,fromMaybe 15 . hh $ u)) xs - where !h = snd . head $ xs- !lt = snd . last $ xs+ where !h = snd . minimumBy (comparing snd) $ xs+ !lt = snd . maximumBy (comparing snd) $ xs !del = (lt - h)/14.0 !ys = take 15 . iterate (+del) $ h !zs = zip [1..15] ys gg !u = fromMaybe lt . round2GL True (\_ _ -> EQ) ys $ u hh !u = fmap fst . find ((== gg u) . snd) $ zs--
Aftovolio/General/Simple.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE NoImplicitPrelude, BangPatterns, DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude, BangPatterns, DeriveGeneric, StrictData #-} module Aftovolio.General.Simple where
Aftovolio/General/Syllables.hs view
@@ -2,7 +2,7 @@ {-# OPTIONS_GHC -funbox-strict-fields -fobject-code #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE UnboxedTuples #-}+{-# LANGUAGE UnboxedTuples, StrictData #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-}
Aftovolio/PermutationsRepresent.hs view
@@ -1,8 +1,8 @@-{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE NoImplicitPrelude, StrictData #-} -- | -- Module : Aftovolio.PermutationsRepresent--- Copyright : (c) OleksandrZhabenko 2022-2023+-- Copyright : (c) OleksandrZhabenko 2022-2024 -- License : MIT -- Stability : Experimental -- Maintainer : oleksandr.zhabenko@yahoo.com
Aftovolio/RGLPK/General.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE NoImplicitPrelude, StrictData #-} {-# OPTIONS_HADDOCK show-extensions #-} -- |
Aftovolio/Ukrainian/Common2.hs view
@@ -1,5 +1,5 @@ {-# OPTIONS_HADDOCK show-extensions #-}-{-# LANGUAGE BangPatterns, NoImplicitPrelude #-}+{-# LANGUAGE BangPatterns, NoImplicitPrelude, StrictData #-} -- | -- Module : Aftovolio.Ukrainian.Common2
Aftovolio/Ukrainian/IO.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, DeriveGeneric #-}+{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, DeriveGeneric, StrictData #-} module Aftovolio.Ukrainian.IO where
Aftovolio/Ukrainian/SyllableWord8.hs view
@@ -23,12 +23,12 @@ import GHC.Word s0DuratD1 :: Sound8 -> Word8-s0DuratD1 = getBFstLSorted' 5 [(1,15),(2,10),(3,13),(4,12),(5,11),(6,10),(7,1),(8,6),(9,6),(10,7),(11,7),(15,6),(16,6),(17,8),(18,8),(19,7),(20,7),(21,8),(22,8),(23,5),(24,5),(25,6),(26,6),(27,6),(28,7),(29,7),(30,8),(31,8),(32,8),(33,8),(34,5),(35,5),(36,9),(37,9),(38,5),(39,6),(40,6),(41,7),(42,7),(43,6),(44,6),(45,4),(46,4),(47,15),(48,15),(49,8),(50,12),(51,12),(52,8),(53,8),(54,8),(66,10)]+s0DuratD1 = getBFstLSorted' 5 [(1,15),(2,10),(3,13),(4,12),(5,11),(6,10),(7,1),(8,6),(9,6),(10,7),(11,7),(15,6),(16,6),(17,8),(18,8),(19,7),(20,7),(21,8),(22,8),(23,5),(24,5),(25,6),(26,6),(27,6),(28,7),(29,7),(30,8),(31,8),(32,8),(33,8),(34,5),(35,5),(36,9),(37,9),(38,5),(39,6),(40,6),(41,7),(42,7),(43,6),(44,6),(45,4),(46,4),(47,15),(48,15),(49,8),(50,12),(51,12),(52,8),(53,8),(54,8),(66,10)] {-# INLINE s0DuratD1 #-} -- | s0DuratD2 :: Sound8 -> Word8-s0DuratD2 = getBFstLSorted' 5 [(1,15),(2,15),(3,15),(4,14),(5,11),(6,11),(7,1),(8,4),(9,4),(10,5),(11,5),(15,6),(16,6),(17,4),(18,4),(19,4),(20,4),(21,3),(22,3),(23,5),(24,5),(25,4),(26,4),(27,5),(28,6),(29,6),(30,8),(31,8),(32,3),(33,3),(34,4),(35,4),(36,5),(37,5),(38,3),(39,7),(40,7),(41,7),(42,7),(43,9),(44,9),(45,3),(46,3),(47,5),(48,5),(49,3),(50,3),(51,3),(52,5),(53,5),(54,4),(66,4)] +s0DuratD2 = getBFstLSorted' 5 [(1,15),(2,15),(3,15),(4,14),(5,11),(6,11),(7,1),(8,4),(9,4),(10,5),(11,5),(15,6),(16,6),(17,4),(18,4),(19,4),(20,4),(21,3),(22,3),(23,5),(24,5),(25,4),(26,4),(27,5),(28,6),(29,6),(30,8),(31,8),(32,3),(33,3),(34,4),(35,4),(36,5),(37,5),(38,3),(39,7),(40,7),(41,7),(42,7),(43,9),(44,9),(45,3),(46,3),(47,5),(48,5),(49,3),(50,3),(51,3),(52,5),(53,5),(54,4),(66,4)] {-# INLINE s0DuratD2 #-} s0DuratD3 :: Sound8 -> Word8@@ -38,17 +38,6 @@ s0DuratD4 :: Sound8 -> Word8 s0DuratD4 = getBFstLSorted' 5 [(1,12),(2,12),(3,12),(4,12),(5,12),(6,12),(7,1),(8,5),(9,5),(10,10),(11,10),(15,5),(16,5),(17,8),(18,8),(19,8),(20,8),(21,13),(22,13),(23,10),(24,10),(25,5),(26,5),(27,4),(28,10),(29,10),(30,15),(31,15),(32,8),(33,8),(34,4),(35,4),(36,6),(37,6),(38,4),(39,12),(40,12),(41,14),(42,14),(43,11),(44,11),(45,6),(46,6),(47,4),(48,4),(49,6),(50,11),(51,11),(52,15),(53,15),(54,7),(66,5)] {-# INLINE s0DuratD4 #-}--{--help1 xs = map (\(t, u) -> (t,fromMaybe 15 . hh $ u)) xs - where !h = snd . head $ xs- !lt = snd . last $ xs- !del = (lt - h)/14.0- !ys = take 15 . iterate (+del) $ h- !zs = zip [1..15] ys- gg !u = fromMaybe lt . round2GL True (\_ _ -> EQ) ys $ u- hh !u = fmap fst . find ((== gg u) . snd) $ zs--} class (Eq a) => SyllableDurations4 a where sDuratsD :: a -> Word8
CHANGELOG.md view
@@ -8,3 +8,7 @@ * Second version. Added possibility to specify sequence of Word8 numbers as durations to be compared with in the +ln ... -ln command line arguments group. +## 0.2.1.0 -- 2024-09-28++* Second version revised A. Updated dependencies. Some minor code usability improvements.+
aftovolio.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: aftovolio-version: 0.2.0.0+version: 0.2.1.0 -- A short (one-line) description of the package. synopsis: An AFTOVolio implementation for creating texts with special phonetic / prosodic properties.@@ -27,8 +27,8 @@ exposed-modules: Aftovolio.Ukrainian.Common2, Aftovolio.Ukrainian.IO, Aftovolio.Ukrainian.PrepareText, Aftovolio.Ukrainian.ReverseConcatenations, Aftovolio.DataG, Aftovolio.StrictVG, Aftovolio.Partir, Data.ChooseLine2, Aftovolio.PermutationsArr, Aftovolio.PermutationsArrMini, Aftovolio.PermutationsArrMini1, Aftovolio.PermutationsRepresent, Aftovolio.Constraints, Aftovolio.ConstraintsEncoded, Aftovolio.Tests, Aftovolio.Ukrainian.Syllable, Aftovolio.Ukrainian.Melodics, Aftovolio.Ukrainian.SyllableWord8, Aftovolio.Basis, Aftovolio.UniquenessPeriodsG, Aftovolio.Coeffs, Aftovolio.Ukrainian.ReadDurations, Aftovolio.General.Datatype3, Aftovolio.General.Distance, Aftovolio.Halfsplit, Aftovolio.General.Parsing, Aftovolio.General.Base, Aftovolio.General.PrepareText, Aftovolio.General.Simple, Aftovolio.General.SpecificationsRead, Aftovolio.General.Syllables, Aftovolio.RGLPK.General -- LANGUAGE extensions used by modules in this package.- other-extensions: NoImplicitPrelude, BangPatterns, DeriveGeneric- build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.1.0, quantizer ==0.3.1.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0+ other-extensions: NoImplicitPrelude, BangPatterns, DeriveGeneric, StrictData+ build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.2.0, quantizer ==0.4.0.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0 hs-source-dirs: . default-language: Haskell2010 @@ -39,16 +39,16 @@ other-modules: Aftovolio.Ukrainian.Common2, Aftovolio.Ukrainian.IO, Aftovolio.Ukrainian.PrepareText, Aftovolio.Ukrainian.ReverseConcatenations, Aftovolio.DataG, Aftovolio.StrictVG, Aftovolio.Partir, Data.ChooseLine2, Aftovolio.PermutationsArr, Aftovolio.PermutationsArrMini, Aftovolio.PermutationsArrMini1, Aftovolio.PermutationsRepresent, Aftovolio.Constraints, Aftovolio.ConstraintsEncoded, Aftovolio.Tests, Aftovolio.Ukrainian.Syllable, Aftovolio.Ukrainian.Melodics, Aftovolio.Ukrainian.SyllableWord8, Aftovolio.Basis, Aftovolio.UniquenessPeriodsG, Aftovolio.Coeffs, Aftovolio.Ukrainian.ReadDurations, Aftovolio.General.Datatype3, Aftovolio.General.Distance, Aftovolio.Halfsplit, Aftovolio.General.Parsing, Aftovolio.General.Base, Aftovolio.General.PrepareText, Aftovolio.General.Simple, Aftovolio.General.SpecificationsRead, Aftovolio.General.Syllables, Aftovolio.RGLPK.General ghc-options: -threaded -rtsopts -- LANGUAGE extensions used by modules in this package.- other-extensions: NoImplicitPrelude, BangPatterns, DeriveGeneric- build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.1.0, quantizer ==0.3.1.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0 + other-extensions: NoImplicitPrelude, BangPatterns, DeriveGeneric, StrictData+ build-depends: base >=4.13 && <5, rhythmic-sequences ==0.8.0.0, cli-arguments ==0.7.0.0, directory >=1.3.4.0 && <2, rev-scientific ==0.2.1.0, async >= 2.2.2 && <3, mmsyn2-array ==0.3.1.1, minmax ==0.1.1.0, deepseq >=1.4.4.0 && <2, monoid-insertleft ==0.1.0.1, intermediate-structures ==0.1.2.0, quantizer ==0.4.0.0, containers >=0.5.11.0 && <1, lists-flines == 0.1.3.0 hs-source-dirs: src, . default-language: Haskell2010 executable unconcatUkr2 main-is: Main.hs other-modules: Aftovolio.Ukrainian.ReverseConcatenations- other-extensions: BangPatterns, NoImplicitPrelude- build-depends: base >=4.13 && <5, mmsyn2-array ==0.3.1.1, intermediate-structures == 0.1.1.0+ other-extensions: BangPatterns, NoImplicitPrelude, StrictData+ build-depends: base >=4.13 && <5, mmsyn2-array ==0.3.1.1, intermediate-structures == 0.1.2.0 ghc-options: -threaded -rtsopts hs-source-dirs: . default-language: Haskell2010