From 9093fd3c05ccbe6ed8c7acc26664a46d67c09053 Mon Sep 17 00:00:00 2001 From: dchandler Date: Sun, 10 Aug 2003 18:38:20 +0000 Subject: [PATCH] We now produce EWTS m.ya, g.rwa, d.rwa, and b.ya during TMW->Wylie. Our disambiguation is now perfect, happening when and only when it is necessary. These are all illegal, so it shouldn't affect many existing conversions. But if there were typos, it could. --- source/org/thdl/tib/text/TibetanMachineWeb.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/org/thdl/tib/text/TibetanMachineWeb.java b/source/org/thdl/tib/text/TibetanMachineWeb.java index 5294ce0..e2fe2c4 100644 --- a/source/org/thdl/tib/text/TibetanMachineWeb.java +++ b/source/org/thdl/tib/text/TibetanMachineWeb.java @@ -989,12 +989,21 @@ public static boolean isAmbiguousWylie(String x, String y) { // tibetan Z should get you X==Z in a perfect world), and it // doesn't confuse the legal stuff. + // How do I know this list is complete? Because tibwn.ini has a + // list of all legal Tibetan (not Sanskrit) glyphs, and searching + // for the regular expressions ^d-, ^m-, ^'-, ^g-, and ^b- shows + // you all the fellows that could be ambiguous. + return (("g".equals(x) && y.startsWith("y") && isAmbHelper(y)) || ("g".equals(x) && y.startsWith("w") && isAmbHelper(y)) || ("d".equals(x) && y.startsWith("w") && isAmbHelper(y)) || ("d".equals(x) && y.startsWith("z") && isAmbHelper(y)) || ("b".equals(x) && y.startsWith("l") && isAmbHelper(y)) - || ("b".equals(x) && y.startsWith("r") && isAmbHelper(y))); + || ("b".equals(x) && y.startsWith("r") && isAmbHelper(y)) + || ("m".equals(x) && y.startsWith("y") && isAmbHelper(y)) + || ("b".equals(x) && y.startsWith("y") && isAmbHelper(y)) + || ("g".equals(x) && y.startsWith("rw")) + || ("d".equals(x) && y.startsWith("rw"))); } /**