-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b28bae9
commit 73c00e3
Showing
14 changed files
with
32 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 : [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 : [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
-- Maintainer : [email protected] | ||
|
||
{-# OPTIONS_GHC -funbox-strict-fields #-} | ||
{-# LANGUAGE NoImplicitPrelude, BangPatterns #-} | ||
{-# LANGUAGE NoImplicitPrelude, BangPatterns, StrictData #-} | ||
|
||
module Aftovolio.General.Datatype3 ( | ||
Read0 | ||
|
@@ -28,7 +28,7 @@ import GHC.List | |
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.Maybe (fromMaybe) | |
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@(B t) = '_':(filter (/= '.') . show $ t) | |
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 : [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters