Skip to content
Snippets Groups Projects
Commit dc6ee3a6 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android (Google) Code Review
Browse files

Merge "Enable beginning-of-sentence prediction."

parents 702e153f 2725cc17
No related branches found
No related tags found
No related merge requests found
...@@ -122,12 +122,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { ...@@ -122,12 +122,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
return mBinaryDictionary.isValidDictionary(); return mBinaryDictionary.isValidDictionary();
} }
// TODO: Remove and always enable beginning of sentence prediction. Currently, this is enabled
// only for ContextualDictionary.
protected boolean enableBeginningOfSentencePrediction() {
return false;
}
/** /**
* Creates a new expandable binary dictionary. * Creates a new expandable binary dictionary.
* *
...@@ -426,10 +420,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { ...@@ -426,10 +420,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
if (mBinaryDictionary == null) { if (mBinaryDictionary == null) {
return null; return null;
} }
if (composer.size() == 0 && prevWordsInfo.mIsBeginningOfSentence
&& !enableBeginningOfSentencePrediction()) {
return null;
}
final ArrayList<SuggestedWordInfo> suggestions = final ArrayList<SuggestedWordInfo> suggestions =
mBinaryDictionary.getSuggestions(composer, prevWordsInfo, proximityInfo, mBinaryDictionary.getSuggestions(composer, prevWordsInfo, proximityInfo,
blockOffensiveWords, additionalFeaturesOptions, sessionId, blockOffensiveWords, additionalFeaturesOptions, sessionId,
......
...@@ -42,11 +42,6 @@ public class ContextualDictionary extends ExpandableBinaryDictionary { ...@@ -42,11 +42,6 @@ public class ContextualDictionary extends ExpandableBinaryDictionary {
return new ContextualDictionary(context, locale, dictFile); return new ContextualDictionary(context, locale, dictFile);
} }
@Override
protected boolean enableBeginningOfSentencePrediction() {
return true;
}
@Override @Override
public boolean isValidWord(final String word) { public boolean isValidWord(final String word) {
// Strings out of this dictionary should not be considered existing words. // Strings out of this dictionary should not be considered existing words.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment