Lexifer documentation

Contents

  1. Introduction on Lexifer
    1. Inputs
    2. Options
    3. File save / load
  2. Comments
  3. The change
    1. Simple change
    2. Concurrent change
    3. Collapsing change
    4. Optional change
    5. Deletion
    6. Insertion
    7. Gemination
    8. p > p@ / a_a

    9. Degemination
    10. p > ^ / @_

  4. The condition
    1. Simple condition
    2. Word boundaries
    3. Wildcard,
    4. Pickers and blockers
    5. Categories
    6. Features
    7. Ignore
    8. Support for digraphs
  5. Flags
    1. Reverse
    2. Strict
    3. Strict reverse
    4. First and last
    5. Percentage
    6. Case insensitive
  6. Clusterfield

About NSCA

This is the complete documentation for NSCA version 1.0.0

Lexifer is a word generator, AKA: vocabulary generator.

It is a modified copy of this, which is TypeScript version of Lexifer written by u/bbrk24. Software Copyright (c) 2021-2022 bbrk24Copyright (c), 2006-2023 William S. Annis.

Interface

Use the Examples dropdown button to load a number of example definitions into the file editor.

The phonology definition file editor is the main input. It defines the phonology and the word shapes of the word generator. There will already be be a default phonology definition in the file editor, or your previous phonology definition that you generated words with.

Use the Generate button to see Lexifer produce words.

Use the Copy button to copy the words to your clipboard.

Options

Use the Number of words textbox to choose the number of words to generate. The default number is 100.

Word-list mode will produce a list of words.

Paragraph mode will produce words that look vaguely like sentences by injecting punctuation into the word list and capitalising the first word of each of sentence.

Verbose mode will show, line by line, each step in creating each word.

Editor wrap lines will make the file editor jump to the next line if the line escapes the width of the file editor.

Remove duplicates will make sure all words generated are unique.

Force words will force the generator to try and generate the complete number of words requested within 30 seconds, despite the number of rejections / duplicates removed.

Sort words and Capitalise words should be self explanatory.

The Word divider textbox sets the delimiter, or in other words, what the content will be between each word in the output. It is a space ( ) by default. Use \n to get one word for each line.

File save / load

Use the Save button to download your phonology definition 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.

About NSCA

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.

The Change

Every rule must have a change.

The change begins by specifying which part of the word is being changed, called BEFORE. Then followed by a space and the > character. > can be swapped with either ->, => or if you prefer. Following > is called AFTER. AFTER is what BEFORE is changing into.

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 and listing the same amount of resultant phonemes in AFTER

o a e > a o i
; bodale ==> badoli

This is different to the below example where we can see o merge with a then a becomes o.

o > a
a > o
; boda ⇒ bodo

Collapsing change

Collapsing change is accomplished by placing a list of phonemes inside curly brackets

; Three phonemes becoming two phonemes
{ʃ z} dz > s d
; zeʃadzas > sesadas

Optional change

; merge xw and x into h
{x ħ}(w) > h
; xwaxaħa >hahaha
;  like the previous rule, but preserve labialisation
{x ħ}(w) > h(w)
; xwaxaħa >hahaha

Categories

Features

Deletion

Insertion

Gemination

Degemination

Environments

Before

After

Categories

[p t k] > [b d g] / [a e i o u]_[a e i o u]

{voiceless plosive} > {voiced plosive} / {vowel}_{vowel}

Categories from featuresets

Featureset ipa

Clusterfield

Regular expressions

| matches to either side of pipe

. = anychar or none, + = once or more of the previous char, * zero or more of the previous char, ? zero or once

~ Ignores any char until reaching the next match to the left or right if there is one

a > b / X.*_

o > x / {plosive(d)}.*_

dosotosodo > dxsxtosodx

[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

Flags

S R F L percentage

Cheatsheet

Symbol Context Example Explanation
; Anywhere ; This is a comment Anything after the symbol is ignored until newline.
>