Copyright | (c) 2021 Rory Tyler Hayford |
---|---|
License | BSD-3-Clause |
Maintainer | rory.hayford@protonmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Working with IPA transcriptions
Synopsis
- data IPAException
- data SuprasegmentalFeature
- data Stress
- data SegmentalFeature
- = Voicing Phonation
- | Length Length
- | SecondaryArticulation Segment
- | SuperScriptNumeric Int
- | Aspirated
- | MoreRounded
- | LessRounded
- | Advanced
- | Retracted
- | Centralized
- | MidCentralized
- | Compressed
- | Syllabic
- | NonSyllabic
- | Rhotacized
- | BreathyVoice
- | CreakyVoice
- | LinguoLabialized
- | Labialized
- | Palatalized
- | Velarized
- | Pharyngealized
- | Raised
- | Lowered
- | AdvancedTongueRoot
- | RetractedTongueRoot
- | Dentalized
- | Apical
- | Laminal
- | Nasalized
- | NasalRelease
- | LateralRelease
- | NoAudibleRelease
- data Length
- = OverLong
- | HalfLong
- | Long
- | Short
- | ExtraShort
- data ToneContour
- data LevelTone
- data Roundedness
- data Backness
- data Height
- data Sibilance
- data Phonation
- data Place
- data Manner
- data Consonant
- data Syllable t
- data Segment
- newtype XSampa = XSampa Text
- newtype IPA = IPA {}
- pattern ImplosiveConsonant :: Phonation -> Place -> Segment
- pattern ClickConsonant :: Place -> Segment
- pattern EjectiveConsonant :: Place -> Manner -> Segment
- pattern PulmonicConsonant :: Phonation -> Place -> Manner -> Segment
- mkIPA :: Text -> IPA
- class ReprIPA a where
Documentation
data IPAException Source #
Instances
data SuprasegmentalFeature Source #
LevelLexicalTone LevelTone | Level lexical tones in Chao letters |
LevelLexicalToneDiacritic LevelTone | Level lexical tones, diacritic. The tone is a combining character |
LexicalToneContour ToneContour | Lexical tone contours in Chao letters |
LexicalToneContourDiacritic ToneContour | Lexical tone contours, as diacritics. Each contour is a combining character |
Stress Stress | Syllable stress |
Break | Explicit syllable break |
Linking | Absence of a break |
Instances
data SegmentalFeature Source #
Various articulatory features with a diacritic represenation in the IPA.
These can be combined with Segment
s using the WithSegmentalFeature
constructor of that type to produce a Segment
annotated with a given
articulatory feature, e.g.:
>>>
toIPA $ WithSegmentalFeature (Length Long) (Vowel Close Front Unrounded)
Just (IPA "i\720") -- iː
Instances
Vowel length; also serves as a notation for consonant gemination in the IPA
OverLong | |
HalfLong | |
Long | |
Short | The default/unmarked length; using this constructor doesn't affect the default IPA representation of the segment |
ExtraShort |
Instances
Eq Length Source # | |
Ord Length Source # | |
Show Length Source # | |
Generic Length Source # | |
type Rep Length Source # | |
Defined in Language.IPA.Types type Rep Length = D1 ('MetaData "Length" "Language.IPA.Types" "ipa-0.2-inplace" 'False) ((C1 ('MetaCons "OverLong" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "HalfLong" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Long" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Short" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtraShort" 'PrefixI 'False) (U1 :: Type -> Type)))) |
data ToneContour Source #
Lexical tone represented as a contour
Rising | |
Falling | |
HighRising | |
LowRising | |
HighFalling | |
LowFalling | |
RisingFalling | |
FallingRising | |
GlobalRise | |
GlobalFall |
Instances
Lexical tone with Chao-style tone letters
Instances
Eq LevelTone Source # | |
Ord LevelTone Source # | |
Defined in Language.IPA.Types | |
Show LevelTone Source # | |
Generic LevelTone Source # | |
type Rep LevelTone Source # | |
Defined in Language.IPA.Types type Rep LevelTone = D1 ('MetaData "LevelTone" "Language.IPA.Types" "ipa-0.2-inplace" 'False) ((C1 ('MetaCons "ExtraHighTone" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HighTone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MidTone" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "LowTone" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtraLowTone" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DownStep" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UpStep" 'PrefixI 'False) (U1 :: Type -> Type)))) |
data Roundedness Source #
Vowel roundedness
Instances
Eq Roundedness Source # | |
Defined in Language.IPA.Types (==) :: Roundedness -> Roundedness -> Bool # (/=) :: Roundedness -> Roundedness -> Bool # | |
Show Roundedness Source # | |
Defined in Language.IPA.Types showsPrec :: Int -> Roundedness -> ShowS # show :: Roundedness -> String # showList :: [Roundedness] -> ShowS # | |
Generic Roundedness Source # | |
Defined in Language.IPA.Types type Rep Roundedness :: Type -> Type # from :: Roundedness -> Rep Roundedness x # to :: Rep Roundedness x -> Roundedness # | |
type Rep Roundedness Source # | |
Vowel backness
Instances
Eq Backness Source # | |
Ord Backness Source # | |
Defined in Language.IPA.Types | |
Show Backness Source # | |
Generic Backness Source # | |
type Rep Backness Source # | |
Defined in Language.IPA.Types type Rep Backness = D1 ('MetaData "Backness" "Language.IPA.Types" "ipa-0.2-inplace" 'False) ((C1 ('MetaCons "Front" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NearFront" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Central" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NearBack" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Back" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Vowel height
Instances
Eq Height Source # | |
Show Height Source # | |
Generic Height Source # | |
type Rep Height Source # | |
Defined in Language.IPA.Types type Rep Height = D1 ('MetaData "Height" "Language.IPA.Types" "ipa-0.2-inplace" 'False) ((C1 ('MetaCons "Close" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "NearClose" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CloseMid" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Mid" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OpenMid" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NearOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Open" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Sibilance for fricative consonants
Phonation (voicing)
Consonantal place of articulation
Bilabial | |
LabioDental | |
LinguoLabial | |
Dental | |
Alveolar | |
PostAlveolar | |
Retroflex | |
Palatal | |
Velar | |
Uvular | |
Pharyngeal | |
Glottal |
Instances
Consonantal manner of articulation
Nasal | |
Plosive | |
Fricative Sibilance | |
Affricate Sibilance | |
Approximant | |
Flap | |
Trill | |
LateralAffricate | |
LateralFricative | |
LateralApproximant | |
LateralFlap |
Instances
Pulmonic and non-pulmonic consonants
Pulmonic Phonation Place Manner | |
Ejective Place Manner | |
Implosive Phonation Place | |
Click Place | |
DoublyArticulated Phonation Place Place Manner |
Instances
Multiple segments, or combination of multiple segments with suprasegmental feature
Syllable (t Segment) | A grouping of segments without extra suprasegmental information |
WithSuprasegmentalFeature SuprasegmentalFeature (Syllable t) | Articulatory features that affect/encompass the entire syllable |
Instances
Eq (t Segment) => Eq (Syllable t) Source # | |
Show (t Segment) => Show (Syllable t) Source # | |
Generic (Syllable t) Source # | |
Traversable t => ReprIPA (Syllable t) Source # | |
type Rep (Syllable t) Source # | |
Defined in Language.IPA.Types type Rep (Syllable t) = D1 ('MetaData "Syllable" "Language.IPA.Types" "ipa-0.2-inplace" 'False) (C1 ('MetaCons "Syllable" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t Segment))) :+: C1 ('MetaCons "WithSuprasegmentalFeature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SuprasegmentalFeature) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Syllable t)))) |
A single segment, or combination of a segment and articulatory feature
Consonant Consonant | Pulmonic and non-pulmonic consonants |
Vowel Height Backness Roundedness | |
Zero | A null/zero phone |
WithSegmentalFeature SegmentalFeature Segment | Various other articulatory features |
Instances
X-SAMPA is an ASCII encoding of the IPA (ca. 1993). Note that fewer
transcriptions are possible using X-SAMPA than the IPA, so certain valid
IPA
Segments
s have no direct equivalence using XSampa
. As with IPA
,
XSampa
is an instance of Semigroup
Textual representation of a speech segment or grouping of segments, with
zero or more articulatory features; encoded in IPA transcription. Note this
has a Semigroup
instance, so various IPA
s can conveniently be concatenated
with <>
pattern ClickConsonant :: Place -> Segment Source #
Converting to IPA representations
class ReprIPA a where Source #
Entities representable through IPA transcription
toIPA :: a -> Maybe IPA Source #
Produces an IPA
transcription given a valid Segment
; a result
of Nothing
indicates either an unattested-yet-possible segment, or one
considered impossible
Partial function for creating an IPA
. Useful if you are certain that
the sound in question is representable