Translating Lexicanter to tadpole

This chapter is based on the Lexicanter built-in documentation and shows how to translate various Lexicanter sound changer constructs into tadpole. Lexicanter constructs are shown on the left, and the corresponding tadpole construct on the right. Titles on each column show the corresponding Lexicanter and tadpole terminology if there is a difference.

Note that the semantics of Lexicanter’s sound changer operate on strings and do not feature support for symbol segmentation. To achieve the same results, it is usually best to use string matchers and enable the class_as_string configuration option:

config class_as_string = true;

Lexicanter rules are not named, but tadpole rules require a name.

Note that Lexicanter also supports an alternative frontend to tadpole which is compatible with the legacy syntax.

Rules
th > θ
rule _rule = "th" -> "θ";
ContextsEnvironments
th > θ / _e
th > θ / _i
th > tʰ
rule r1 = "th" -> "θ" in _ "e";
rule r2 = "th" -> "θ" in _ "i";
rule r3 = "th" -> "tʰ";
Anonymous CategoriesAlternatives
th > θ / _{e, i}
th > tʰ
rule r1 = "th" -> "θ" in _ ("e" | "i");
rule r2 = "th" -> "tʰ";
Named CategoriesClasses
E :: e, i
th > θ / _E
th > tʰ
c > s / _E
c > k
g > ʤ / _E
class E = 'e' 'i';
rule r1 = "th" -> "θ" in _ E;
rule r2 = "th" -> "tʰ";
rule r3 = "c" -> "s" in _ E;
rule r4 = "c" -> "k"
rule r5 = "g" -> "ʤ" in _ E;
Category ConversionIndex Bindings
E :: e, i
{th, c, g} > {θ, s, ʤ} / _E
{th, c} > {tʰ, k}
class E = 'e' 'i';
rule r1 = ("th"|"c"|"g")@i -> ("θ"|"s"|"ʤ")@i in _ E;
rule r2 = ("th" | "c")@i -> ("tʰ" | "k")@i;
P :: th, c, g
F :: θ, s, ʤ
K :: tʰ, k, g
E :: e, i
P > F / _E
P > K
class P = 'th' 'c' 'g';
class F = 'θ' 's' 'ʤ';
class K = 'tʰ' 'k' 'g';
class E = 'e' 'i';
rule r1 = P@i -> F@i in _E;
rule r2 = P@i -> K@i;
Word Boundaries
e > ə / _^
y > ɪ / ^_
rule r1 = "e" -> "ə" in _ #;
rule r2 = "y" -> "ɪ" in # _;
Exceptions
x > ks / {!e, i}_
x > ks / {^, {!e, i}}_
rule r1 = "x" -> "ks" except ("e" | "i") _;
rule r2 = "x" -> "ks" in # _ except ("e" | "i") _;
Wildcards
h > ç / _u..
rule r1 = "h" -> "ç" in _ "u" ..;
Repetition
y > i / _ d* o+ ^
rule r1 = "y" -> "i" in _ "d"* "o"+ #;
Optional MembersOptional Elements
n > ŋ / _ {g, k}? ^
rule r1 = "n" -> "ŋ" in _ ("g" | "k")? #;
ReduplicationContent Bindings
er > __ / ._.
rule r1 = "er"@s -> <s> <s> in . _ .;
Prefixes & Suffixes
/ate/._#
/eta/#_.
rule r1 = () -> "ate" in . _ #;
rule r1 = () -> "eta" in # _ .;