Greetings Guest
home > library > journal > view_article
« Back to Articles » Journal
PhoMo Rules
3▲ 3 ▼ 0
Explanation of PhoMo rules
This public article was written by Admin Sheep, and last updated on 30 Apr 2016, 04:18.

[comments] [history] Menu
1. What is PhoMo (3.0)?
2. PhoMo rule structure
3. Categories
4. Target (TRG) and Change (CHG)
5. Replace rules
6. Affix rules
7. Conditions (ENV and EXP)
8. Global conditions
9. Local conditions
10. Change types and conditions

This article will explain how to use rules for PhoMo 3.0 and give examples of the types of changes you're able to achieve with PhoMo 3.0. Apologies if this article is quite long and/or wordy, but it is better to be thorough than have gaps in information!

This article is also coupled with the ones below:
[PhoMo FAQs]
[PhoMo Page Help]
[PhoMo Examples Reference]

[top]What is PhoMo (3.0)?

PhoMo is a way of being able to change words using a set of rules. These can be used on the PhoMo engine page and with grammar tables to help conjugate/decline words.

[top]PhoMo rule structure

The PhoMo rules can be potentially broken into 5 'statements'. Each of these statements serve a purpose in determining the changes that can be made to a rule. The statements in a rule are broken up by using the / character. You only need to use as many /'s as you have rules. PhoMo determines which part of the rule is which statement by the order they're in. Below is the template that PhoMo uses and the name of each statement.
Target (TRG)/Change (CHG)/Environment (ENV)/Exception (EXP)/Else (ELS)

As you'll see above, each statement has a name, and its short code (in brackets). It is also good to note that sometimes, both Environment (ENV) and Exception (EXP) are referred to as Condition (COND).


Categories are a way that you can use PhoMo to mass change certain letters. For example, if you wanted to delete a vowel at the end of a word. Instead of writing a rule for each possible vowel, you can use one rule with a category containing vowels.

Categories are editable from the green menu > 'Phonology & Orthography' > 'Orthography Categories'. (A link to this page is also on PhoMo).

Categories within rules are always denoted with a capital letter. Any regular letter must use lowercase. Trying to use these the other way around will result in PhoMo incorrectly assessing your word for changes.

If you want to use capital letters in your PhoMo rules but do not want these to be categories, you can show PhoMo this by using ! at the start of the TRG or CHG arguments. This will tell PhoMo to ignore categories and treat all capital letters in that argument as a letter rather than a category.

Categories may not function properly when using polygraphs (for example <sh> or <thr>) in the category. This is because PhoMo is not able to account for these. The reason this was left out is because it is impossible for PhoMo to tell what are polygraphs and what are simply two or more adjacent monographs. While the distinction may be clear in one language, this is not the case cross-linguistically.

[top]Target (TRG) and Change (CHG)

In PhoMo 3.0, there are two types of changes that a rule can have. These are known as an affix rule, and a replace rule. These are both formed different ways, have different conditions, and have different purposes.

[top]Replace rules

In replace rules, the TRG and CHG statements can be either:
  • any lowercase letter (including special letters like á)
  • any uppercase letter (to represent a category)
  • # - to mark end of word (TRG only)
  • , - to separate a temporary category (for example a,e,i,o,u/a/_#)
  • @ - to specify an nth instance (CHG only)
  • ? - to specify the TRG reversed (CHG only)

An important thing to note is that if you are using a category for a TRG or CHG, then both TRG and CHG must be a single category each. This is because PhoMo wil do a 1-for-1 replacement within the categories. Any other letters present will break this algorithm. But don't worry, PhoMo will throw an error if you try.

A replace rule can be used to:
  • replace one letter with another
  • replace any letter in given category with one letter
  • replace a letter 1-for-1 with that in another category
  • replace the nth instance
  • delete a letter
  • delete any letter in given category
  • geminate a double consonant
  • lengthen a double vowel

[top]Affix rules

To evoke an affix rule, the TRG must be set to #. The CHG statement on the other hand, is much more complex. This depends on the function. However, some possibilities for the CHG statement are:
  • any lowercase letter (including special letters like á)
  • any uppercase letter (to represent a category)
  • numerals - when used with @, ^, or >
  • # - whole word place holder
  • @ - index specifier
  • ^ - length specifier
  • > - movement specifier
  • ? - reverse specifier

More information regarding the usage of these specifiers will be given with their specific uses.

A affix rule can be used to:
  • affix something to the start or end of a word
  • circumfix a word
  • infix at a given position inside a word
  • reduplicate a portion or all of a word
  • move a portion of a word elsewhere
  • delete a given number of letters at a position
  • reverse portion of a word

For the above reasons, affix rules are the best type to use for tri-consonantal languages.

[top]Conditions (ENV and EXP)

Similar to the change types, there are two types of conditions that you can use with PhoMo 3.0. These are referred to as global conditions and local conditions. Which type of condition you use will affect the way PhoMo 3.0 handles your words.

The two statements that are conditional statements are the Environmental conditional (ENV) and the Exceptional conditional (EXP). These both use exactly the same syntax and rules, however, an EXP is ignored if there is no ENV set. These also differ in how they affect the change for the rule:

  • the change will only occur if ENV returns true (or there is no ENV)
  • the change will not occur if EXP returns true

It is also useful to note the heirarchy with these two statements. PhoMo will always test EXP first. So, if EXP is true, then PhoMo will ignore that letter (local) or word (global) regardless of whether the environment tests true.

You can also specify multiple environments or multiple exceptions using the | operator. For example: a/e/t_|d_ (replace a with e when after t or d.

[top]Global conditions

A global is used when you want to change all instances of TRG to CHG. For example, if you wanted to change all occurances of a in a word if the word starts with h, then you would use a global condition.

A global condition is formatted relative to the operator #. There are three global conditions that you can use to signify that a word:
  • starts with x: x#; or
  • ends with x: #x; or
  • contains: x

In this instance x can be any string of lowercase letters and uppercase category letters you wish.

Should your global condition contain more than one #, PhoMo 3.0 will throw an error. Only the above formats are accepted at this time.

The global conditions also have a 'ditto-marker'. This uses the character ". Setting the condition to be just this, will perform the change if the rule above's environment condition was also true. Please note that this only works with global environments.

A third type of global condition available is called a 'count condition'. This is used with the operator '='. It will return true (and thus make the change) if the number of the specific letter(s) are found in the word. See the reference article for more information.

[top]Local conditions

A local condition is used when you want to change a specific instance of TRG into CHG. For example, if you wanted to change only the occurance of a in a word that comes after h, then you would use a local condition.

A local condition is formatted relative to the operator _. All local conditions have a before target and an after target in the following format: before_after.

Before and after are used to determine which instance of TRG to change. That is, only if the word matches both before and after (ie. returns true). These two parts can be:
  • any lowercase letter (including special letters like á)
  • any uppercase letter (to represent a category)
  • # - to mark end of word
  • * - to show a wildcard (ie. will always be 'true')
  • % - represents the same letter as the target

[top]Change types and conditions

It is important to note that not all conditions and change types are compatible with one another. PhoMo will throw errors where there are compatibility issues.

replace ruleaffix rule
local cond.✔ Yes✖ No
global cond.✔ Yes✔ Yes

It is important to be aware of the difference between the conditional types. The below example will demonstrate how the two different types will give different results for a similar rule. The focus points of the differences have been bolded in the tables.
Local condition
Input wordPhoMo ruleResult word
replace a with e when letter is after initial t

Global condition
Input wordPhoMo ruleResult word
replace a with e when word has initial t

Comments (6)
[link] [quote] 20-May-17 13:49
CWS Conlanger
I'm very confused.
[link] [quote] 28-Aug-16 13:40
tamil year sign
://C_ and/or C//%_
[link] [quote] 28-Aug-16 09:57
CWS Conlanger
 Stora Padda
I f anyone knows a way to degeminate consonants that would be cool (I can't find one)
[link] [quote] 15-Nov-15 17:05
ðEð Fans
For those who fancy the ð character and/or Dental Fricatives.
You do know there's an article giving examples of this. Right. It's on the PhoMo page.
[link] [quote] 15-Nov-15 01:00
CWS Conlanger
Yeah, this article wasn't very helpful. It merely states that things are possible, but doesn't provide any documentation or examples on how it actually works.
[link] [quote] 06-Sep-15 17:45
A Posteriori Conlangers
For conlangers who are connected to the Real World
This article doesn't give very good (if any) examples of what this does. For example, I want to delete a letter for a word and it says that the replace rule can do that but HOW?
Edit history
on 30/04/16 04:18-27severyfix code
on 30/12/15 23:28+92hashiadded phomo faq link
privacy | FAQs | rules | statistics | graphs | donate | api (indev)
Viewing CWS in: English | Time now is 27-Jun-17 22:37