-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathenums.py
134 lines (112 loc) · 2.61 KB
/
enums.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
from enum import Enum, auto
class Height(Enum):
CLOSE = auto()
NEAR_CLOSE = auto()
CLOSE_MID = auto()
MID = auto()
OPEN_MID = auto()
NEAR_OPEN = auto()
OPEN = auto()
class Backness(Enum):
FRONT = auto()
CENTRAL = auto()
BACK = auto()
class Phonation(Enum):
MODAL_VOICE = auto()
BREATHY_VOICE = auto()
CREAKY_VOICE = auto()
class Place(Enum):
BILABIAL = auto()
LABIODENTAL = auto()
INTERDENTAL = auto()
LINGUO_LABIAL = auto()
DENTAL = auto()
ALVEOLAR = auto()
POSTALVEOLAR = auto()
ALVEOLO_PALATAL = auto()
HISSING_HUSHING = auto()
RETROFLEX = auto()
PALATAL = auto()
PALATAL_VELAR = auto()
VELAR = auto()
UVULAR = auto()
PHARYNGEAL = auto()
EPIGLOTTAL = auto()
GLOTTAL = auto()
# Double articulations
LABIAL_ALVEOLAR = auto()
LABIAL_PALATAL = auto()
LABIAL_VELAR = auto()
UVULAR_EPIGLOTTAL = auto()
class Manner(Enum):
PLOSIVE = auto()
FRICATIVE = auto()
AFFRICATE = auto()
APPROXIMANT = auto()
TAP = auto()
TRILL = auto()
class Voice(Enum):
VOICELESS = auto()
VOICED = auto()
DEVOICED = auto()
class Length(Enum):
SHORTENED = auto()
SHORT = auto()
HALF_LONG = auto()
LONG = auto()
OVERLONG = auto()
class AdditionalArticulation(Enum):
PRE_ASPIRATED = auto()
PRE_GLOTTALISED = auto()
PRE_NASALISED = auto()
PRE_LABIALISED = auto()
PHARYNGEALISED = auto()
NASALISED = auto()
RAISED = auto()
LOWERED = auto()
ADVANCED = auto()
RETRACTED = auto()
BREATHY_VOICED = auto()
VOICELESS = auto()
CREAKY_VOICED = auto()
INGRESSIVE = auto()
RHOTACISED = auto()
STRONG_ARTICULATION = auto()
CENTRALISED = auto()
ATR = auto()
RTR = auto()
LESS_ROUNDED = auto()
MORE_ROUNDED = auto()
NON_SYLLABIC = auto()
MID_CENTRALISED = auto()
ASPIRATED = auto()
PALATALISED = auto()
LABIALISED = auto()
EJECTIVE = auto()
GLOTTALISED = auto()
VELARISED = auto()
LATERAL_RELEASED = auto()
UNRELEASED = auto()
SYLLABIC = auto()
APICAL = auto()
LAMINAL = auto()
WEAKLY_ARTICULATED = auto()
LABIO_PALATALISED = auto()
NASAL_RELEASED = auto()
AFFRICATED = auto()
EPILARYNGEAL_SOURCE = auto()
FRICTIONALISED = auto()
TENUIS = auto()
LINGUO_LABIAL = auto()
#
# Helper functions
#
def s(x):
"""
Extracts the name of an enum element.
Doesn't handle None.
"""
return x.name.lower().replace('_', '-')
def n(x):
"Extracts the name of an enum element or None."
return s(x) if x is not None else None