phonetic-languages-rhythmicity-0.9.2.0: Allows to estimate the rhythmicity properties for the text
Copyright(c) OleksandrZhabenko 2021
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010
Extensions
  • BangPatterns
  • MultiWayIf

Rhythmicity.TwoFourth

Description

The module is highly experimental approach to estimate further the rhythmicity of the not very long lists (well, not longer than e. g. 30 elements). Is rather computationally expensive, so must be used with caution. If the period of rhythm is less than 4 it is not effective.

Synopsis

Documentation

data Marker3s Source #

The data type that is used to mark the syllables accordingly to their importance in general rhythm constituting. More important syllables are marked with the less data constuctors (since the data type has an instance of the Ord type class). Can be used in case of three levels of importance for rhythm constituting with the last, third C level of the syllables which position is thought as not significant (though it actually, is not, but for simplicity).

Constructors

A 
B 
C 

Instances

Instances details
Eq Marker3s Source # 
Instance details

Defined in Rhythmicity.TwoFourth

Ord Marker3s Source # 
Instance details

Defined in Rhythmicity.TwoFourth

Show Marker3s Source # 
Instance details

Defined in Rhythmicity.TwoFourth

data RhythmBasis Source #

Data to specify some quantitative information of the structure of rhythmicity.

Constructors

Rhythm 

Fields

  • eis :: Int

    the quantity of the most highlighted values

  • bis :: Int

    the quantity of some other highlighted values

  • cis :: Int

    the quantity of the values which influence on the rhythmicity is not highlighted

Instances

Instances details
Eq RhythmBasis Source # 
Instance details

Defined in Rhythmicity.TwoFourth

Show RhythmBasis Source # 
Instance details

Defined in Rhythmicity.TwoFourth

data Choices Source #

Data to specify (mostly) the qualitative information of the structure of rhythmicity.

Constructors

Ch 

Fields

  • cheis :: Int

    the value 0 is for minimum values, all other ones -- for maximums.

  • chbis :: Int

    the value 0 is for minimum values among the values for Rhythm bis values, all other ones -- for maximum for the ones.

  • qty :: Int

    general quantity of the elements to be taken as one period. Must be not less than the sum of cheis and chbis. Symbolically, it must be Rhythm eis + Rhythm bis + Rhythm cis = Ch qty.

Instances

Instances details
Eq Choices Source # 
Instance details

Defined in Rhythmicity.TwoFourth

Methods

(==) :: Choices -> Choices -> Bool #

(/=) :: Choices -> Choices -> Bool #

Show Choices Source # 
Instance details

Defined in Rhythmicity.TwoFourth

validChRhPair :: Choices -> RhythmBasis -> Bool Source #

The predicate to check whether the two given arguments can be used together to get meaningful results.

twoFourthCh :: Choices Source #

The value for the Choices with the two maximum highlighted values and two other ones in the 4-element period.

getChRhData Source #

Arguments

:: Ord a 
=> Choices 
-> RhythmBasis

Data specifies the quantities of the syllables on the corresponding levels of importance.

-> [a] 
-> [[Marker3s]] 

Converts the list into the form where its rhythmicity can be estimated further. Uses integer division and, therefore, can be not sensible for the last values in the given list. The length of the list must be not less than the first argument qty value though it is not checked. Therefore, the function is not total.

similarityABC Source #

Arguments

:: Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of B similtaneous presence (absence).

-> Double

The initial value starting from which it counts. Usually, equals to 1.0.

-> [[Marker3s]] 
-> Double

In case of positive previous Double arguments this is a positive value. The greater one corresponds to (probably) more rhythmic list.

The function that uses a simple arithmetic logics to calculate the similarity of the two equal by length (if not they are truncated to the least one) lists of Marker3s. It emphasises the A similarity and for most values have not so simply defined B-behaviour. Uses similarityLogics inside.

similarityABC0 Source #

Arguments

:: Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition coefficient that increases the result in case of B similtaneous presence.

-> Double

The initial value starting from which it counts. Usually, equals to 1.0.

-> [[Marker3s]] 
-> Double

In case of positive previous Double arguments this is a positive value. The greater one corresponds to (probably) more rhythmic list.

The function that uses a simple arithmetic logics to calculate the similarity of the two equal by length (if not they are truncated to the least one) lists of Marker3s. It emphasises the A and B similarities. Uses similarityLogics0 inside. The more straightforward variant of the similarityABC function.

similarityLogics Source #

Arguments

:: Double

The initial value starting from which it counts. Usually, equals to 1.0.

-> Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of B similtaneous presence (absence).

-> [Marker3s] 
-> [Marker3s] 
-> Double

In case of positive previous Double arguments this is a positive value. The greater one corresponds to (probably) more rhythmic list.

The function that uses a simple arithmetic logics to calculate the similarity of the two equal by length (if not they are truncated to the least one) lists of Marker3s. It emphasises the A similarity and for most values have not so simply defined B-behaviour.

similarityLogics0 Source #

Arguments

:: Double

The initial value starting from which it counts. Usually, equals to 1.0.

-> Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition coefficient that increases the result in case of B similtaneous presence.

-> [Marker3s] 
-> [Marker3s] 
-> Double

In case of positive previous Double arguments this is a positive value. The greater one corresponds to (probably) more rhythmic list.

The more straightforward variant of the similarityLogics function.

similarityF1 Source #

Arguments

:: Marker3s 
-> Marker3s 
-> Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of B similtaneous presence (absence).

-> Double

The initial value.

-> Double 

similarityF0 Source #

Arguments

:: Marker3s 
-> Marker3s 
-> Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition coefficient that increases the result in case of B similtaneous presence.

-> Double

The initial value.

-> Double 

The more straightforward variant of the similarityF1 function.

rhythmicityABC Source #

Arguments

:: Ord a 
=> Double

The initial value starting from which it counts. Usually, equals to 1.0.

-> Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition (positive subtraction) coefficient that increases or decreases (probably) the result in case of B similtaneous presence (absence).

-> Choices

Data specifies the structure of the period of rhythmicity -- whether maximum or minimum elements are considered and how many syllables costitute the period.

-> RhythmBasis

Data specifies the quantities of the syllables on the corresponding levels of importance.

-> [a] 
-> Double

In case of positive previous Double arguments this is a positive value. The greater one corresponds to (probably) more rhythmic list.

General function to estimate the inner rhythmicity of the Ordered list of values. For many cases its arguments can be guessed or approximated by some reasonable values. Nevertheless, it is a highly experimental one.

rhythmicityABC0 Source #

Arguments

:: Ord a 
=> Double

The initial value starting from which it counts. Usually, equals to 1.0.

-> Double

The positive factor (multiplier) coefficient that increases or decreases the result in case of A simultaneous presence (absence).

-> Double

The addition coefficient that increases the result in case of B similtaneous presence.

-> Choices

Data specifies the structure of the period of rhythmicity -- whether maximum or minimum elements are considered and how many syllables costitute the period.

-> RhythmBasis

Data specifies the quantities of the syllables on the corresponding levels of importance.

-> [a] 
-> Double

In case of positive previous Double arguments this is a positive value. The greater one corresponds to (probably) more rhythmic list.

General function to estimate the inner rhythmicity of the Ordered list of values. For many cases its arguments can be guessed or approximated by some reasonable values. Nevertheless, it is a highly experimental one. The more straightforward variant of the rhythmicityABC function.