Instructions:
I know that the docs are sparse I'm sorry this is my first Real Project. If you want to see the source, look here.F5 is a sound change application tool for conlanging that is (somewhat) feature aware and supports an amount of common IPA symbols. It processes the input text and produces an output; all configuration is done through the input text. Processing is done top down. The first line is applied first, then the next, and so on. This means that definitions only affect the lines below them, and words are only affected by sound change rules below themselves as well. You can use this to introduce loanwords at a particular point in a conlang's development.
There are four kinds of command in F5. These are:
- Comment
- Word
- Variable declaration
- Rule
Comment
Start a line with //, and everything will be ignored until the next line break.
Linebreaks serve no other purpose, and are not needed to separate any other command.
Word
A word is a sequence of unicode characters not including the reserved characters { } [ ] - > _ # , / = + | or any ASCII capital.
IPA is supported and encouraged, and some diacritics are supported as well.
This tool will attempt to compose a set of features depending on the IPA characters in the input.
For example, /w/ is analyzed as a Consonant which is Voiced, Bilabial, Approximant, and has an additional feature Velarized.
Diacritics add or modify features of the symbol (unicode character) they are attached to.
For more detail on the specific features, see the dicts.ml file in the source code.
You can also add a definition to a word to make it easier to track which input corresponds to which output.
To do this, follow a word with a space, |, another space, and then the definition.
The definition cannot include any reserved characters or whitespace.
Variables and variable declaration
ASCII capital letters represent variables. A variable corresponds to some set of features, positive or negative, and will match a letter with at least that subset of features.
A variable declaration is of the form P=[+feature]. Multiple features can be included in a feature set: P=[+feature,-voiced]. Do not include spaces.
A few default variables ae defined for convenience:
- A=matches any sound
- S=[+plosive]
- N=[+nasal]
- L=[+approximant]
- V=[+vowel]
- C=[+consonant]
Variables can be marked with a number placed immediately before them. If left empty, a variable treated as though marked as 0.
This is because variables bind to the first match in a word; CC matches two of the SAME consonant, while 1C2C can match two different consonants.
The bound variables can then be reused in the output: 1Vh2V -> 1V2V would remove intervocalic /h/, for example.
In contrast, CC -> C would reduce geminates but not any clusters.
Variables themselves can be marked with diacritics or featuresets, specifying the match even further. You can also add features in the output stage as well, modifying a bound variable.
Note that variables work differently in environments; they do not bind to any sound. xyz -> abc / V_V matches with any two vowels.
This works irrespective of if the variable V was used in the input side.
Rule
Rules are the heart of this tool; They define the changes that are applied to words.
Rules are of the form Rule = Pattern '->' Pattern ['/' Environment] (The environment is optional, but requires the forward slash when present).
One or more whitespace characters must placed between all elements of the rule.
A pattern is similar in construction to a word, with the addition of three more traits:
- Featuresets
- Variables
- Globs
Featuresets are the simplest. Following a symbol (both variable and raw) with a featureset formed as explained above (i.e., [+feature]) will add that feature to the symbol,
in the same way a diacritic would. You can also remove features with a negative, such as w[-velarized].
Some features, such as place or manner of articulation, will overwrite eachother: ʕ[+fricative] will not be both an approximant and a fricative
(Note that this tool treats /ʕ/ as an approximant by default, because that is how it's used. I am opinionated).
The types of features that a sound can only have one of are:
-
Vowels:
- frontness
- closeness
- rounding
- voicing
-
Consonants:
- place
- manner
- airstream
- voicing
Variables are as described in the above section.
Globs allow, essentially, for multiple rules to be combined into one.
They are formed as such: {a,b}, using any raw symbol but no variables.
A glob can be placed anywhere in the input or output patterns. If both sides have globs, they must contain the same amount of symbols.
The output can only have a glob if the input does, however, an input glob is allowed with a plain output.
Functionally, a glob expands to multiple rules by replacing itself with each of its symbols in turn. If both sides have globs, they are matched.
For example: {d,b}o -> ko turns both /do/ and /bo/ into /ko/,
while a{z,v}a -> a{s,f}a is the same as writing aza -> asa and ava -> afa.
Condtioning environments are an optional part of a rule.
They are formed much as you would expect; Like a pattern, but containing a mandatory underscore. This underscore stands for the input pattern being transformed. Sounds in the environment are not modified at all.
Environments can include variables (see above). An environment can also include #, placed at either the start or end (or both) of an environment.
The hashmark stands for the beginning or end of a word. For example, C[+voiced,+stop] -> C[-voiced] / _# devoices word-final stops.
IPA and features
This tool has a built in hardcoded dictionary of IPA characters and features.
It is possible to use features that aren't in this list, any string can be used in a featureset. However, the hardcoded features have some special advantages.
Mainly, there are aliases built in; "stop" and "plosive" both evaluate to 'Plosive.
Any diacritic can also be used. If it is not hardcoded, the feature will simply be the unicode codepoint printed in the format U+0000.
Any unicode character (other than diacritics or ASCII capitals) can also be used; however, if they are not recognized, they will be initialized with an empty featureset.
The mappings between recognized characters/diacritics and features can be found in dicts.ml.