packages feed

phonetic-languages-phonetics-basics 0.5.0.0 → 0.5.1.0

raw patch · 6 files changed

+106/−3 lines, 6 files

Files

ChangeLog.md view
@@ -52,3 +52,8 @@  * Fifth version. Added two new modules Data.Phonetic.Languages.SpecificationsRead and Main. Added an executable pldPL (anologue of the pldUkr from r-glpk-phonetic-languages-ukrainian-durations package). ++## 0.5.1.0 -- 2021-04-30++* Fifth version revised A. Added two example files with data syntaxis, first of all useful for the pldPL executable. See README.md.+Added also README.md file with a brief description of the possible scenario of the usage for pldPL. Some code improvements. 
Data/Phonetic/Languages/SpecificationsRead.hs view
@@ -29,6 +29,6 @@   where (css,dss) = span (charLine c) xs  getGWritingSystem :: Char -> String -> GWritingSystemPRPLX-getGWritingSystem c xs = map ((\(t1,t2) -> (map (\kt -> fromJust (readPEMaybe kt::Maybe PhoneticsRepresentationPLX)) t2,+getGWritingSystem c xs = map ((\(t1,t2) -> (sort . map (\kt -> fromJust (readPEMaybe kt::Maybe PhoneticsRepresentationPLX)) $ t2,          read (concat t1)::Int8)) . splitAt 1) . groupBetweenChars c . lines $ xs 
+ README.md view
@@ -0,0 +1,52 @@+The executable pldPL is intended to use the functionality of the :++1) R programming language https://www.r-project.org/++2) Rglpk library https://cran.r-project.org/web/packages/Rglpk/index.html++3) GNU GLPK library https://www.gnu.org/software/glpk/glpk.html++For more information, please, see the documentation for them.++* Some examples.++Let in the file words.txt you have the (phonetic language) words and their durations in seconds as pairs separated with whitespace +at the lines.++Also let in the file controlData.txt you have control specifications, an example of syntaxis for which is in the file+controlDataExample.txt.++Also let in the file gwrsys.txt you have GWritingSystemPRPLX specifications, an example of syntaxis for which is in the+file gwrsysExample.txt.++Then the following commands can be variants of the usage of the pldPL executable. ++1) pldPL 0.001 0.001 0.01 0.02 words.txt controlData.txt gwrsys.txt 0.3 0.2 0.02 0.06 1.8 -1 0.01 0.01 1.5 1.5 1.5 1.5 1.5 1.5 | R --quiet --no-save ++This variant tries to minimize the duration of the only one element belonging to the special phonetic language representation+elements (-1 as the second parameter after the file name), tries +to reduce the influence of the two other elements (the third and the fourth parameters as 0.01) and tries to somewhat +make longer the 6 vowels (all the consonants have by that the default coefficients equal to 1.0) (a simple example, though+the program supports also the more complicated ones).++2) pldPL 0.001 0.001 0.01 0.02 words.txt controlData.txt gwrsys.txt 0.3 0.2 0.02 0.06 1.8 -1 0.01 0.01 2.5 2.5 2.5 2.5 2.5 2.5 | R --quiet --no-save ++The same as the 1), but with more prolongation of the vowels.++3) pldPL 0.001 0.001 0.01 0.02 words.txt controlData.txt gwrsys.txt 0.3 0.2 0.02 0.06 1.4 -1 0.01 0.01 2.5 2.5 2.5 2.5 2.5 2.5 | R --quiet --no-save ++If the 2) gives you the not NULL result, then it is recommended to minimize the first parameter after the file name. ++4) pldPL 0.001 0.001 0.01 0.02 words.txt controlData.txt gwrsys.txt 0.3 0.2 0.02 0.06 1.6 -1 0.01 0.01 2.5 2.5 2.5 2.5 2.5 2.5 | R --quiet --no-save ++If the previous gives NULL result, then try to somewhat increase the first parameter after the file name.++Therefore, using such a binary search for the single parameter above, try to find out the more precise value of the point where+the pldPL gives not NULL result and then use the obtained result as the durations for the system of phonetic languages representations.++It is needed to be said that if omitted, the durations coefficients are equal to the default 1.0.++An example of the pldPL functionality already in use is the pldUkr executable of the+r-glpk-phonetic-languages-ukrainian-durations package. For more information, please,+refer to: https://hackage.haskell.org/package/r-glpk-phonetic-languages-ukrainian-durations+
+ controlDataExample.txt view
@@ -0,0 +1,13 @@+nn+PairwisePL_{1}+PairwisePL_{2}+...+.+.+.+PairwisePL_{k}+~~~~~~~~~~~~~~~~~~~~~~~~~~+[(Int,Int)]+~~~~~~~~~~~~~~~~~~~~~~~~~~+[Int]+[Int]
+ gwrsysExample.txt view
@@ -0,0 +1,33 @@+n_max+PhoneticRepresentationPLX_{1,n_max}+PhoneticRepresentationPLX_{2,n_max}+...+.+.+.+PhoneticRepresentationPLX_{k_n_max,n_max}+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+n_max - 1+PhoneticRepresentationPLX_{1,n_max - 1}+PhoneticRepresentationPLX_{2,n_max - 1}+...+.+.+.+PhoneticRepresentationPLX_{m_n_max,n_max - 1}+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+...+.+.+.+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+0+PhoneticRepresentationPLX_{1,0}+PhoneticRepresentationPLX_{2,0}+...+.+.+.+PhoneticRepresentationPLX_{p_n_max,0}+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
phonetic-languages-phonetics-basics.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-phonetics-basics-version:             0.5.0.0+version:             0.5.1.0 synopsis:            A library for working with generalized phonetic languages usage. description:         There already exists a Ukrainian implementation for the phonetic languages approach published at: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array. It is optimized for the Ukrainian only and needs to be rewritten for every new language mostly from scratch using it as a template. To avoid this boilerplate, this one is provided. It can be used for different languages and even for music or other fields. Now it combines the functionality of the @r-glpk-phonetic-languages-ukrainian-durations@ and  some dependencies of the mentioned one. homepage:            https://hackage.haskell.org/package/phonetic-languages-phonetics-basics@@ -14,7 +14,7 @@ copyright:           Oleksandr Zhabenko category:            Language, Math, Game build-type:          Simple-extra-source-files:  ChangeLog.md+extra-source-files:  ChangeLog.md, README.md, controlDataExample.txt, gwrsysExample.txt cabal-version:       >=1.10  library