Copyright | (c) OleksandrZhabenko 2021 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Warning: This module contains just some templates and ideas. Please, provide the analogous functions by yourself, these ones while used return undefined
.
This is a computational scheme for generalized usage of the phonetic languages approach.
The functions themselves are undefined
but with some type. They are just templates and some general idea.
Please, provide your own implementation instead of using these ones.
Synopsis
- stringToPRPL :: String -> [PhoneticsRepresentationPL]
- fromPRPL2X :: PhoneticsRepresentationPL -> PhoneticsRepresentationPLX
- rules :: String -> Maybe String -> Maybe String -> Char
- rulesPR :: PhoneticsRepresentationPL -> Char
- showRepr :: Char -> String
- toSyllables :: String -> [String]
Convert to the PhoneticsRepresentationPL
.
stringToPRPL :: String -> [PhoneticsRepresentationPL] Source #
The text is converted to the phonetic languages representation by this function.
It is intended to be exported qualified, so that the function in every language
implementation has the same name and signature as here and the data type is used there.
Please, use this function only as a type and semantics template and implement your own one where needed.
If you can define some function stringToPRPL
where every PhoneticRepresentationPL
corresponds to the distinguishable
phonetic phenomenae then it is a considerable application for the possible phonetic languages approach usability for the
data.
Apply conversion from PhoneticsRepresentationPL
.
:: String | Is gotten as |
-> Maybe String | Is gotten as |
-> Maybe String | Is gotten as |
-> Char |
Every Char
value represents here the phonetic phenomenon, mostly (usually, or often) some phoneme.
It is intended to be exported qualified, so that the function in every language
implementation has the same name and signature as here and the data type is used there.
Please, use this function only as a type and semantics template and implement your own one where needed.
rulesPR :: PhoneticsRepresentationPL -> Char Source #
Every Char
value represents here the phonetic phenomenon, mostly (usually, or often) some phoneme.
Convert from the PhoneticsRepresentationPL
after applying rulesPR
function
showRepr :: Char -> String Source #
Converts the converted from the PhoneticsRepresentationPL
conversion Char
to the usual written
in the language String
for the phenomenon.
It is intended to be exported qualified, so that the function in every language
implementation has the same name and signature as here and the data type is used there.
Please, use this function only as a type and semantics template and implement your own one where needed.
After you have defined the rules
and showRepr
functions, you can implement the instance for Show
class
for the PhoneticsRepresentationPL
as:
instance Show PhoneticsRepresentationPL where
show = showRepr . rulesPR
Similarly for the PhoneticsRepresentationPLX
:
instance Show PhoneticsRepresentationPLX where
show = showRepr . rulesX
Divide into syllables after both conversions.
toSyllables :: String -> [String] Source #
Converts the converted from the PhoneticsRepresentationPL
conversion String
to syllables.
It is intended to be exported qualified, so that the function in every language
implementation has the same name and signature as here and the data type is used there.
Please, use this function only as a type and semantics template and implement your own one where needed.