Documente Academic
Documente Profesional
Documente Cultură
Jesse Bangs
Copyright
c 2009-2010 Jesse Bangs.
This manual and Phonix itself are licensed under the BSD license.
Phonix version 0.8.1
i
Table of Contents
3.6 Imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6.1 Importing files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6.2 std.features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.6.3 std.symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.6.4 std.symbols.diacritics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6.5 std.symbols.ipa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.6 std.symbols.ipa.diacritics . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.7 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.8 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1 Romanian. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1.1 ‘romanian.phonix’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.1.2 Input and output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Appendix A License . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Chapter 1: Quick Start Guide 1
operating systems. However, the specific way that you invoke ‘phonix’ will depend slightly
on your setup.
1. If you are using any version of Windows and ‘phonix.exe’ is in the current directory
or any directory in %PATH%, then you can simply call ‘phonix’ or ‘phonix.exe’. Phonix
requires .NET Framework 2.0 or later, which is standard on all recent versions of
Windows.
2. If you are using Linux, you can invoke Phonix with ./phonix.exe, provided that you
have the Mono runtime installed. If you installed using the .deb package, then the
prerequisites have already been installed for you. If you are building from source, there
is a make install target that will install a ‘phonix’ script without the .exe extension
in /usr/local/bin.
3. If you are using Mac OSX or a POSIX system other than Linux, you can invoke Phonix
with mono phonix.exe. You must have the Mono runtime installed, and you need to
explicitly call mono in order to run Phonix.
Chapter 3: The Phonix Language 4
3.1 Features
Phonological features are the contrastive elements that compose the phonemes in a phonol-
ogy. Features must be declared before they can be used in symbols or rules.
• Node feature values that test for the presence of a node (such as nd) can only be used
in the match and context portions of a rule. This is because it isn’t meaningful to
assign a "present" value directly to a node.
• Node feature values that test for the absence of a node (such as *nd) can be used
anywhere within a rule. Assigning a null value to a node within a rule implies assigning
a null value to all children of that node.
3.3 Symbols
A symbol in Phonix is a string of text that corresponds to a given feature matrix.
Symbols in Phonix are used for three things:
1. To define the phonetic symbols represented by the strings in your lexicon files.
2. To provide a convenient shortcut for writing rules that refer to specific phonemes.
3. To define the strings used to represent feature matrices in output.
1. A diacritic is not a segment of its own, but rather adds its features to the symbol that
it modifies. Take the symbol /s/ defined above, together with the nasality diacritic
/~/. The combination of these symbols /s~/ results in a single feature matrix with the
features [+cons -son +cont +str -vc +ant -dist +nas]. These are the feature values
for /s/, with the +nas value of /~/ added to them.
2. Diacritics must follow a base symbol in your input. If /s/ is a base symbol and /~/
is a diacritic, then s is a valid input string, as is s~. However, ~ and ~s are not valid
input strings. Phonix will quit with an error if it encounters such a string.
3. When representing the output of your rules with symbols, Phonix will first look for
a base symbol that matches the output feature matrix. It then adds diacritics as
necessary. Phonix will try to find the fewest number of diacritics necessary to represent
your output.
For many examples of diacritic definitions, see Section 3.6.4 [std.symbols.diacritics],
page 27.
rule match-strictly
a => e
rule match-with-macros
[(a)] => [(e)]
Here, the rule match-strictly will only match the input a. It will not match a’, where
a carries the stress diacritic. Likewise, if the input segment matches the a, then it will be
replaced with exactly e, preserving none of the original values from the input segment.
The rule match-with-macros, on the other hand, will match any input segment that
has the features which are specified for a, i.e. [-cons +son +syll -hi +lo -fr +bk]. Since
[+stress] is not specified for a, both a and a’ can match this rule. In the same way, only
the features specified by the symbol e will be replaced by this rule action, leaving the value
for stress unchanged.
You can freely combine symbol macros with regular feature values in a feature matrix:
Chapter 3: The Phonix Language 9
rule match-with-stress
[(a) +stress] => [(e)]
Symbol macros are expanded when your Phonix file is parsed. If you run your file
in debug mode, Phonix will show you what your rules look like after macros have been
expanded.
3.4 Rules
The rule is the most complex and the most variable object in Phonix. A rule describes the
conditions under which one phonological unit is transformed into another.
The matrix [+cont] causes this rule to match all segments that have the feature +cont,
and applies the feature +vc to them.
Most rules do not apply everywhere, however, but have some context. The context in
Phonix consists of, at minimum, the character _ with any number of feature matrices or
symbols before or after it. The _ character stands for the segment(s) of the match/action.
Regardless of how many segments are matched or transformed, you must write only one
underscore. For example, let’s modify our previous rule to only apply after a nasal:
rule postnasal-voicing
[+cont] => [+vc] / [+nas] _
In this case, the context / [+nas] _ indicates that the segments matched must be pre-
ceded by a segment with the feature +nas.
To indicate word boundaries we use $. The $ character can stand for either the beginning
or the end of a word. It can only appear as the first or the last character of the rule context
(or both), but it cannot appear internal to a rule. Suppose that we wish to further restrict
our rule to only apply at the end of a word. In this case, we write this:
rule final-postnasal-voicing
[+cont] => [+vc] / [+nas] _ $
If we wish to add an exception to this rule, we use the excluded context. This is indicated
by a double-slash // after the context. If the rule includes an excluded context, then phonix
will check both that the context matches the input and that the excluded context does not
match. For example:
rule postnasal-voicing-with-exception
[+cont] => [+vc] / [+nas] _ // N _
Here we voice continuants after nasals, except after /N/ (the velar nasal).
If you wish, you can also indicate the excluded context without the context:
rule voicing-with-exception
[+cont] => [+vc] // $ _
This voices all continuants unless they are the first segment in the word. Note that we
could accomplish the exact same thing with:
rule voicing-with-exception
[+cont] => [+vc] / [] _
Here, we specify that voicing occurs when the continuant is preceded by any segment.
(A feature matrix with no values, indicated by [], acts as a match for any segment.) This
illustrates that an excluded context can usually be indicated by a properly constructed
matching context and vice-versa. The excluded context construct is provided only to make
rules clearer and easier to understand.
This is a familiar rule found in many Romance languages, which adds an epenthetic /e/
following an initial cluster with /s/.
The opposite of insertion is deletion, in which something becomes nothing. E.g.:
rule final-cons-deletion
[-son] => * / _ $
Here, the "something" is any non-sonorant (-son), which becomes "nothing" when fol-
lowed by the word boundary.
Our nothing character is important when writing rules in which multiple segments be-
come one. For example, to express that /s/+/k/ becomes /S/, you cannot write the follow-
ing:
# DOES NOT WORK - Phonix will not compile this rule
rule sk-coalescence
sk => S
The problem with this is that you must have the same number of segments both before
and after the => symbol. To accomplish what you want, just specify that one of the input
segments is deleted:
rule sk-coalescence
sk => S*
This rule will compile and function as expected.
In order for a variable feature value to be meaningful, it has to occur at least twice in a
rule. Consider the following modified example:
rule nasal-assimilate-mod
[-cont] => [$nas] / _ [-cont $nas $son]
This rule parses and executes without any warning, but the value $son in the rule context
has no effect, since there is no other instance of $son to match against.
The following example, however, will generate a warning message:
rule nasal-assimilate-mod2
[-cont] => [$nas $son] / _ [-cont $nas]
In this case we are trying to set the value of son in the rule action, but the value for
son is not defined anywhere else in the rule. Since this usually indicates a mistake, Phonix
issues a warning and leaves the value of son unchanged.
There are also operators for greater than, greater than or equal, less than, and less than
or equal, which have the familiar numeric notation:
sc>2 # matches sc=3, sc=4, etc.
sc>=2 # matches sc=2, sc=3, etc.
sc<2 # matches sc=1, sc=0
sc<=2 # matches sc=2, sc=1, sc=0
These numeric comparison operators will only match if the segment they’re matching
against has a defined value for sc. They will always return false when comparing against
*sc.
The operator * following a parenthesized segment indicates that the segment may appear
zero or more times.
rule multiple-r
a => i / k(r)* _
This rule will match against /ka/ and /kra/, as the one above, but it also matches /krra/
or /krrrrrrrrrra/ or any number of other repetitions of /r/.
The operator + following a parenthesized segment indicates that the segment may appear
one or more times.
rule at-least-one-r
a => i / k(r)+ _
This rule, unlike the ones above, does not match /ka/. It does, however, match /kra/,
/krra/, and any other input with at least one /r/.
3.4.9.1 direction
The direction parameter defines the direction in which the rule scans for matching
contexts. This can be important if one application of a rule may create the context
for further applications. To specify the direction for a rule, specify the parameter
direction=direction-value . Valid direction values are left-to-right and
right-to-left, with left-to-right as the default.
A good example for a direction-sensitive rule is voice agreement. Suppose we have a
rule that all consonants in a cluster must agree with the voice of the last consonant. The
following rule does not accomplish that:
Chapter 3: The Phonix Language 16
3.4.9.2 filter
Rule filters are a powerful way to express rules that only apply to certain classes of segments
and ignore intervening segments. A familiar real-world example of this kind of rule is vowel
harmony, which typically works on vowels regardless of intervening consonants. To add a
filter to a rule, specify the parameter filter=filter-value , where the filter-value may be
a feature matrix or a symbol.
When you apply a filter, the rule acts as if those segments not matching the filter were
not present at all in the input. Take the following vowel harmony rule:
rule vowel-harmony (filter=[+syll])
[-fr] => [+fr -bk] / _ [+fr]
This rule turns back vowels into front vowels when followed by other front vowels, and will
work correctly regardless of how many non-vowel segments intervene between the vowels.
The filter [+syll] effectively removes all non-syllabic constants from the input for the
duration of the rule. Therefore, the context of the rule is written as if the front vowel that
triggers vowel harmony immediately follows the matching vowel.
3.4.9.3 persist
A persistent rule is a rule that applies at all stages of the phonology, rather than at a
specific point in the derivation of the output form. Persistent rules in Phonix are indicated
with the rule parameter persist, which does not take any value. The usual purpose of a
persistent rule is to ensure that redundant features values are maintained. For example,
in most languages all segments that are +syll are also +vc. If we wanted to enforce this
redundancy, we could do so with the following persistent rule:
rule voiced-syllabics (persist)
[+syll] => [+vc]
Of course, this rule only serves some purpose if there are other processes which might
make a voiceless segment syllabic.
Persistent rules are applied once at the start of rule application, and thereafter every
time that some other rule changes the input. This is true regardless of where in your Phonix
Chapter 3: The Phonix Language 17
file the persistent rule is defined–persistent rules ignore normal rule ordering. However, the
ordering of persistent rules relative to each other is maintained.
3.4.9.4 applicationRate
A sporadic rule is a rule which does not apply to every word in the input lexicon, but
rather applies randomly to some words and not others. Phonix allows you to create this
kind of rule with the rule parameter applicationRate=ratio . The ratio parameter to
applicationRate must be a decimal between 0 and 1. Examples:
# This rule deletes /b/ 25% of the time
rule sometimes-delete (applicationRate=0.25) b => *
3.5 Syllables
Many languages use syllables as an important phonological unit. For this reason Phonix
provides special syntax both for dividing input words into syllables with syllable templates
and for creating phonological rules that depend on syllable structure.
onsets and codas are optional by default. Onset clusters and coda clusters are not allowed
by this template, since only one segment is allowed in the onset.
If we wanted to allow an optional liquid to follow a stop in the onset cluster, we can
rewrite the syllable template this way:
syllable
onset [+cons]
onset [+cons -cont -son][+son +cont]
nucleus [-cons +son]
coda [+son]
Here onset appears twice, giving two alternate templates for syllable onsets, one which
allows any single [+cons] segment, and another which allows a stop ([+cons -cont -son])
followed by a liquid ([+son +cont]). Phonix will attempt to create syllables matching
either of the given templates.
Any of the syllable parts onset, nucleus, and coda can be repeated as many times as
desired. You can also abbreviate optional segments in a syllable template with (), as in the
following example that allows an optional sonorant to precede a non-sonorant in a syllable
coda:
syllable
onset [+cons]
nucleus [-cons +son]
coda ([+son])[+cons -son]
However, () is the only regex-like operator that can be used in a syllable template. The
extended operators ()+ and ()* are not allowed, and will result in parsing errors.
To specify that a syllable template should not allow codas (or, more rarely, allow no
onsets), the coda or onset element should be omitted:
syllable
onset [+cons]
nucleus [-cons +son]
This creates (C)V syllables and does not allow codas. The nucleus element may not be
omitted.
• If you want to force a word to be resyllabified after every change, you may use the
persist syllable parameter (see Section 3.5.3 [Syllable parameters], page 19). However,
since insertions and deletions often accompany changes in the syllable template, you
may want to follow an insertion or deletion rule with a new syllable rule.
If you use the -d or --debug flags to ‘phonix’, then when a syllable rule applies, the
new syllabification of the word is printed. Every syllable is written inside angle brackets
(<>), with a double colon (::) between the onset and the nucleus, and a single colon (:)
between the nucleus and the coda. For example, the syllabification of hypothetical word
like abarno with a (C)V(C) template is presented as:
<a> <b :: a : r> <n :: o>
The spacing is used to avoid confusing the syllable separators with the colon symbol.
3.5.3.2 nucleusPreference
The nucleusPreference parameter controls whether syllable nuclei prefer to fall to the
right or to the left in situations where there is ambiguity as to where the nucleus should
fall. It takes two values, right and left. The value right is the default.
This in turn controls whether rising diphthongs or falling diphthongs are preferred in
situations where either one is allowed by the syllable template. Consider an underlying
vowel sequence /ui/ with allophonic rules that allow /u/ to be both [u] and [w], and /i/ to
be [i] and [j]. We’ll represent this by the following extremely simplified syllable template:
syllable
onset []([+son])
nucleus [-cons +son]
coda []
This template requires vowels in the nuclear position, but allows anything into onsets
and codas. Onsets may also form clusters with sonorants as the second element. Given this
template, the input string bui could be syllabified as <bu :: i> (i.e. [bwi]) or <b :: u : i>
(i.e. [buj]).
The default case is to produce <bu :: i>, which is equivalent to nucleusPreference=right.
To force the nucleus to the left, use nucleusPreference=left:
syllable (nucleusPreference=left)
onset []([+son])
nucleus [-cons +son]
coda []
This template will produce syllables with the nuclei aligned to the left whenever possible,
creating <b :: u : i> ([buj]) as the syllabification of bui.
3.5.3.3 persist
The persist parameter has the same affect as the persist parameter on rule declarations:
it causes the syllabification rule to apply after every other rule, ensuring that words are
automatically resyllabified after every change.
Chapter 3: The Phonix Language 21
3.6 Imports
You can include Phonix files from other Phonix files using the import command. There are
also several built-in resources that you can use, which are covered in this section.
3. In a named resource.
The named resources that Phonix looks for are special "filenames" that represent built-
in feature or symbol sets meant to simplify common linguistic tasks. The following sections
describe these resources.
3.6.2 std.features
The standard feature set contains the commonly used features that you probably learned
about in your introductory Phonology class. You include the standard feature set by writing
import std.features. All of the features in the standard set are binary features given in
their abbreviated forms. The features are gathered into a feature tree following this naming
convention: leaf features are written in lower case, node features are written in initial caps,
and the ROOT feature is written in all caps. The tree has the following structure:
+ROOT
+Place
+Labial
-ro
+Coronal
-ant
-dist
+Dorsal
-hi
-lo
-bk
-fr
+Glottal
-vc
-sg
-cg
+Manner
-cont
-nas
-str
-lat
-dr
+Class
-cons
-syll
-son
The std.features file itself looks like this:
# Segment classes
feature cons # consonantal
feature son # sonorant
feature syll # syllabic
feature Class (type=node children=cons,son,syll)
# Glottal features
Chapter 3: The Phonix Language 23
feature vc # voice
feature sg # spread glottis
feature cg # constricted glottis
feature Glottal (type=node children=vc,sg,cg)
# Manner of articulation
feature cont # continuant
feature nas # nasal
feature str # strident
feature lat # lateral
feature dr # delayed-release
feature Manner (type=node children=cont,nas,str,lat,dr,Class)
# Labial features
feature ro # round
feature Labial (type=node children=ro)
# Coronal features
feature ant # anterior
feature dist # distributed
feature Coronal (type=node children=ant,dist)
# Dorsal features
feature hi # high
feature lo # low
feature bk # back
feature fr # front
feature Dorsal (type=node children=hi,lo,bk,fr)
3.6.3 std.symbols
The standard symbol set contains over 100 phonetic symbols that you can use for input
and output. In order to use the standard symbol set, you have to first import the standard
feature set std.features, since the standard symbols depend on the features defined in
that set. You include the standard symbols by writing import std.symbols. The standard
symbol set uses only 7-bit ASCII characters and is based on the X-SAMPA IPA encoding.
### CONSONANTS ###
## Obstruents ##
# Labial #
Chapter 3: The Phonix Language 24
# Dental #
# Alveolar #
# Palatal #
# Retroflex #
# Velar #
# Uvular #
# Pharyngeal #
# Glottal #
## Sonorants ##
# Labial #
# Alveolar #
# Retroflex #
# Postalveolar #
# Velar #
# Uvular #
## Vowels ##
# High tense #
# High lax #
# High mid #
# Schwa #
# Open mid #
# Open lax #
Chapter 3: The Phonix Language 27
# Open #
## Semivowels ##
3.6.4 std.symbols.diacritics
The standard diacritic set includes diacritics intended for use with std.symbols. These
diacritics are 7-bit ASCII characters based on the X-SAMPA IPA encoding.
## Consonant place modifiers ##
# Labialized
symbol ’_w’ (diacritic) [-ro]
# Linguolabial
symbol ’_N’ (diacritic) [-ro +ant]
# Dental
symbol ’_d’ (diacritic) [+ant +dist]
# Palatalized
symbol ’_j’ (diacritic) [-ant +dist]
# Velarized
symbol ’_G’ (diacritic) [+bk +hi]
# Pharyngealized
symbol ’_?\’ (diacritic) [+bk +lo]
## Vocoid modifiers ##
# Advanced
symbol ’_+’ (diacritic) [+fr]
# Retracted
symbol ’_-’ (diacritic) [+bk]
Chapter 3: The Phonix Language 28
# Lowered
symbol ’_o’ (diacritic) [+lo]
# Raised
symbol ’_r’ (diacritic) [+hi]
# Centralized
symbol ’_"’ (diacritic) [-hi -lo -fr -bk]
## Manner modifiers ##
# Voiceless
symbol ’_0’ (diacritic) [-vc]
# Voiced
symbol ’_v’ (diacritic) [+vc]
# Syllabic
symbol ’=’ (diacritic) [+syll]
# Non-syllabic
symbol ’_^’ (diacritic) [-syll]
# Nasalized
symbol ~ (diacritic) [+nas]
3.6.5 std.symbols.ipa
The IPA symbol set contains the same notional symbols as std.symbols, but it uses IPA
Unicode characters instead of ASCII X-SAMPA. To use the IPA symbol set, write import
std.features and import std.symbols.ipa at the top of your file.
Unfortunately, not all IPA symbols used in this set are present in the fonts used in this
PDF, so many of these symbols may appear to be blank.
### CONSONANTS ###
## Obstruents ##
# Labial #
# Dental #
# Alveolar #
# Palatal #
# Retroflex #
# Velar #
# Uvular #
# Pharyngeal #
# Glottal #
## Sonorants ##
# Labial #
# Alveolar #
# Retroflex #
# Postalveolar #
# Velar #
# Uvular #
## Vowels ##
# High tense #
Chapter 3: The Phonix Language 31
# High lax #
# High mid #
# Schwa #
# Open mid #
# Open lax #
# Open #
symbol [-cons +son +syll -fr +bk -hi +lo -ro +str]
## Semivowels ##
3.6.6 std.symbols.ipa.diacritics
This set contains IPA diacritics for use with std.symbols.ipa. The diacritics contained
here are the same as those in std.symbols.diacritics, but rendered in IPA Unicode.
## Consonant place modifiers ##
# Labialized
symbol (diacritic) [-ro]
# Linguolabial
symbol (diacritic) [-ro +ant]
# Dental
symbol (diacritic) [+ant +dist]
# Palatalized
symbol (diacritic) [-ant +dist]
# Velarized
symbol (diacritic) [+bk +hi]
# Pharyngealized
symbol (diacritic) [+bk +lo]
## Vocoid modifiers ##
# Advanced
symbol (diacritic) [+fr]
# Retracted
symbol (diacritic) [+bk]
# Lowered
symbol (diacritic) [+lo]
# Raised
symbol (diacritic) [+hi]
# Centralized
Chapter 3: The Phonix Language 33
## Manner modifiers ##
# Voiceless
symbol (diacritic) [-vc]
# Voiced
symbol (diacritic) [+vc]
# Syllabic
symbol (diacritic) [+syll]
# Non-syllabic
symbol (diacritic) [-syll]
# Nasalized
symbol (diacritic) [+nas]
3.7 Comments
In Phonix the comment character is #. Everything from # to the end of a line is a comment
and is silently ignored by Phonix (unless the # character is embedded in a string). For
example:
# This is a comment
feature ex # this is also a comment
3.8 Strings
Any time that Phonix expects you to provide a string, as for feature names, symbols, or
rule names, you can type almost anything you want. The only exception is if the contents
of the string somehow confuse the Phonix compiler. Don’t do that. Everything else is fine.
The long, boring, technical version follows.
Phonix recognizes two types of strings: bare strings and quoted strings. Most of the
time you can use bare strings, which keeps your Phonix file nice and uncluttered. The rules
for bare strings are extremely forgiving, to minimize the situations where you must use a
quoted string:
• A bare string cannot contain whitespace. More specifically, whitespace is always inter-
preted as a token delimiter outside of a quoted string, which implicitly means it cannot
be part of a string.
• A bare string cannot contain any of the characters []()<>$= at all.
• A bare string cannot begin with any of the characters +-*/#_"’. However, these
characters can appear in the middle of strings.
This should be enough for almost all cases, but in case it’s not, you can also create a
quoted string by surrounding a string with single quotes (’) or double quotes ("). If you are
using a quoted string in a rule or a symbol declaration, the opening quote must be preceded
Chapter 3: The Phonix Language 34
by a space. Anything at all can appear inside a quoted string, except for another quote, of
course. There is no mechanism for escaping quotes, so if you need to include a single quote
then surround your quote with double quotes, and vice versa.
The following are valid strings that could be used for feature names, rule names, or
symbols:
foo
foo-bar
foo+
bar?
!
b*a*z
blu"
"+++"
’_’
’"’
The following are NOT valid strings and cannot be used for feature names, rule names,
or symbols:
-foo # looks like a feature value
_foo # ambiguous in rule context
foo() # cannot use parentheses
foo$ # cannot use dollar sign
Chapter 4: Examples 35
4 Examples
The following examples illustrate common use cases for Phonix.
4.1 Romanian
The following files define a phonology for contemporary Romanian, and illustrates how most
of the surface alternations in Modern Romanian can be derived. Note that the example is
somewhat incomplete: the input represents an internal reconstruction of Proto-Romanian,
not Proto-Romance or Vulgar Latin, and there may be a few alternations that have slipped
by. However, the majority of the active phonological processes in Romanian should be
represented.
4.1.1 ‘romanian.phonix’
import std.features
#
# We add a feature for stress, which is important for many rules
#
feature stress
#
# We create our own symbol set, defining only Romanian phonemes
#
# Unstressed vowels
symbol a [+syll -cons +son -hi +lo -fr -bk -stress]
symbol e [+syll -cons +son -hi -lo +fr -bk -stress]
symbol o [+syll -cons +son -hi -lo -fr +bk +ro -stress]
symbol @ [+syll -cons +son -hi -lo -fr -bk -stress]
symbol i [+syll -cons +son +hi -lo +fr -bk -stress]
symbol u [+syll -cons +son +hi -lo -fr +bk +ro -stress]
symbol 1 [+syll -cons +son +hi -lo -fr -bk -stress]
# Stress diacritic
symbol "’" (diacritic) [+stress]
# Non-syllabic vocoids
symbol j [-syll -cons +son +hi -lo +fr -bk -stress]
symbol w [-syll -cons +son +hi -lo -fr +bk +ro -stress]
# Non-syllabic diacritic
symbol ‘ (diacritic) [-syll]
# Labials
symbol p [+cons +ro -son]
symbol b [+cons +ro -son +vc]
Chapter 4: Examples 36
# Dentals
symbol t [+cons +ant -son]
symbol ts [+cons +ant -son +dr]
symbol d [+cons +ant -son +vc]
symbol dz [+cons +ant -son +dr +vc]
symbol s [+cons +cont -son +ant]
symbol z [+cons +cont -son +ant +vc]
symbol n [+cons +ant +son +nas]
symbol l [+cons +ant +son +lat]
symbol r [+cons +ant +son +cont]
# Palatals
symbol tS [+cons -son -ant +dist +dr]
symbol dZ [+cons -son -ant +dist +vc +dr]
symbol S [+cons -son -ant +cont +dist]
symbol Z [+cons -son -ant +cont +dist +vc]
# Velars
symbol k [+cons -son +hi]
symbol g [+cons -son +hi +vc]
symbol h [+cons -son +hi +cont]
#
# Here we begin with the rules
#
rule initial-iotacization
* => j / $ _ [+fr -hi -lo]
# Assimilate palatalization
rule assimilate-palatals
[+cons -son *ro] => [-ant +dist] / _ [-ant +dist]
# Simplify /dz/
rule simplify-dz
dz => z
# Break stressed mid vowels into semivowel + a when the next syllable contains
# a non-high vowel
rule breaking (filter=[+syll])
[-hi -lo +stress] * => [-syll -stress] a’ / _ [-hi *ro]
Appendix A License
This is the license for the Phonix Phonological Transformation Language, the program
‘phonix.exe’ in source and binary forms, and for the Phonix manual.
Copyright (C) 2009 Jesse Bangs All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright * notice, this list of
conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright * notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of Jesse Bangs nor the names of its contributors * may be used
to endorse or promote products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIB-
UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.