Lexifer documentation
Contents
- About NSCA
- Interface
- Using comments
- Anatomy of a rule
- Change basics
- Categories
- Features
- Condition basics
- Simple condition
- Multiple conditions in one rule
- Word boundaries
- Wildcard
- Matching previous expression
- Matching multitudes of previous expression
- Matching multitudes of wildcards
- Exception basics
- Intermediate rules
- Advanced rules
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Matching the right character
- Flags
- Do, Then and Otherwise
- Clusterfield
- Cheatsheat
About NSCA
This is the complete documentation for NSCA version 1.0.0
Interface
Use the Apply button
Options
Verbose mode
File save / load
Use the Save
button to download your sound changes as a file called 'lexifer.txt', or what you named your file in the File name:
field. The file is always a ".txt" type.
Use the Load
button to load a file on your system into the file editor.
Using comments
Comments are made with a semicolon ;
anything after it on the same line is treated as a comment. Comments are useful to explain what a rule does.
; This is a comment
e > o ;and this is a comment following a rule.
Anatomy of a rule
CHANGE / CONDITION ! EXCEPTION | FLAG
Every rule must begin on a new line and contain a CHANGE. The CONDITION, EXCEPTION or FLAG parts are optional.
Change basics
The format of The Change can be expressed as BEFORE > AFTER
.
BEFORE
specifies which part of the word is being changed. Then followed by a space and the >
character. >
can be swapped with either ->
, =>
, ⇒
or →
if you prefer. AFTER
is what BEFORE
is changing into, or in other words, replacing.
Simple change
Lets look at a simple unconditional rule.
; Replace every o with an x
o -> x
; bodido ==> bxdidx
In this rule, we see every instance of o become x.
Concurrent change
A concurrent change is achieved by listing multiple phonemes in BEFORE
separated by commas, and listing the same amount of resultant phonemes in AFTER
separated by commas.
; Switch o and e around
o, a -> a, o
; boda ==> bado
Notice that the above example is different to the example below:
o -> a
a -> o
; boda ==> bodo
where each change is on its own line. We can see o
merge with a
, then a
becomes o
.
Merging change
Merging change is accomplished by placing a list of phonemes in BEFORE
separated by spaces.
; Three phonemes becoming two phonemes
ʃ z, dz -> s, d
; zeʃadzas ==> sesadas
Optional change
Optional change only works when it connects an expression without spaces.
; Merge x and xw into h
x(w) -> h
; xwaxaħa ==> hahaħa
Optional change can also attach to a list of phonemes in a set of curly braces.
; Merge x, xw, ħ and ħw into h
{x ħ}(w) -> h
; xwaxaħa ==> hahaha
The optionalised segment can also have a result in AFTER
if it is captured.
; Like the previous rule, but preserve labialisation
{x ħ}(w) -> h(w)
; xwaxaħa ==> hwahaha
The optionalised segment can also be a concurrent change, or
; Like the previous rule, but preserve palatalisation and labialisation
{x ħ}(w, j) -> h(w, j)
; xwaxjaxa ==> hwahjaha
a merging change.
; Like the previous rule, but preserve palatalisation and merge it with labialisation
{x ħ}(w j) -> h(j)
; xwaxjaxa ==> hjahjaha
Categories
[p t k] > [b d g] / [vowel]_[vowel]
plosive = p t k
fricative = f s x
vowel = a e i o u
[plosive] > [fricative] / [vowel]_[vowel];
; papatakak ==> pafasaxak
Features
featureset: ipa
[nasal]
The other featureset is called ANSX-SAMPA
featureset: ansx-sampa
[nasal]
Condition basics
/ PRE_POST
Conditions are placed after a forward slash. The condition may also be called the environment.
Simple condition
a -> e / p_p
; apaptat ==> apeptat
Multiple conditions in one rule
a -> e / p_p, t_t
; apaptat ==> apeptet
Word boundaries
a -> e / p_p#
; apappap ==> apappep
Wildcard
a -> e / _[]
; apappap ==> apappep
Previous
a -> e / r~_-
; apappap ==> apappep
Multitudes of previous
a -> e / r+_-
; apappap ==> apappep
Multitudes of wildcard
a -> e / r[]+_
; apappap ==> apappep
Exception basics
Exception without context
Simple Exception
Complex Exception
The below rule demonstrates multiple exceptions, word boundaries, wildcards and previouses
a -> o ! #_, _#
; apappapa ==> apoppopa
Word-based exception
swore sworn
Word-based exceptions
Intermediate rules
Insertion
^ -> a / b_t
; bt ==> bat
Deletion
b -> ^
; bubda ==> uda
Gemination
p -> p@ / a_a
Degemination
p -> ^ / @_
Advanced rules
Metathesis
Reordering of phonological features in a word
Local metathesis
One-place metathesis
Gascon forming word initial cluster except where stress first syllable or first consonant is m or h
An intervocalic stop + nasal sequence will become nasal + stop
[stop]&[nasal] -> 2&1 / V12V
;watna > wanta
[stop]&r -> 12& / #_+_ ! #"
;kabatros > krabatos
Long-distance metathesis
v&l -> l&v / _._
;cavalry > calavry
v&l -> 21& / _._
;cavalry > calvary
r&o&l -> l&^&r
/_...[plosive]__
; parabola ==> palabra
Blockers and non-blockers
[a i u] > [ã ĩ ũ] / [ã ĩ ũ].*_{cons(nonblocker)}
pabãdruliga > pabãdrũlĩga
[i ɯ] > [y u] / {vowel([ö y o u])}.*_
pödi-podɯ-pedi > pödy-podu-pedi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ignore
ignore: \. "
tt > dd
; at.ta ==> ad.da
Multi-character symbol
Escape character
Combining diacritics
Do, Then and Otherwise
Clusterfield
Regular expressions
Flags
S R F L percentage
Do, Then and Otherwise
Clusterfield
Cheatsheet
Symbol | Context | Example | Explanation |
---|---|---|---|
; | Anywhere | ; This is a comment | Anything after the symbol is ignored until newline. |
> | |||