The ACIP "BNA" was converting to B-NA instead of B+NA, even though NA cannot take a BA prefix. This was because BNA was interpreted as root-suffix. In ACIP, BN is surely B+N unless N takes a B prefix, so root-suffix is out of the question.
Now Jskad has two "Convert selected ACIP to Tibetan" conversions, one with and one without warnings, built in to Jskad proper (not the converter, that is).
This commit is contained in:
parent
1415fc43e3
commit
d99ae50d8a
2 changed files with 10 additions and 6 deletions
|
@ -317,13 +317,18 @@ public class TibTextUtils implements THDLWylieConstants {
|
|||
* into tdoc at offset loc.
|
||||
* @param acip the ACIP you want to convert
|
||||
* @param tdoc the document in which to insert the TMW
|
||||
* @param lco the offset inside the document at which to insert the TMW
|
||||
* @param loc the offset inside the document at which to insert the TMW
|
||||
* @param withWarnings true if and only if you want warnings to appear
|
||||
* in the output, such as "this could be a mistranscription of blah..."
|
||||
* @throws InvalidACIPException if the ACIP is deemed invalid, i.e. if
|
||||
* it does not conform to the ACIP transcription rules (those in the
|
||||
* official document and the subtler rules pieced together by David
|
||||
* Chandler through study and private correspondence with Robert
|
||||
* Chilton) */
|
||||
public static void insertTibetanMachineWebForACIP(String acip, TibetanDocument tdoc, int loc)
|
||||
public static void insertTibetanMachineWebForACIP(String acip,
|
||||
TibetanDocument tdoc,
|
||||
int loc,
|
||||
boolean withWarnings)
|
||||
throws InvalidACIPException
|
||||
{
|
||||
StringBuffer errors = new StringBuffer();
|
||||
|
@ -334,16 +339,14 @@ public class TibTextUtils implements THDLWylieConstants {
|
|||
else
|
||||
throw new InvalidACIPException("Fatal error converting ACIP to TMW.");
|
||||
}
|
||||
String warningLevel = "Most";
|
||||
String warningLevel = withWarnings ? "All" : "None";
|
||||
boolean colors = false;
|
||||
StringBuffer warnings = null;
|
||||
boolean putWarningsInOutput = false;
|
||||
if ("None" != warningLevel) {
|
||||
warnings = new StringBuffer();
|
||||
putWarningsInOutput = true;
|
||||
}
|
||||
try {
|
||||
ACIPConverter.convertToTMW(al, tdoc, errors, warnings,
|
||||
ACIPConverter.convertToTMW(al, tdoc, null, null,
|
||||
putWarningsInOutput, warningLevel, colors, loc);
|
||||
} catch (IOException e) {
|
||||
throw new Error("Can't happen: " + e);
|
||||
|
|
|
@ -306,6 +306,7 @@ public class LegalTshegBarTest extends TestCase implements UnicodeConstants {
|
|||
assertTrue(!LegalTshegBar.takesBao(EWC_la, EWC_nga, EW_ABSENT));
|
||||
assertTrue(!LegalTshegBar.takesBao(EWC_ra, EWC_da, EWC_ya));
|
||||
assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_ba, EW_ABSENT));
|
||||
assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_na, EW_ABSENT));
|
||||
assertTrue(!LegalTshegBar.takesBao(EW_ABSENT, EWC_nga, EWC_ra));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue