Remove parameters for easier inlining (A96)
Change-Id: Ied2e291393609300173681e26e82b7dd36b41bd0main
parent
ea98e026f1
commit
cfae32c610
|
@ -157,8 +157,7 @@ public class BinaryDictionary extends Dictionary {
|
||||||
// proximityInfo and/or prevWordForBigrams may not be null.
|
// proximityInfo and/or prevWordForBigrams may not be null.
|
||||||
private ArrayList<SuggestedWordInfo> getWordsInternal(final WordComposer codes,
|
private ArrayList<SuggestedWordInfo> getWordsInternal(final WordComposer codes,
|
||||||
final int[] prevWord, final ProximityInfo proximityInfo) {
|
final int[] prevWord, final ProximityInfo proximityInfo) {
|
||||||
final int count = getWordsInternalInternal(codes, prevWord, proximityInfo, mOutputChars,
|
final int count = getWordsInternalInternal(codes, prevWord, proximityInfo);
|
||||||
mOutputScores, mSpaceIndices);
|
|
||||||
|
|
||||||
final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<SuggestedWordInfo>();
|
final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<SuggestedWordInfo>();
|
||||||
for (int j = 0; j < count; ++j) {
|
for (int j = 0; j < count; ++j) {
|
||||||
|
@ -185,8 +184,7 @@ public class BinaryDictionary extends Dictionary {
|
||||||
// proximityInfo may not be null.
|
// proximityInfo may not be null.
|
||||||
// TODO: remove this method by inlining it into getWordsInternal
|
// TODO: remove this method by inlining it into getWordsInternal
|
||||||
private int getWordsInternalInternal(final WordComposer codes,
|
private int getWordsInternalInternal(final WordComposer codes,
|
||||||
final int[] prevWord, final ProximityInfo proximityInfo,
|
final int[] prevWord, final ProximityInfo proximityInfo) {
|
||||||
char[] outputChars, int[] scores, int[] spaceIndices) {
|
|
||||||
final InputPointers ips = codes.getInputPointers();
|
final InputPointers ips = codes.getInputPointers();
|
||||||
final boolean isGesture = codes.isBatchMode();
|
final boolean isGesture = codes.isBatchMode();
|
||||||
final int codesSize;
|
final int codesSize;
|
||||||
|
@ -204,7 +202,7 @@ public class BinaryDictionary extends Dictionary {
|
||||||
return getSuggestionsNative(mNativeDict, proximityInfo.getNativeProximityInfo(),
|
return getSuggestionsNative(mNativeDict, proximityInfo.getNativeProximityInfo(),
|
||||||
ips.getXCoordinates(), ips.getYCoordinates(), ips.getTimes(), ips.getPointerIds(),
|
ips.getXCoordinates(), ips.getYCoordinates(), ips.getTimes(), ips.getPointerIds(),
|
||||||
mInputCodes, codesSize, 0 /* unused */, isGesture, prevWord,
|
mInputCodes, codesSize, 0 /* unused */, isGesture, prevWord,
|
||||||
mUseFullEditDistance, outputChars, scores, spaceIndices);
|
mUseFullEditDistance, mOutputChars, mOutputScores, mSpaceIndices);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float calcNormalizedScore(String before, String after, int score) {
|
public static float calcNormalizedScore(String before, String after, int score) {
|
||||||
|
|
Loading…
Reference in New Issue