Vulgar: Language generator

Part-of-speech morphology

The Part-of-speech morphology option will create affixes for an entire part-of-speech. The left side of the = symbol must be the abbreviated part-of-speech (as it is in the dictionary) and the right needs a - symbol to create either a prefix or suffix, depending where it's placed:

  nm = -o

  nf = -a

  v = to-

The above example adds "o" to the end of any masculine noun, "a" to the end of any feminine noun, and "to" to the beginning of any verb.

Conditional rules

There may be scenarios where you want to create conditional rules. You can do this based on whether a RegEx pattern matches using the following syntax:

  partofspeech = IF [this regex pattern is in the word] THEN [apply this set of rules] ELSE [apply this set of rules]

For instance, let's say your prefix is s-, but if the root word already starts in an s you want to the prefix to sa- to avoid a double s. In RegEx, the ^ symbol represents beginning of a word. So we can say:

  n = IF ^s THEN se- ELSE s-

This changes sama to sesama, while ama changes to sama. Note that IF, THEN and ELSE must be capitalised.

Multiple IF statements can be used:

  n = IF ^s THEN sa- IF ^z THEN so- ELSE s-

(A note for the programmers reading, secondary IF statements are technically ELSE IF statements.)

Shorthand uppercase symbols can be used for classes of phonemes, for instance C to mean 'any consonant' and V to mean 'any vowel'.

  n = IF ^C THEN sa- ELSE s-

This means IF the root words stars with a consonant, apply sa-, ELSE if it begins with a vowel apply s-.

IF statements can apply affixes that match the vowel harmony of root word. Let's say you have a vowel harmony system of front vowels (i, e, a) and back vowels (u, o). IF [iea] will simply test for the presence of any of those vowels in the word, from there you can apply an affix that matches the vowel harmony:

  n = IF [iea] THEN -sa ELSE -so