| Copyright | (c) 2021 Rory Tyler Hayford |
|---|---|
| License | BSD-3-Clause |
| Maintainer | rory.hayford@protonmail.com |
| Stability | experimental |
| Portability | GHC Types representing segments representable in the IPA |
| Safe Haskell | None |
| Language | Haskell2010 |
Language.IPA.Types
Description
Synopsis
- newtype IPA = IPA {}
- mkIPA :: Text -> IPA
- newtype XSampa = XSampa Text
- data Segment
- data Consonant
- pattern PulmonicConsonant :: Phonation -> Place -> Manner -> Segment
- pattern EjectiveConsonant :: Place -> Manner -> Segment
- pattern ClickConsonant :: Place -> Segment
- pattern ImplosiveConsonant :: Phonation -> Place -> Segment
- data Manner
- data Place
- data Phonation
- data Sibilance
- data Height
- data Backness
- data Roundedness
- data Syllable t
- data SuprasegmentalFeature
- data ToneContour
- data LevelTone
- data Stress
- data Length
- = OverLong
- | HalfLong
- | Long
- | Short
- | ExtraShort
- 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 IPAException
Notation systems
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 IPAs can conveniently be concatenated
with <>
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 Segmentss have no direct equivalence using XSampa. As with IPA,
XSampa is an instance of Semigroup
Segments
A single segment, or combination of a segment and articulatory feature
Constructors
| Consonant Consonant | Pulmonic and non-pulmonic consonants |
| Vowel Height Backness Roundedness | |
| Zero | A null/zero phone |
| WithSegmentalFeature SegmentalFeature Segment | Various other articulatory features |
Instances
Consonants (pulmonic and non-pulmonic)
Pulmonic and non-pulmonic consonants
Constructors
| Pulmonic Phonation Place Manner | |
| Ejective Place Manner | |
| Implosive Phonation Place | |
| Click Place | |
| DoublyArticulated Phonation Place Place Manner |
Instances
Convenience patterns
These are convenience patterns for creating different types of Consonant
Segments, as the nesting of data constructors might otherwise be somewhat
troublesome
pattern ClickConsonant :: Place -> Segment Source #
Consonant features
Consonantal manner of articulation
Constructors
| Nasal | |
| Plosive | |
| Fricative Sibilance | |
| Affricate Sibilance | |
| Approximant | |
| Flap | |
| Trill | |
| LateralAffricate | |
| LateralFricative | |
| LateralApproximant | |
| LateralFlap |
Instances
Consonantal place of articulation
Constructors
| Bilabial | |
| LabioDental | |
| LinguoLabial | |
| Dental | |
| Alveolar | |
| PostAlveolar | |
| Retroflex | |
| Palatal | |
| Velar | |
| Uvular | |
| Pharyngeal | |
| Glottal |
Instances
Phonation (voicing)
Sibilance for fricative consonants
Constructors
| Sibilant | |
| NonSibilant |
Vowel features
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)))) | |
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)))) | |
data Roundedness Source #
Vowel roundedness
Instances
| Eq Roundedness Source # | |
Defined in Language.IPA.Types | |
| Show Roundedness Source # | |
Defined in Language.IPA.Types Methods showsPrec :: Int -> Roundedness -> ShowS # show :: Roundedness -> String # showList :: [Roundedness] -> ShowS # | |
| Generic Roundedness Source # | |
Defined in Language.IPA.Types Associated Types type Rep Roundedness :: Type -> Type # | |
| type Rep Roundedness Source # | |
Suprasegmentals
Multiple segments, or combination of multiple segments with suprasegmental feature
Constructors
| 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)))) | |
Suprasegmental features
data SuprasegmentalFeature Source #
Constructors
| 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 ToneContour Source #
Lexical tone represented as a contour
Constructors
| Rising | |
| Falling | |
| HighRising | |
| LowRising | |
| HighFalling | |
| LowFalling | |
| RisingFalling | |
| FallingRising | |
| GlobalRise | |
| GlobalFall |
Instances
Lexical tone with Chao-style tone letters
Constructors
| ExtraHighTone | |
| HighTone | |
| MidTone | |
| LowTone | |
| ExtraLowTone | |
| DownStep | |
| UpStep |
Instances
| Eq LevelTone Source # | |
| Ord LevelTone Source # | |
| 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)))) | |
Segmental articulatory features
Vowel length; also serves as a notation for consonant gemination in the IPA
Constructors
| 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 SegmentalFeature Source #
Various articulatory features with a diacritic represenation in the IPA.
These can be combined with Segments 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ː
Constructors
Instances
Errors
data IPAException Source #
Constructors
| InvalidIPA Text | |
| InvalidXSampa Text |