mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am dc6ee3a6
: Merge "Enable beginning-of-sentence prediction."
* commit 'dc6ee3a63fdabe88f5528e81adabad93cfc4ecb3': Enable beginning-of-sentence prediction.
This commit is contained in:
commit
68c90f30ae
@ -122,12 +122,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
|
||||
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.
|
||||
*
|
||||
@ -426,10 +420,6 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
|
||||
if (mBinaryDictionary == null) {
|
||||
return null;
|
||||
}
|
||||
if (composer.size() == 0 && prevWordsInfo.mIsBeginningOfSentence
|
||||
&& !enableBeginningOfSentencePrediction()) {
|
||||
return null;
|
||||
}
|
||||
final ArrayList<SuggestedWordInfo> suggestions =
|
||||
mBinaryDictionary.getSuggestions(composer, prevWordsInfo, proximityInfo,
|
||||
blockOffensiveWords, additionalFeaturesOptions, sessionId,
|
||||
|
@ -42,11 +42,6 @@ public class ContextualDictionary extends ExpandableBinaryDictionary {
|
||||
return new ContextualDictionary(context, locale, dictFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean enableBeginningOfSentencePrediction() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidWord(final String word) {
|
||||
// Strings out of this dictionary should not be considered existing words.
|
||||
|
Loading…
Reference in New Issue
Block a user