Clean up unused code & variables (#12994)

This commit is contained in:
Dzung Bui 2024-01-12 02:43:25 +09:00 committed by GitHub
parent df6bd25ce4
commit 2a851401a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

@ -908,17 +908,16 @@ public class FSTCompiler<T> {
assert validOutput(lastOutput);
final T commonOutputPrefix;
final T wordSuffix;
if (lastOutput != NO_OUTPUT) {
commonOutputPrefix = fst.outputs.common(output, lastOutput);
assert validOutput(commonOutputPrefix);
wordSuffix = fst.outputs.subtract(lastOutput, commonOutputPrefix);
T wordSuffix = fst.outputs.subtract(lastOutput, commonOutputPrefix);
assert validOutput(wordSuffix);
parentNode.setLastOutput(input.ints[input.offset + idx - 1], commonOutputPrefix);
node.prependOutput(wordSuffix);
} else {
commonOutputPrefix = wordSuffix = NO_OUTPUT;
commonOutputPrefix = NO_OUTPUT;
}
output = fst.outputs.subtract(output, commonOutputPrefix);
@ -1113,13 +1112,6 @@ public class FSTCompiler<T> {
arc.isFinal = isFinal;
}
void deleteLast(int label, Node target) {
assert numArcs > 0;
assert label == arcs[numArcs - 1].label;
assert target == arcs[numArcs - 1].target;
numArcs--;
}
void setLastOutput(int labelToMatch, T newOutput) {
assert owner.validOutput(newOutput);
assert numArcs > 0;