aftovolio-0.7.1.0: An AFTOVolio implementation for creating texts with special phonetic / prosodic properties.
Safe HaskellNone
LanguageHaskell2010

Aftovolio.General.Simple

Synopsis

Documentation

generalF Source #

Arguments

:: Int

A power of 10. The resulting distance using next [Word8] argument is quoted by 10 in this power. The default one is 0. The proper values are in the range [0..4].

-> Int

A length of the next argument here.

-> Compards

A value that the different options are compared with. If no command line argument "+di" was added, then this is a C1 applied to the list of positive values normed by 255 (the greatest of which is 255) that the line options are compared with. If null, then the program works without comparison. The length of it must be a least common multiplier of the (number of syllables plus number of '_digits' groups) to work correctly. Is not used when the next FilePath and String arguments are not null. If "+di" command line argument was provided, then this corresponds to the case of differentiation.

-> Bool

If True then adds "br" to line endings for double column output

-> Bool

Whether to filter out all groups of '={digits}' from the lines.

-> FilePath

A path to the file to save double columns output to. If empty then just prints to stdout.

-> String

If not null than instead of rhythmicity evaluation using hashes and and feets, there is computed a diversity property for the specified String here using the selectSounds function. For more information, see: 'https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types'

-> (String -> String)

A function that specifies what Chars in the list the first argument makes to be the function sensitive to. Analogue of the g function in the definition: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array-0.21.0.0/docs/src/Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2.html#selectSounds. Use just small Char if they are letters, do not use '.' and spaces.

-> (String, String)

If the next element is not equal to -1, then the prepending and appending lines to be displayed. Used basically for working with the multiline textual input data.

-> Int

The number of the line in the file to be read the lines from. If equal to -1 then neither reading from the file is done nor the first argument influences the processment results.

-> GWritingSystemPRPLX

Data used to obtain the phonetic language representation of the text.

-> [(Char, Char)]

The pairs of the Char that corresponds to the similar phonetic languages consonant phenomenon (e. g. allophones). Must be sorted in the ascending order to be used correctly.

-> CharPhoneticClassification 
-> SegmentRulesG 
-> BasicSpaces

Corresponds to the 100 delimiter in the ukrainian-phonetics-basic-array package.

-> AdditionalDelimiters

Corresponds to the 101 delimiter in the ukrainian-phonetics-basic-array package.

-> ([[[PhoneticPhenomenonRep]]] -> [[Word8]])

See the conversion function zippedDouble2Word8. It is easier to obtain the function f::[[[PhoneticPhenomenonRep]]]->[[Double]], and, afterwards, you can use zippedDouble2Word8 to transform the main semantic kernel of [(PhoneticPhenomenonRep, Double)] into [(PhoneticPhenomenonRep, Word8)]. For more information, see 'https://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md' in the section 'Ability to use your own durations of representations of sounds or phonetic phenomena'.

-> Int 
-> HashCorrections 
-> (Int8, [Int8]) 
-> Int

The hashing function step. The default value is 20. Is expected to be greater than 2, and better greater than 12.

-> Bool 
-> Int8 
-> (FilePath, Int) 
-> Bool

In the testing mode, whether to execute computations in concurrent mode (for speed up) or in single thread. If specified needs the executable to be compiled with -rtsopts and -threaded options and run with the command line +RTS -N -RTS options.

-> String

An initial string to be analyzed.

-> [Int]

A list of line numbers of the Aftovolio data to be displayed in the modes except tests and file appending.

-> [String] 
-> IO [String] 

data AftovolioGen Source #

Constructors

S !Int !Integer !String 

Instances

Instances details
NFData AftovolioGen Source # 
Instance details

Defined in Aftovolio.General.Simple

Methods

rnf :: AftovolioGen -> () #

Generic AftovolioGen Source # 
Instance details

Defined in Aftovolio.General.Simple

Associated Types

type Rep AftovolioGen 
Instance details

Defined in Aftovolio.General.Simple

Show AftovolioGen Source # 
Instance details

Defined in Aftovolio.General.Simple

Eq AftovolioGen Source # 
Instance details

Defined in Aftovolio.General.Simple

type Rep AftovolioGen Source # 
Instance details

Defined in Aftovolio.General.Simple

countSyll Source #

Arguments

:: GWritingSystemPRPLX

Data used to obtain the phonetic language representation of the text.

-> CharPhoneticClassification 
-> BasicSpaces

Corresponds to the 100 delimiter in the ukrainian-phonetics-basic-array package.

-> AdditionalDelimiters

Corresponds to the 101 delimiter in the ukrainian-phonetics-basic-array package.

-> String 
-> Int 

stat1 :: Int -> (Int8, [Int8]) -> Int Source #

argsProcessing Source #

Arguments

:: GWritingSystemPRPLX

Data used to obtain the phonetic language representation of the text.

-> [(Char, Char)]

The pairs of the Char that corresponds to the similar phonetic languages consonant phenomenon (e. g. allophones). Must be sorted in the ascending order to be used correctly.

-> CharPhoneticClassification 
-> SegmentRulesG 
-> BasicSpaces

Corresponds to the 100 delimiter in the ukrainian-phonetics-basic-array package.

-> AdditionalDelimiters

Corresponds to the 101 delimiter in the ukrainian-phonetics-basic-array package.

-> ([[[PhoneticPhenomenonRep]]] -> [[Word8]])

See the conversion function zippedDouble2Word8. It is easier to obtain the function f::[[[PhoneticPhenomenonRep]]]->[[Double]], and, afterwards, you can use zippedDouble2Word8 to transform the main semantic kernel of [(PhoneticPhenomenonRep, Double)] into [(PhoneticPhenomenonRep, Word8)]. For more information, see 'https://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md' in the section 'Ability to use your own durations of representations of sounds or phonetic phenomena'.

-> [[String]]

Is intended to become a valid Concatenations that are to be prepended to the next word.

-> [[String]]

Is intended to become a valid Concatenations that are to be appended to the previous word

-> String 
-> IO (Int, Int, Compards, Bool, Bool, FilePath, String, String, String, Int, Bool, Int8, FilePath, Int, Bool, String, [Int], [String])

These ones are intended to be used inside generalF.

Uses getArgs inside to get the needed data from the command line arguments. Use with this in mind.

processingF Source #

Arguments

:: (String -> String)

A function that specifies what Chars in the list the first argument makes to be the function sensitive to. Analogue of the g function in the definition: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array-0.21.0.0/docs/src/Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2.html#parsey0Choice. Use just small Char if they are letters, do not use '.' and spaces.

-> GWritingSystemPRPLX

Data used to obtain the phonetic language representation of the text.

-> [(Char, Char)]

The pairs of the Char that corresponds to the similar phonetic languages consonant phenomenon (e. g. allophones). Must be sorted in the ascending order to be used correctly.

-> CharPhoneticClassification 
-> SegmentRulesG 
-> BasicSpaces

Corresponds to the 100 delimiter in the ukrainian-phonetics-basic-array package.

-> AdditionalDelimiters

Corresponds to the 101 delimiter in the ukrainian-phonetics-basic-array package.

-> ([[[PhoneticPhenomenonRep]]] -> [[Word8]])

See the conversion function zippedDouble2Word8. It is easier to obtain the function f::[[[PhoneticPhenomenonRep]]]->[[Double]], and, afterwards, you can use zippedDouble2Word8 to transform the main semantic kernel of [(PhoneticPhenomenonRep, Double)] into [(PhoneticPhenomenonRep, Word8)]. For more information, see 'https://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md' in the section 'Ability to use your own durations of representations of sounds or phonetic phenomena'.

-> Int 
-> HashCorrections 
-> (Int8, [Int8]) 
-> [[String]]

Is intended to become a valid Concatenations that are to be prepended to the next word.

-> [[String]]

Is intended to become a valid Concatenations that are to be appended to the previous word | The hashing function step. The default value is 20. Is expected to be greater than 2, and better greater than 12.

-> Int 
-> String 
-> IO () 

cSpecs :: CLSpecifications Source #

Specifies the group of the command line arguments for processingF, which specifies the PhLADiPreLiO constraints. For more information, see: https:/oleksandr-zhabenko.github.ioukrhythmicityPhLADiPreLiO.Eng.21.html#constraints

selectSounds Source #

Arguments

:: (String -> String)

A function that specifies what Chars in the list the first argument makes to be the function sensitive to. Analogue of the g function in the definition: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array-0.21.0.0/docs/src/Phonetic.Languages.Simplified.Array.Ukrainian.FuncRep2RelatedG2.html#selectSounds. Use just small Char if they are letters, do not use '.' and spaces.

-> String 
-> String 

selectSounds converts the argument after "+ul" command line argument into a list of sound representations that is used for evaluation of 'uniqueness periods' properties of the line. Is a modified Phonetic.Languages.Simplified.Array.General.FuncRep2RelatedG2.parsey0Choice from the phonetic-languages-simplified-generalized-examples-array-0.19.0.1 package.

testsOutput Source #

Arguments

:: (Show a1, Integral a1) 
=> Bool 
-> Int 
-> Bool

Whether to filter out all groups of '={digits}' from the lines.

-> (Int -> Compards -> Int8 -> [Int8] -> String -> a1) 
-> Int 
-> Int 
-> [String] 
-> IO [String] 

Internal part of the generalF for processment in case of using tests mode.

outputWithFile Source #

Arguments

:: ([[[PhoneticPhenomenonRep]]] -> [[Word8]])

See the conversion function zippedDouble2Word8. It is easier to obtain the function f::[[[PhoneticPhenomenonRep]]]->[[Double]], and, afterwards, you can use zippedDouble2Word8 to transform the main semantic kernel of [(PhoneticPhenomenonRep, Double)] into [(PhoneticPhenomenonRep, Word8)]. For more information, see 'https://hackage.haskell.org/package/aftovolio-0.6.2.0/src/README.md' in the section 'Ability to use your own durations of representations of sounds or phonetic phenomena'.

-> GWritingSystemPRPLX

Data used to obtain the phonetic language representation of the text.

-> [(Char, Char)]

The pairs of the Char that corresponds to the similar phonetic languages consonant phenomenon (e. g. allophones). Must be sorted in the ascending order to be used correctly.

-> CharPhoneticClassification 
-> SegmentRulesG 
-> BasicSpaces

Corresponds to the 100 delimiter in the ukrainian-phonetics-basic-array package.

-> AdditionalDelimiters

Corresponds to the 101 delimiter in the ukrainian-phonetics-basic-array package.

-> String

If not null than instead of rhythmicity evaluation using hashes and and feets, there is computed a diversity property for the specified String here using the selectSounds function. For more information, see: 'https://oleksandr-zhabenko.github.io/uk/rhythmicity/PhLADiPreLiO.Eng.21.html#types'

-> Compards

A value that the different options are compared with. If no command line argument "+di" was added, then this is a C1 applied to the list of positive values normed by 255 (the greatest of which is 255) that the line options are compared with. If null, then the program works without comparison. The length of it must be a least common multiplier of the (number of syllables plus number of '_digits' groups) to work correctly. Is not used when the next FilePath and String arguments are not null. If "+di" command line argument was provided, then this corresponds to the case of differentiation.

-> [AftovolioGen] 
-> Int 
-> Int8 
-> FilePath

A file to be probably added output parts to.

-> Int 
-> IO () 

Internal part of the generalF for processment with a file.