Merge "Remove useless adding of shortcut as unigrams."

This commit is contained in:
Jean Chalard 2012-03-28 04:41:05 -07:00 committed by Android (Google) Code Review
commit 428484d6f9

View file

@ -311,9 +311,6 @@ public class FusionDictionary implements Iterable<Word> {
public void add(final String word, final int frequency,
final ArrayList<WeightedString> shortcutTargets,
final ArrayList<WeightedString> bigrams) {
if (null != shortcutTargets) {
addNeutralWords(shortcutTargets);
}
if (null != bigrams) {
addNeutralWords(bigrams);
}
@ -350,7 +347,6 @@ public class FusionDictionary implements Iterable<Word> {
if (null == shortcutTargets) {
throw new RuntimeException("Can't add a shortcut without targets");
}
addNeutralWords(shortcutTargets);
add(getCodePoints(word), frequency, shortcutTargets, null, true /* isShortcutOnly */);
}