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

Phonetic.Languages.General.Simple.Parsing

Description

Prints the rearrangements with the "property" information for the phonetic language text. Is used for the Phonetic.Languages.General.Simple module functionality.

Synopsis

Documentation

argsToSimplePrepare Source #

Arguments

:: (Double -> String -> MappingFunctionPL)

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.

-> [MappingFunctionPL]

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

-> (String -> Bool)

The predicate that checks whether the given argument is not a phonetic language word in the representation.

-> IO () 

Prints the rearrangements with the "property" information for the phonetic language text. Most of the arguments are obtained from the getArgs function. While used, it distinguishes between two groups of command line arguments: the first four ones and the others afterwards. The first 5 arguments are the file names with the specifications. 1) with the GWritingSystemPRPLX specifications only (see the gwrsysExample.txt file in the phonetic-languages-phonetics-basics package as a schema);

2) 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;

3) with the SegmentRulesG specifications only;

4) 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). These are to be prepended to the next word.

5) 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). These are to be appended to the previous word.

Afterwards, the meaning of the command line arguments are as follows (from the left to the right).

The first next command line argument must be a positive Int number and is a number of printed variants for the line (if they are present, otherwise just all possible variants are printed). The second one is the number of the intervals into which the all range of possible metrics values are divided. The next numeric arguments that must be sequenced without interruptions further are treated as the numbers of the intervals (counting is started from 1) which values are moved to the maximum values of the metrics interval using the unsafeSwapVecIWithMaxI function. The first textual command line argument should be in the form either "y0", or "0y", or "yy", or "y", or "02y", or "y2", or "03y", or "yy2", or "y3", or some other variant and specifies, which property or properties is or are evaluated. The rest of the command line arguments is the phonetic text. Besides, you can use multiple metrices (no more than 5 different ones) together by using "+m" ... "-m" command line arguments.

You can specify constraints according to the decodeLConstraints function between +A and -A next command line arguments. If so, the program will ask you additional question before proceeding. The "+m" ... "-m" and "+a" ... "-a" groups must not mutually intersect one another.

argsToSimplePrepare4Files Source #

Arguments

:: PermutationsType

Whether to use just one of the express permutations, or the full universal set.

-> 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). These are to be prepended to the next word.

-> 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). These are to be appended to the previous word.

-> (Double -> String -> MappingFunctionPL)

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.

-> [MappingFunctionPL]

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.

-> String

A String of data that are the further command line arguments for the function argsToSimplePrepare.

-> (String -> Bool)

The predicate that checks whether the given argument is not a phonetic language word in the representation.

-> [String] 
-> String

If empty, the function is just generalProc2G with the arguments starting from the first Bool here.

-> Int 
-> IO () 

Similar to the argsToSimplePrepare function, but takes explicitly the four FilePaths for the files respectively and the last argument the String with all the other specifications. If it is not proper, the functions returns an error.

innerProcessmentSimple Source #

Arguments

:: String

Must be a valid GWritingSystemPRPLX specifications String representation only (see the gwrsysExample.txt file in the phonetic-languages-phonetics-basics package as a schema);

-> String

Must be a String 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;

-> String

Must be a String with the SegmentRulesG specifications only;

-> String

Must be a String 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). These are to be prepended to the next word.

-> String

Must be a String 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). These are to be appended to the previous word.

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

argsProcessment 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). These are to be prepended to the next word.

-> 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). These are to be appended to the previous word.

-> [String]

List of other args afterwards.

-> IO (String, String, String, String, String, String, Bool, Bool, [String], Coeffs2, Coeffs2, [String], Bool, Bool, Int, Int) 

@ since 0.5.0.0 The function also can process "w" and "x" lines so returns two Coeffs2 values.