From 83c40a2301a0b5a42a75eecada48e7887a7c940e Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Mon, 19 May 2014 13:55:40 +0900 Subject: Use PrevWordsInfo instead of String in Java side. Bug: 14119293 Bug: 14425059 Change-Id: I3d5da84881a49a04550180dd9aac2c37da2ed762 --- java/src/com/android/inputmethod/latin/Dictionary.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/Dictionary.java') diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java index 5253cc3dd..aab16653e 100644 --- a/java/src/com/android/inputmethod/latin/Dictionary.java +++ b/java/src/com/android/inputmethod/latin/Dictionary.java @@ -69,7 +69,7 @@ public abstract class Dictionary { * Searches for suggestions for a given context. For the moment the context is only the * previous word. * @param composer the key sequence to match with coordinate info, as a WordComposer - * @param prevWord the previous word, or null if none + * @param prevWordsInfo the information of previous words. * @param proximityInfo the object for key proximity. May be ignored by some implementations. * @param blockOffensiveWords whether to block potentially offensive words * @param additionalFeaturesOptions options about additional features used for the suggestion. @@ -79,10 +79,8 @@ public abstract class Dictionary { * different language weight is used. * @return the list of suggestions (possibly null if none) */ - // TODO: pass more context than just the previous word, to enable better suggestions (n-gram - // and more) abstract public ArrayList getSuggestions(final WordComposer composer, - final String prevWord, final ProximityInfo proximityInfo, + final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo, final boolean blockOffensiveWords, final int[] additionalFeaturesOptions, final int sessionId, final float[] inOutLanguageWeight); @@ -156,7 +154,7 @@ public abstract class Dictionary { @Override public ArrayList getSuggestions(final WordComposer composer, - final String prevWord, final ProximityInfo proximityInfo, + final PrevWordsInfo prevWordsInfo, final ProximityInfo proximityInfo, final boolean blockOffensiveWords, final int[] additionalFeaturesOptions, final int sessionId, final float[] inOutLanguageWeight) { return null; -- cgit v1.2.3-83-g751a