cws
Greetings Guest
home > library > journal > view_article
« Back to Articles » Journal
PhoMo Examples
20▲ 20 ▼ 0
Reference of Examples using PhoMo
This public article was written by [Deactivated User], and last updated on 7 Mar 2019, 06:56.

[comments] [history] Menu 1. Replace rule examples 2. Affix rule examples 3. Local condition examples 4. Global condition examples This article lists a number of basic actions you can make on words by using PhoMo 3.0. Have a go at combining and changing some of these in PhoMo to get a good feel for it. If there's something you feel should be added, please contact one of our staff members!

If you have a question about how to make PhoMo work for your language, please see the PhoMo Help Centre Thread.


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

[top]Replace rule examples

This section will give examples of the types of changes you can achieve using replace rules with both local conditions and global conditions. These examples all assume that V is any vowel and C is any consonant.

Simple 1-for-1 replacement
Input wordPhoMo ruleResult word
tahamaa/eteheme
replace all a with e

Category for 1 replacement
Input wordPhoMo ruleResult word
tahimuV/eteheme
replace all V (vowels) with e

Category for category replacment
For this rule, we will assume that V is a,e,i,o,u and L is á,é,í,ó,ú.
Input wordPhoMo ruleResult word
tahimuV/Ltáhímú
replace V with corresponding L

Replace nth instance of letter
This uses the @ specifier as part of the CHG statement. The index given can be either negative or positive, starting with -1 and 1 respectively.
Input wordPhoMo ruleResult word
tahamaa/e@1tehama
replace only a #1 with e

Delete a letter
Input wordPhoMo ruleResult word
tahamaa//h_mtahma
delete all a between h and m

Delete a category
Input wordPhoMo ruleResult word
tahamaV//_#taham
delete all V (vowels) at the end of a word

Infix in certain environment
Input wordPhoMo ruleResult word
tahama/j/VC_Vtahjamja
infix j after a vowel then a consonant, and before a vowel
(ie. after intervocalic consonant)

Change double consonant (ipa scope)
Here we use the % character to show 'the same letter that we're currently looking at'. This doesn't mean much to you at the moment, but have a look at the rules below.
Input wordPhoMo ruleResult word
tahhamah/k/_%takham
change h to k when before itself.

Lengthen double vowel (ipa scope)
Here we use the % character to show 'the same letter that we're currently looking at'. This doesn't mean much to you at the moment, but have a look at the rules below.
Input wordPhoMo ruleResult word
tahaama/:/%_taha:m
change a to a: when doubled

Remove all double vowels
Here we use the % character to show 'the same letter that we're currently looking at'. This doesn't mean much to you at the moment, but have a look at the rules below.
Input wordPhoMo ruleResult word
tahaamaV//_%tahama
delete V (vowel) when doubled

Reverse part of a word (metathesis)
Here we use the ? character in the CHG argument to show 'the reverse of the TRG argument'.
Input wordPhoMo ruleResult word
tahaamaC/?/a_tahama
change am to ma when after a

Affix letter before nth instance of letter/category
This uses % to let you 'replace a letter(/category) with itself' and an additional letter. The index given can be either negative or positive, starting with -1 and 1 respectively.
Input wordPhoMo ruleResult word
tahamaa/k%@-1tahamka
change the last instance of a to ka

Affix letter after nth instance of letter/category
Input wordPhoMo ruleResult word
tahamaa/%k@1takhama
change the first instance of a to ak


[top]Affix rule examples

This section will give examples of the types of changes you can achieve using affix rules with global conditions. These examples all assume that V is any vowel and C is any consonant.

Prefix
Input wordPhoMo ruleResult word
tahama#/sa#/C#satahama
prefix with sa if begins with C (consonant)

Suffix
Input wordPhoMo ruleResult word
tahama#/#k/#Vtahamak
suffix with k if ends with V (vowel)

Circumfix (both suffix and prefix)
Input wordPhoMo ruleResult word
tahama#/a#katahamak
circumfix with a- -k

Infix at position
Note that infixes start counting at 1.
Input wordPhoMo ruleResult word
tham#/#á@1táham
infix with á after letter #1

Infix at negative position
This is useful for infixing relative to the end of the word. Please note that the last letter starts at -1. In previous versions of PhoMo, this was -0, this is no longer the case.
Input wordPhoMo ruleResult word
tahm#/á#@-1tahám
infix with á before letter #1 from the end

Affix letter in category at nth position
Cannot be used to circumfix. This rule must stand by itself; all other changes to be made separately.
Input wordPhoMo ruleResult word
tahama#/#C@2tahamah
suffix with C (consonant) found at letter #2

Reduplicate (whole word)
Input wordPhoMo ruleResult word
tahama#/##tahamatahama
reduplicate whole word

Reduplicate (part of a word)
Input wordPhoMo ruleResult word
tahama#/##@1^2tatahama
reduplicate from letter #1 for 2 letters

Delete part of a word
Input wordPhoMo ruleResult word
tahama#/@1^2hama
delete from letter #1 for 2 letters

Move part of a word (w/ indices)
Note that both the > index and the @ index are both relative to the position in the original word.
Input wordPhoMo ruleResult word
tahama#/>1@3^2hatama
move from letter #1 for 2 letters to letter #3

Move part of a word (w/ conditions)
You can only use local conditions. Using a global condition will throw an error. Also note that this particular rule can produce large logs; so beware when enabling these.
Input wordPhoMo ruleResult word
tahama#/>#_@_#^2hamata
move from 2 letters from start of word to the end

Move part of a word (without removing original part)
A normal move statement is broken into two actions: remove the original part, add the new part in the new position. Using the character ! directly after > will suppress the removal of the original part. Effectively this is like a duplication to another position statement.
Input wordPhoMo ruleResult word
tahama#/>!#_@_#^2tahamata
duplicate 2 letters from start of word to the end

Reverse portion of a word (from given point)
Input wordPhoMo ruleResult word
tahama#/?3taamah
reverse word from letter #3

Reverse portion of a word (given length)
Input wordPhoMo ruleResult word
tahama#/?3^2taahma
reverse word from letter #3 for 2 letters

Adpositioning a separate word
Using a space in PhoMo would cause it to break - so these are removed. However, you can use - to add another word.
Input wordPhoMo ruleResult word
tahama#/#-natahama na
add word na to the end of the word

Splitting a word
You can also use - to split a word. Note that you cannot do this using a replace rule.
Input wordPhoMo ruleResult word
tahama#/#-@4taha ma
Split word at after letter #4


[top]Local condition examples

In these examples, the titles will be in relation to x, where this is the letter to be replaced.

Change x after letter
Input wordPhoMo ruleResult word
tahama/e/h_tahem
replace a with e after h

Change x before letter
Input wordPhoMo ruleResult word
tahama/e/_hteham
replace a with e before h

Change x between two letters
Input wordPhoMo ruleResult word
tahama/e/h_mtahem
replace a with e after h and before m

Change x before/after a category
The above three examples can all be done using categories also.
Input wordPhoMo ruleResult word
tahama/e/C_mtahem
replace a with e after C (consonant) and before m

Change x before/after multiple letters
You can use more than one letter also.
Input wordPhoMo ruleResult word
tahamh/k/_amtakam
replace h with k before am

Change x before/after a mix of letters and categories
Types can also be mixed.
Input wordPhoMo ruleResult word
tahamh/k/_Vmtakam
replace h with k before V (vowel), then m

Change x at beginning of word
In local conditions # is used to denote the boundary of a word.
Input wordPhoMo ruleResult word
tahamt/d/#_daham
replace t with d at the beginning of a word

Change x at end of word
In local conditions # is used to denote the boundary of a word.
Input wordPhoMo ruleResult word
tahamm/n/_#tahan
replace m with n at the end of a word

Change x after mix of all
You can use letters, categories and end of word all together.
Input wordPhoMo ruleResult word
tahamh/k/_Vm#takam
replace h with k before V (vowel), then m at the end of a word

Change x before a letter at some point afterwards
You can use * as a wildcard between _ and another letter/#. Please note that in a condition like _*a, if a is the next letter, it will return true.
Input wordPhoMo ruleResult word
tahamt/d/_*mdaham
replace t with d if it is before an m anywhere in the word.

Change x before a letter at some point afterwards
You can use * as a wildcard between _ and another letter/#. Please note that in a condition like a*_, if a is the previous letter, it will return true.
Input wordPhoMo ruleResult word
tahamh/ħ/t*_taħam
replace h with ħ if it is after a t anywhere in the word.


[top]Global condition examples


Change all x if word begins in a letter
Input wordPhoMo ruleResult word
tahama/e/t#tehem
replace all a with e if word begins with t

Change all x if word ends in a letter
Input wordPhoMo ruleResult word
tahama/e/#mtehem
replace all a with e if word ends with m

Change all x if word contains a letter
The condition will return true if the conditional letter (h in the below example) is also the first or last letter, not just between the two.
Input wordPhoMo ruleResult word
tahama/e/htehem
replace all a with e if word contains h

Change all x with categories
Just like other rules, letters can be replaced with categories, or mixed with categories also.
Input wordPhoMo ruleResult word
tahama/e/tV#tehem
replace all a with e if word begins with t, then V (vowel)

Change all x if word contains y number of z
Input wordPhoMo ruleResult word
tahama/e/V=2tehem
replace all a with e if word contains two V (vowels)

Change all x if word contains less than y number of z
Input wordPhoMo ruleResult word
tahama/e/V=<3tehem
replace all a with e if word contains less than three V (vowels)

Change all x if word contains more than y number of z
Input wordPhoMo ruleResult word
tahama/e/V=>1tehem
replace all a with e if word contains more than one V (vowel)

Comments
[link] [quote] [move] [edit] [del] 26-Mar-24 12:51 [Deactivated User]
How do i split up /gj/ to become /g j/ at the end of a word and have the first word end with g and the next start with j (or i to fix phonotactic errors)
[link] [quote] [move] [edit] [del] 30-Apr-23 08:27 [Deactivated User]
How do I voice specific consonants in a word, like the first consonant
[link] [quote] 12-Feb-21 13:26 [Deactivated User]
How can I reduplicate the last two letters of a word?
[link] [quote] [move] [edit] [del] 27-Nov-16 12:32 [Deactivated User]
— Note from staff or admin —
If you want help, don't leave comments here. No one is alerted that someone has posted on this article, it is not regularly checked, and you can't be automatically alerted if someone tries to respond to you.

Please use the boards instead.
[link] [quote] [move] [edit] [del] 06-Oct-16 14:18 [Deactivated User]
I want a t between two vowels to become a *.
And how exactly do i do this?
[link] [quote] 21-Sep-16 05:49 [Deactivated User]
I have a question:
What if I want to remove the last 3 letters of a word and then add a suffix?
[link] [quote] [move] [edit] [del] 24-Aug-16 17:49 [Deactivated User]
@Avlönskt This solved it resulting in an error, still not doing quite what I want, unfortunately. Applied to aito (bird), it doesn't change it. It works so far as not making it "aitoan", at least..

EDIT: Your edit works, thanks.
[link] [quote] [move] [edit] [del] 24-Aug-16 17:44 [Deactivated User]
@TheMrME1 I don't think that condition #C_ is going to work, try using:
#/#an/#C/#n
Correction:
#/#an/#C//#n
[link] [quote] [move] [edit] [del] 24-Aug-16 17:18 [Deactivated User]
So I'm utterly confused...

I'm trying to create a rule that affixes -an to words that end in a consonant but -n to words that end in a vowel. I've attested that #/#an and #/#n both work, but how can I combine those two? I've tried something like #/#an/C_/#n and #/#an/#C_/#n but keep getting an error ("You cannot use a LOCAL condition with AFFIX change"). Is there any way to do what I want?
[link] [quote] [move] [edit] [del] 18-Aug-16 09:44 [Deactivated User]
@jph3195 /ʔ/V_V
[link] [quote] [move] [edit] [del] 18-Aug-16 06:07 [Deactivated User]
I'm trying to write a hiatus resolution rule; I want to insert a glottal stop [ʔ] between two vowels (so that, for example, /siat/ becomes [siʔat]). This article really isn't helping me with that. Does anyone have an idea of how to write that rule?
[link] [quote] [move] [edit] [del] 10-Aug-16 07:01 [Deactivated User]
@fizzy V/%%/_[letter]. % is used for referencing the target again.
[link] [quote] [move] [edit] [del] 09-Aug-16 23:32 [Deactivated User]
How would I write a rule where a vowel (or any letter) becomes duplicated before a certain letter, e.g. tahama → tahaama, duplicate vowel before “m”?
[link] [quote] [move] [edit] [del] 09-Aug-16 10:56 [Deactivated User]
@fizzy I tend to just use ## or something, but really anything without a slash works.
[link] [quote] [move] [edit] [del] 09-Aug-16 10:46 [Deactivated User]
How do I comment out a line in my PhoMo rule? It would make it so much easier to tell which line does what when I'm writing a long Consyllabary definition.
[link] [quote] [move] [edit] [del] 24-Jul-16 14:23 [Deactivated User]
It is very good that you have examples. Much easier than going through and reading about how to make your own rules.
[link] [quote] [move] [edit] [del] 24-Feb-16 07:13 [Deactivated User]
@Requiem7 V/%j@-1 (replace the j with whatever you want to add).
[link] [quote] [move] [edit] [del] 24-Feb-16 06:51 [Deactivated User]
What if you want to add a letter after the final vowel within a word?
Say
"marg" = "majrg"
"lanax" = "lanajx"
[link] [quote] 25-Sep-15 09:39 [Deactivated User]
what if i simply want to add an ending to a word irrespective of it ending in a consonant or a vowel? @hashi
[link] [quote] 22-Apr-15 11:50 [Deactivated User]
Have a read of the article above about conditions, it'll explain what you need ;)
[link] [quote] [move] [edit] [del] 22-Apr-15 11:07 [Deactivated User]
@hashi hm,
then what to do when you want to do this?
gad -> gadéda
saro -> saréda
sara -> saræda
[link] [quote] 22-Apr-15 10:43 [Deactivated User]
@depthofsorrow, be easier to get a response on the boards, but this is the easiest way to do this: V/éda/_#
[link] [quote] [move] [edit] [del] 22-Apr-15 09:29 [Deactivated User]
How can I change word ends with vowel into a word ends into another vowel?
add -éda to end of the word if it ends with vowel.
like this;
hamo -> haméda
[link] [quote] [move] [edit] [del] 30-Mar-15 14:21 [Deactivated User]
Please include some info about using this to set up irregular phonology.
Edit history
on 12/03/18 02:11+211[Deactivated User]added link
on 29/05/16 12:27-18653[Deactivated User]Fixed weird duplication
on 30/04/16 04:17-135[Deactivated User]hopefully, the last fix
on 30/04/16 04:16-27[Deactivated User]fixing
on 30/04/16 04:15-28[Deactivated User]fixing... still..
on 30/04/16 04:10-4[Deactivated User]fixing
on 30/04/16 04:06+6921[Deactivated User]fixing again
on 30/04/16 04:05+11905[Deactivated User]fixing tags
on 10/03/16 19:50+3[Deactivated User]added infix example using replace rules
on 31/12/15 00:28+88[Deactivated User]added phomo faq link
privacy | FAQs | rules | statistics | graphs | donate | api (indev)
Viewing CWS in: English | Time now is 18-Apr-24 18:27 | Δt: 2672.1179ms