Speedup.
This commit is contained in:
parent
1d9b405bb8
commit
1224030898
1 changed files with 3 additions and 3 deletions
|
@ -280,8 +280,8 @@ class TParseTree {
|
||||||
&& warningLevel != "All")
|
&& warningLevel != "All")
|
||||||
throw new IllegalArgumentException("warning level bad: is it interned?");
|
throw new IllegalArgumentException("warning level bad: is it interned?");
|
||||||
|
|
||||||
|
TStackList bestParse = getBestParse();
|
||||||
{
|
{
|
||||||
TStackList bestParse = getBestParse();
|
|
||||||
TStackListList noPrefixTestsUniqueParse = getUniqueParse(true);
|
TStackListList noPrefixTestsUniqueParse = getUniqueParse(true);
|
||||||
if (noPrefixTestsUniqueParse.size() == 1
|
if (noPrefixTestsUniqueParse.size() == 1
|
||||||
&& !noPrefixTestsUniqueParse.get(0).equals(bestParse)) {
|
&& !noPrefixTestsUniqueParse.get(0).equals(bestParse)) {
|
||||||
|
@ -295,10 +295,10 @@ class TParseTree {
|
||||||
boolean isLastStack[] = new boolean[1];
|
boolean isLastStack[] = new boolean[1];
|
||||||
TStackListList nip = getNonIllegalParses();
|
TStackListList nip = getNonIllegalParses();
|
||||||
if (nip.size() != 1) {
|
if (nip.size() != 1) {
|
||||||
if (null == getBestParse()) {
|
if (null == bestParse) {
|
||||||
return "Warning: There's not even a unique, non-illegal parse for ACIP {" + ((null != originalACIP) ? originalACIP : recoverACIP()) + "}";
|
return "Warning: There's not even a unique, non-illegal parse for ACIP {" + ((null != originalACIP) ? originalACIP : recoverACIP()) + "}";
|
||||||
} else {
|
} else {
|
||||||
if (getBestParse().hasStackWithoutVowel(pl, isLastStack)) {
|
if (bestParse.hasStackWithoutVowel(pl, isLastStack)) {
|
||||||
if (isLastStack[0]) {
|
if (isLastStack[0]) {
|
||||||
if (warningLevel == "All")
|
if (warningLevel == "All")
|
||||||
return "Warning: The last stack does not have a vowel in the ACIP {" + ((null != originalACIP) ? originalACIP : recoverACIP()) + "}; this may indicate a typo, because Sanskrit, which this is (because it's not legal Tibetan), should have a vowel after each stack.";
|
return "Warning: The last stack does not have a vowel in the ACIP {" + ((null != originalACIP) ? originalACIP : recoverACIP()) + "}; this may indicate a typo, because Sanskrit, which this is (because it's not legal Tibetan), should have a vowel after each stack.";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue