ipa-0.3.1: Internal Phonetic Alphabet (IPA)
Copyright(c) 2021 Rory Tyler Hayford
LicenseBSD-3-Clause
Maintainerrory.hayford@protonmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Language.IPA

Description

Working with IPA/X-SAMPA transcriptions and phonetic/phonemic values

Synopsis

Utilities

Transcription

transcribe :: Delimiter -> IPA -> Text Source #

"Transcribe" an IPA value by wrapping it in a Delimiter

>>> s = PulmonicConsonant Voiced Dental (Fricative NonSibilant)
>>> transcribe Phonemic <$> toIPA s
Just "/ð/"

Conversion

ipaToXSampa :: IPA -> Maybe XSampa Source #

Convert an IPA value to its equivalent in XSampa; note that several features and segments that can be transcribed in IPA notation are missing from X-SAMPA

xSampaToIpa :: XSampa -> Maybe IPA Source #

Convert an XSampa value to its equivalent in IPA

Construction

toIPA' :: ReprIPA a => a -> IPA Source #

Partial function for creating an IPA. Useful if you are certain that the sound in question is representable

toXSampa' :: ReprXSampa a => a -> XSampa Source #

Partial function for creating an XSampa. NB: Certain segments that have a defined IPA representation have no XSampa equivalent

Predicates

isValid :: forall a. ReprIPA a => Text -> Bool Source #

Does a text value in IPA notation represent a valid instance of ReprIPA? Note that you will need -XTypeApplications to use this, and that this just calls parseIPA to determine validity

>>> isValid @Segment "L"
False
>>> isValid @Segment "ʟ"
True

isValidSegment :: Text -> Bool Source #

Does a text value represent valid individual IPA Segment?

isValidSyllable :: Text -> Bool Source #

Is a text value a valid IPA Syllable?

isObstruent :: Segment -> Bool Source #

Tests if a Segment is obstruent, i.e. formed by obstructing airflow

isSonorant :: Segment -> Bool Source #

Tests if Segment is sonorant, i.e. if it is created with an uninterrupted flow of air

isLabial :: Consonant -> Bool Source #

Tests pulmonic Consonant membership in the labial category, whose active articulator is one or both lips

isCoronal :: Consonant -> Bool Source #

Tests pulmonic Consonant membership in the coronal class, whose active articulator is the front of the tongue

isDorsal :: Consonant -> Bool Source #

Tests pulmonic Consonant membership in the dorsal class, whose active articulator is the dorsum (back of the tongue)

isLaryngeal :: Consonant -> Bool Source #

Tests pulmonic Consonant membership in the laryngeal class, whose active articulator is the larynx

isRhotic :: Consonant -> Bool Source #

Tests if Consonant is rhotic, a vague category of R-like sounds typically represented lexicographically by some variant of the Latin letter r

isLiquid :: Consonant -> Bool Source #

Tests if a Consonant is liquid, a category of rhotics and voiced lateral approximants

Re-exports