Copyright | (c) OleksandrZhabenko 2020-2022 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Extensions | BangPatterns |
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
- argsToLinePrepare :: (Double -> String -> [[[PRS]]] -> [[Double]]) -> [[[[PRS]]] -> [[Double]]] -> IO ()
- files4Processment :: FilePath -> FilePath -> FilePath -> FilePath -> Int -> [String] -> IO (GWritingSystemPRPLX, [(Char, Char)], CharPhoneticClassification, SegmentRulesG, String, String, Concatenations, String, [String], [String], Int, FilePath)
- aSpecs :: CLSpecifications
- aSpcs :: [String] -> Args
- cSpecs1 :: CLSpecifications
- fstCharsM :: FirstChars
- bSpecs :: CLSpecifications
- bSpcs :: [String] -> Args
- specs1 :: CLSpecifications
Documentation
:: (Double -> String -> [[[PRS]]] -> [[Double]]) | The function that is needed in the |
-> [[[[PRS]]] -> [[Double]]] | A list of 4 different functions that specifies the syllables durations, analogues of the
syllableDurationsD functions from the |
-> 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.
@ since 0.12.0.0 You can run the comparative mode on the up to 7 different files simultaneously. Besides, there is also a multiple properties mode.
:: FilePath | With the |
-> FilePath | With the 5 meaningful lines that are delimited with the '~' line one from another with the specifications for the possible allophones (if any), |
-> FilePath | With the |
-> FilePath | With the |
-> Int | If equal to 1, then the function is intended to be used in the multiple properties mode, else it is intended to be used in the single property mode. |
-> [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.