phonetic-languages-phonetics-basics-0.4.0.0: A library for working with generalized phonetic languages usage.
Copyright(c) OleksandrZhabenko 2021
LicenseMIT
Maintainerolexandr543@yahoo.com
StabilityExperimental
Safe HaskellNone
LanguageHaskell2010

Data.Phonetic.Languages.Undefined

Description

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

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.

rules Source #

Arguments

:: String

Is gotten as string from PhoneticsRepresentationPL

-> Maybe String

Is gotten as afterString from PhoneticsRepresentationPL. Is Nothing if there is no any.

-> Maybe String

Is gotten as beforeString from PhoneticsRepresentationPL. Is Nothing if there is no any.

-> 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.