aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Dictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-09-13 11:41:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-13 11:41:55 +0000
commit41aaff6cdf6cc1edb41ec222695bb6985e646d23 (patch)
tree50c1b903d6d3e617130fdc37395a87efe2373488 /java/src/com/android/inputmethod/latin/Dictionary.java
parent04bf3cd4e0299b50f5be01525a67c5da41fe5721 (diff)
parent24aad5a4d545e743fe43953c1a9d8141c022d355 (diff)
downloadlatinime-41aaff6cdf6cc1edb41ec222695bb6985e646d23.tar.gz
latinime-41aaff6cdf6cc1edb41ec222695bb6985e646d23.tar.xz
latinime-41aaff6cdf6cc1edb41ec222695bb6985e646d23.zip
Merge "[AC4] Add native methods necessary for auto-commit"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Dictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Dictionary.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index 8a3a88438..fa79f5af7 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -137,7 +137,10 @@ public abstract class Dictionary {
}
/**
- * Whether we think this suggestion should trigger an auto-commit.
+ * Whether we think this suggestion should trigger an auto-commit. prevWord is the word
+ * before the suggestion, so that we can use n-gram frequencies.
+ * @param candidate The candidate suggestion, in whole (not only the first part).
+ * @return whether we should auto-commit or not.
*/
public boolean shouldAutoCommit(final SuggestedWordInfo candidate) {
// If we don't have support for auto-commit, or if we don't know, we return false to