phonetic-languages-simplified-generalized-examples-array-0.7.0.0: Helps to create texts with the given phonetic properties (e. g. poetic).
Copyright(c) OleksandrZhabenko 2020-2021
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010
ExtensionsBangPatterns

Phonetic.Languages.General.Lines.Parsing

Description

Inspired by: https://functional-art.org/2020/papers/Poetry-OleksandrZhabenko.pdf from the https://functional-art.org/2020/performances ; Allows to rewrite the given text (usually a poetic one).

Synopsis

Documentation

argsToLinePrepare Source #

Arguments

:: (Double -> String -> [[[PRS]]] -> [[Double]])

The function that is needed in the procRhythmicity23F function. Specifies a way how the syllables represented in the phonetic language approach transforms into their durations and depends on two parameters. Is specific for every phonetic language and every representation, so must be provided by the user in every case. The example of the function can be found in the package phonetic-languages-simplified-properties-array.

-> [[[[PRS]]] -> [[Double]]]

A list of 4 different functions that specifies the syllables durations, analogues of the syllableDurationsD functions from the ukrainian-phonetics-basics-array package. The last one must be probably the most exact one and, therefore, the default one.

-> IO () 

The function allows to rewrite the phonetic language text in the file given as the first command line argument to a new file. In between, it is rewritten so that every last word on the lines is preserved at its position, and the rest of the line is rearranged using the specified other command line arguments. They are general for the whole program. The first command line argument is a FilePath to the file with a phonetic text to be rewritten. The second one is a variant of the "properties" used to evaluate the variants. The further command line arguments are: the number of the intervals and the numbers of the intervals that are swapped with the maximum one so that they are available for further usage by the program. See documentation for uniqueness-periods-vector-filters package 'https://hackage.haskell.org/package/uniqueness-periods-vector-filters'

(Taken from the https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array-0.4.1.0/docs/Phonetic-Languages-Lines.html from the phonetic-languages-simplified-examples-array package) You can also run program in a 'comparative' mode by specifying "+C" as one of the command line arguments and then three files -- the first two -- the existing ones with probably rewritten text by the program for different arguments and the third one is the resulting file. While running in such a mode the program outputs line-by-line the contents of the two first files and writes one of them (or an empty line if neither one) to the third file.

files4Processment Source #

Arguments

:: FilePath

With the GWritingSystemPRPLX specifications only (see the gwrsysExample.txt file in the phonetic-languages-phonetics-basics package as a schema);

-> FilePath

With the 5 meaningful lines that are delimited with the '~' line one from another with the specifications for the possible allophones (if any), CharPhoneticClassification, white spaces information (two Strings) and the String of all the possible PLL Chars;

-> FilePath

With the SegmentRulesG specifications only;

-> FilePath

With the Concatenations specifications only (see the data in the EnglishConcatenated.txt file in the phonetic-languages-phonetics-basics package as a list of English equivalents of the needed Strings).

-> [String]

List of other command line arguments

-> IO (GWritingSystemPRPLX, [(Char, Char)], CharPhoneticClassification, SegmentRulesG, String, String, Concatenations, String, [String], String, Int, FilePath) 

Is used internally in the argsToLinePrepare. Nevertheless, can be used independently if the semantics of the arguments and their structure are preserved.