Phonex Constructs
A summary of all possible phonex constructs.
| Construct | Matches |
|---|---|
| x | The phone x. Matches regardless of diacritics. |
| x_y | The compound phone consisting of phones matched by x and y. |
| \unnnn | The phone with unicode value nnnn as a hexadecimal number. |
| \* | The * cover symbol. |
| \. | The . syllable boundary marker. |
| \+ | The + compound word marker. |
| \^ | The ^ intra-word pause maker. |
| 's' or "s" | The phone with text that matches the regular expression s (exact text including diacritics) |
| {f0, f1..., fn} | The phone with features f0 ... fn |
| {} | Any phone (empty feature set) |
| σ | Syllable, or the remainder of (see Syllable Matcher) |
| σ/X..Y/ | Portion of a syllable denoted by constituent type ids X and Y |
| Construct | Matches |
|---|---|
| (X) | X, as a capturing group |
| (X|Y) | X or Y, as a capturing group |
| (?=X) | X, as a non-capturing group |
| (name=X) | X, as a named, capturing group. name may consist of letters and numbers, but must start with a letter. |
| \n | The content matched by group n |
| (?<X) | Look behind and match X as a non-capturing group |
| (?>X) | Look ahead and match X as a non-capturing group |
| Construct | Matches |
|---|---|
| [xyz] | x, y, or z |
| [^xyz] | Not x, y, or z |
| Construct | Matches |
|---|---|
| . | Anything |
| \c | Any consonant |
| \g | Any glide |
| \v | Any vowel |
| \p | Any intra-word pause (i.e., ^) |
| \P | Any inter-word pause (e.g., (.), (..), …) |
| \w | Any consonant or vowel. |
| \W | Any non-word character (i.e., any character not matched by \w, e.g., same as [^\w]) |
| \s | Any stress marker |
| \t | Any tone number or tone melody |
| Construct | Matches |
|---|---|
| ^ | Beginning of input |
| $ | End of input |
| \b | A word boundary including beginning of input, end of input, and whitespace. |
| \S | A syllable boundary including 'forced' syllable boundaries such as beginning of input, end of input, and whitespace; and, if syllable constituent types are available, 'soft' syllable boundaries detected at syllable edges. |
| Construct | Matches |
|---|---|
| x:plugin('s') | x if, and only if, the plug-in matcher identified by plugin matches with expression s |
| x&y | x if, and only if, a diacritic attached to x matches the expression y. (e.g., h&{aspirated}will match all 'h's with aspirated diacritics.) |
| xː | Same as x&{long}. |
| xˑ | Same as x&{half-long}. |
| x!s | x if, and only if, the syllable stress of the phone matches s. Prefix
s with - to negate (e.g., !-1 means without primary
stress). |
| Construct | Matches |
|---|---|
| X? | X, once or not at all |
| X* | X, zero or more times |
| X+ | X, one or more times |
| X<n> | X, exactly n times |
| X<n,> | X, at least n times |
| X<,n> | X, zero to n times |
| X<n,m> | X, at least n but not more than m times |
| Construct | Matches |
|---|---|
| X?? | X, once or not at all |
| X*? | X, zero or more times |
| X+? | X, one or more times |
| X<n>? | X, exactly n times |
| X<n,>? | X, at least n times |
| X<,n>? | X, zero to n times |
| X<n,m>? | X, at least n but not more than m times |
| Construct | Matches |
|---|---|
| X?+ | X, once or not at all |
| X*+ | X, zero or more times |
| X++ | X, one or more times |
| X<n>+ | X, exactly n times |
| X<n,>+ | X, at least n times |
| X<,n>+ | X, zero to n times |
| X<n,m>+ | X, at least n but not more than m times |
| Construct | Matches |
|---|---|
| \n | Same content as group n |
| \{name} | Same content as named group |
| \{^n} | Different content from group n |
| \{^name} | Different content from named group |
| \{#name} | Same content as named group (ignoring diacritics) |
| \{name}[n] | Element at index n from named group (0-based) |
| \{name}[$] | Last element from named group |
| \{name}[n_] | First part of compound phone at index n |
| \{name}[_n] | Second part of compound phone at index n |
| {features({name})} | Phone with features matching named group. features is a dimension function
string composed of: P/p (place),
M/m (manner), V/v
(voicing), H/h (height),
B/b (backness), T/t
(tenseness), R/r (rounding). E.g.,
{PV({#C})} matches place + voicing of group C. |
| Construct | Matches |
|---|---|
| X↔Y | X in target aligned with Y in actual |
| X↔∅ | X in target aligned with a gap (deletion) |
| ∅↔Y | Gap in target aligned with Y in actual (insertion) |
| (X)↔(Y) | Group X aligned with group Y |
| X↔\{name} | X aligned with content of named group |
| X↔{features({name})} | X aligned with features of named group |
| Construct | Meaning |
|---|---|
| expr1 || expr2 | Union of matches from independent expressions |
| Construct | Meaning |
|---|---|
| /a | Requires alignment (set automatically when ↔ or ∅ is used) |
| /f | Deferred matching (set automatically for forward references in aligned expressions) |
| Construct | Meaning |
|---|---|
| /* ... */ | Block comment |
| // ... | Line comment (to end of line) |
