{-# LANGUAGE CPP #-}
module Languages.UniquenessPeriods.Vector.PropertiesSyllables (
rhythmicity0
, rhythmicityK
) where
#ifdef __GLASGOW_HASKELL__
#if __GLASGOW_HASKELL__>=710
/* code that applies only to GHC 7.10.* and higher versions */
import GHC.Base (mconcat)
#endif
#endif
import qualified Data.Vector as V
import Languages.Rhythmicity
import MMSyn7.Syllable
#ifdef __GLASGOW_HASKELL__
#if __GLASGOW_HASKELL__==708
/* code that applies only to GHC 7.8.* */
mconcat = concat
#endif
#endif
rhythmicity0 :: String -> Float
rhythmicity0 xs
| null xs = 0.0
| otherwise = evalRhythmicity23 . mconcat . syllableDurations . syllablesUkrP $ xs
rhythmicityK :: Float -> Float -> String -> Float
rhythmicityK k2 k3 xs
| null xs = 0.0
| otherwise = evalRhythmicity23K k2 k3 . mconcat . syllableDurations . syllablesUkrP $ xs