Prefix rules have changed. A few are gone; a few new ones are here. I've implemented here a list that Robert Chilton sent me in private correspondence. He doesn't describe it as definitive, but since it affects ACIP->Tibetan conversions, and it's the best I've got, here they are. There's still an optional warning about "Hey, prefix rules matter for this tsheg bar."

I've left in a few rules that I didn't find on RC's list; I've asked him to look into these further.
This commit is contained in:
dchandler 2003-10-18 05:48:53 +00:00
parent f28bee4c71
commit 3b55ea509f
4 changed files with 74 additions and 43 deletions

View file

@ -201,34 +201,33 @@ public class DuffPaneTest extends TestCase {
ensureKeysGiveCorrectWylie("lasd", ensureKeysGiveCorrectWylie("lasd",
"lasda"); "lasda");
ensureKeysGiveCorrectWylie("b.lar.d"); ensureKeysGiveCorrectWylie("b.lar.d", "balarada");
ensureKeysGiveCorrectWylie("blar.d"); ensureKeysGiveCorrectWylie("blar.d");
ensureKeysGiveCorrectWylie("blarad", ensureKeysGiveCorrectWylie("blarad",
"blar.d"); "blar.d");
ensureKeysGiveCorrectWylie("b.lard", ensureKeysGiveCorrectWylie("b.lard",
"balarda"); "balarda");
ensureKeysGiveCorrectWylie("b.lal.d"); ensureKeysGiveCorrectWylie("b.lal.d", "balalada");
ensureKeysGiveCorrectWylie("blald", ensureKeysGiveCorrectWylie("blald",
"blalda"); "blalda");
ensureKeysGiveCorrectWylie("b.lald", ensureKeysGiveCorrectWylie("b.lald",
"balalda"); "balalda");
ensureKeysGiveCorrectWylie("b.las.d"); ensureKeysGiveCorrectWylie("b.las.d", "balasada");
ensureKeysGiveCorrectWylie("blasd", ensureKeysGiveCorrectWylie("blasd",
"blasda"); "blasda");
ensureKeysGiveCorrectWylie("b.lasd", ensureKeysGiveCorrectWylie("b.lasd",
"balasda"); "balasda");
ensureKeysGiveCorrectWylie("b.luHna"); ensureKeysGiveCorrectWylie("b.luHna", "baluHna");
ensureKeysGiveCorrectWylie("b.lA-iMg"); ensureKeysGiveCorrectWylie("b.lA-iMg", "balA-iMga");
ensureKeysGiveCorrectWylie("blA-iMg"); ensureKeysGiveCorrectWylie("blA-iMg");
ensureKeysGiveCorrectWylie("b.lag"); ensureKeysGiveCorrectWylie("b.lag", "balaga");
ensureKeysGiveCorrectWylie("blg", ensureKeysGiveCorrectWylie("blga");
"balga");
ensureKeysGiveCorrectWylie("b.las", ensureKeysGiveCorrectWylie("b.las",
"bals"); "bals");
@ -237,7 +236,7 @@ public class DuffPaneTest extends TestCase {
ensureKeysGiveCorrectWylie("bls", ensureKeysGiveCorrectWylie("bls",
"bals"); "bals");
ensureKeysGiveCorrectWylie("b.rag"); ensureKeysGiveCorrectWylie("b.rag", "baraga");
ensureKeysGiveCorrectWylie("brg", ensureKeysGiveCorrectWylie("brg",
"brga"); "brga");
@ -311,7 +310,7 @@ public class DuffPaneTest extends TestCase {
ensureKeysGiveCorrectWylie("'byungs"); ensureKeysGiveCorrectWylie("'byungs");
ensureKeysGiveCorrectWylie("b.lags"); ensureKeysGiveCorrectWylie("b.lags", "balagasa");
ensureKeysGiveCorrectWylie("blags"); ensureKeysGiveCorrectWylie("blags");
// DLC FIXME: add b-r-g-s, b-l-g-s, etc. // DLC FIXME: add b-r-g-s, b-l-g-s, etc.

View file

@ -1270,16 +1270,16 @@ public final class LegalTshegBar
if (EW_ABSENT == head) { if (EW_ABSENT == head) {
if (EW_ABSENT == sub) { if (EW_ABSENT == sub) {
return (EWC_ca == root return (EWC_ca == root
|| EWC_ta == root
|| EWC_da == root || EWC_da == root
|| EWC_tsa == root || EWC_na == root
|| EWC_zha == root
|| EWC_za == root
|| EWC_ya == root
|| EWC_sha == root
|| EWC_sa == root
|| EWC_nya == root || EWC_nya == root
|| EWC_na == root); || EWC_sa == root
|| EWC_sha == root
|| EWC_ta == root
|| EWC_tsa == root
|| EWC_ya == root
|| EWC_za == root
|| EWC_zha == root);
} }
} }
return false; return false;
@ -1301,23 +1301,26 @@ public final class LegalTshegBar
public static boolean takesDao(char head, char root, char sub) { public static boolean takesDao(char head, char root, char sub) {
if (EW_ABSENT == head) { if (EW_ABSENT == head) {
if (EW_ABSENT == sub) { if (EW_ABSENT == sub) {
return (EWC_ka == root return (
EWC_ba == root
|| EWC_ga == root || EWC_ga == root
|| EWC_ka == root
|| EWC_ma == root
|| EWC_nga == root || EWC_nga == root
|| EWC_pa == root || EWC_pa == root
|| EWC_ba == root );
|| EWC_ma == root);
} else { } else {
return ((EWC_ga == root && EWC_ya == sub) return (
|| (EWC_pa == root && EWC_ya == sub) (EWC_ba == root && EWC_ra == sub)
|| (EWC_ba == root && EWC_ya == sub) || (EWC_ba == root && EWC_ya == sub)
|| (EWC_ma == root && EWC_ya == sub)
|| (EWC_ka == root && EWC_ya == sub) // dkyil, for example
|| (EWC_ka == root && EWC_ra == sub)
|| (EWC_ga == root && EWC_ra == sub) || (EWC_ga == root && EWC_ra == sub)
|| (EWC_ba == root && EWC_ra == sub) || (EWC_ga == root && EWC_ya == sub)
|| (EWC_pa == root && EWC_ra == sub)); || (EWC_ka == root && EWC_ra == sub)
|| (EWC_ka == root && EWC_ya == sub) // dkyil, for example
|| (EWC_ma == root && EWC_ya == sub)
|| (EWC_pa == root && EWC_ra == sub)
|| (EWC_pa == root && EWC_ya == sub)
);
} }
} else { } else {
return false; return false;
@ -1420,7 +1423,18 @@ public final class LegalTshegBar
* nominal representation} of the subjoined letter, or EW_ABSENT * nominal representation} of the subjoined letter, or EW_ABSENT
* if not present */ * if not present */
public static boolean takesBao(char head, char root, char sub) { public static boolean takesBao(char head, char root, char sub) {
// DLC ask Ten-lo la about Wazur.
// Special cases: there are four rare, maybe archaic
// constructs for which I don't let the sub or lack of sub
// matter. Info is not complete here. I learned of these
// through personal correspondence with Robert Chilton.
if (EWC_la == head
&& (EWC_ka == root
|| EWC_ga == root
|| EWC_nga == root
|| EWC_ja == root))
return true;
if (EW_ABSENT == head) { if (EW_ABSENT == head) {
if (EW_ABSENT == sub) { if (EW_ABSENT == sub) {
return (EWC_ka == root return (EWC_ka == root
@ -1429,17 +1443,20 @@ public final class LegalTshegBar
|| EWC_ta == root || EWC_ta == root
|| EWC_tsa == root || EWC_tsa == root
|| EWC_ga == root || EWC_ga == root
|| EWC_nga == root
|| EWC_ja == root
|| EWC_nya == root
|| EWC_da == root || EWC_da == root
|| EWC_na == root
|| EWC_dza == root
|| EWC_zha == root || EWC_zha == root
|| EWC_za == root || EWC_za == root
|| EWC_ra == root || EWC_sha == root
|| EWC_la == root
|| EWC_sha == root); || (true && // DLC NOW: these are not in RC's non-definitive list. Thus, BNGA is B+NGA in ACIP transliteration. But that seems odd to me, so I'm seeing what RC thinks about these.
(
EWC_nga == root
|| EWC_ja == root
|| EWC_nya == root
|| EWC_na == root
|| EWC_dza == root
)
));
} else { } else {
// kra, e.g. // kra, e.g.
return ((EWC_ka == root && EWC_ya == sub) return ((EWC_ka == root && EWC_ya == sub)

View file

@ -302,10 +302,10 @@ public class LegalTshegBarTest extends TestCase implements UnicodeConstants {
assertTrue(LegalTshegBar.takesBao(EW_ABSENT, EWC_sa, EWC_ra)); assertTrue(LegalTshegBar.takesBao(EW_ABSENT, EWC_sa, EWC_ra));
assertTrue(LegalTshegBar.takesBao(EW_ABSENT, EWC_ga, EWC_ra)); assertTrue(LegalTshegBar.takesBao(EW_ABSENT, EWC_ga, EWC_ra));
assertTrue(LegalTshegBar.takesBao(EWC_ra, EWC_ga, EWC_ya)); assertTrue(LegalTshegBar.takesBao(EWC_ra, EWC_ga, EWC_ya));
assertTrue(LegalTshegBar.takesBao(EWC_la, EWC_nga, EW_ABSENT));
assertTrue(!LegalTshegBar.takesBao(EWC_ra, EWC_da, EWC_ya)); assertTrue(!LegalTshegBar.takesBao(EWC_ra, EWC_da, EWC_ya));
assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_ba, EW_ABSENT)); assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_ba, EW_ABSENT));
assertTrue(!LegalTshegBar.takesBao(EWC_la, EWC_nga, EW_ABSENT));
assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_nga, EWC_ra)); assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_nga, EWC_ra));
} }

View file

@ -429,6 +429,14 @@ tstHelper("KA'", "[(K . A), (' . )]",
tstHelper("LE'UM", null, null, null, "{LE}{'U}{M}", -1); tstHelper("LE'UM", null, null, null, "{LE}{'U}{M}", -1);
tstHelper("LE'U'IS", null, null, null, "{LE}{'U}{'I}{S}", -1); tstHelper("LE'U'IS", null, null, null, "{LE}{'U}{'I}{S}", -1);
tstHelper("LAM'OS", null, null, null, "{LA}{M}{'O}{S}", 2);
tstHelper("NAM'OS", null, null, null, "{NA}{M}{'O}{S}", 2);
tstHelper("NAM'IS", null, null, null, "{NA}{M}{'I}{S}", 2);
tstHelper("LEM'UNG", null, null, null, "{LE}{M}{'U}{NG}", 2);
tstHelper("LEM'U'ANG", null, null, null, "{LE}{M}{'U}{'A}{NG}", 2);
tstHelper("LEM'UM", null, null, null, "{LE}{M}{'U}{M}", 2);
tstHelper("LEM'U'IS", null, null, null, "{LE}{M}{'U}{'I}{S}", 2);
tstHelper("MA'ONGS", null, null, null, "{MA}{'O}{NG}{S}", -1); tstHelper("MA'ONGS", null, null, null, "{MA}{'O}{NG}{S}", -1);
tstHelper("SAM'AM", null, null, null, "{SA}{M}{'A}{M}", 2); tstHelper("SAM'AM", null, null, null, "{SA}{M}{'A}{M}", 2);
@ -440,13 +448,20 @@ tstHelper("KA'", "[(K . A), (' . )]",
tstHelper("SNYAM+S+'O", null, null, null, "{S+NYA}{M+S+'O}", -1); tstHelper("SNYAM+S+'O", null, null, null, "{S+NYA}{M+S+'O}", -1);
tstHelper("SNYAMS+'O", null, null, null, "{S+NYA}{M+S+'O}", -1); tstHelper("SNYAMS+'O", null, null, null, "{S+NYA}{M+S+'O}", -1);
tstHelper("GDAMS", null, null, null, "{G}{DA}{M}{S}", -1); {
// Tests this rule: if a stack X takes a prefix Y, then X with
// wa-zur takes the prefix Y also.
tstHelper("GDAMS", null, null, null, "{G}{DA}{M}{S}", -1);
tstHelper("GDVAMS", null, null, null, "{G}{D+VA}{M}{S}", -1);
}
tstHelper("GDAM-S'O", null, null, null, "{G}{DA}{M}{S}{'O}", 2); tstHelper("GDAM-S'O", null, null, null, "{G}{DA}{M}{S}{'O}", 2);
tstHelper("GDAM-C'O", null, null, null, "{G+DA}{M}{C'O}", 0); tstHelper("GDAM-C'O", null, null, null, "{G+DA}{M}{C'O}", 0);
tstHelper("GDAM-C'O", null, null, null, "{G+DA}{M}{C}{'O}", 3); tstHelper("GDAM-C'O", null, null, null, "{G+DA}{M}{C}{'O}", 3);
// DLC NOW: FIXME: tstHelper("DKHY", null, null, null, "{D}{KH+YA}", 0); tstHelper("BRLA", null, null, null, "{B}{R+LA}", -1);
// DLC DKHY'O should give parse tree {{D-KH+Y'O}, {D+KH+Y'O}} tstHelper("DKY", null, null, null, "{D}{K+Y}", -1);
// DLC DKHYA'O should give parse tree {{D-KH+YA'O}, {D+KH+YA'O}} // DLC FIXME NOW this should work, but doesn't: tstHelper("DKY'O", null, null, null, "{D}{K+Y'O}", 3);
tstHelper("DKYA'O", null, null, null, "{D}{K+YA}{'O}", -1);
tstHelper("SHR'I", "{SH}{R'I}", tstHelper("SHR'I", "{SH}{R'I}",
null, null,