diff options
author | 2012-04-05 05:08:55 -0700 | |
---|---|---|
committer | 2012-04-05 05:08:56 -0700 | |
commit | af7d86c5b8d5bcde804a5a033d4d401a76f1989c (patch) | |
tree | 218beafe60e994c975d713ede35f6dea3a3de280 /java | |
parent | aa300bb73a970a42ffb8bc8c5419c22191a7c08a (diff) | |
parent | 80f2ccc236272be5897b2b0ba4ad302c8bbcc97d (diff) | |
download | latinime-af7d86c5b8d5bcde804a5a033d4d401a76f1989c.tar.gz latinime-af7d86c5b8d5bcde804a5a033d4d401a76f1989c.tar.xz latinime-af7d86c5b8d5bcde804a5a033d4d401a76f1989c.zip |
Merge "Update the names and default values of bigram options."
Diffstat (limited to 'java')
-rw-r--r-- | java/res/values/config.xml | 10 | ||||
-rw-r--r-- | java/res/values/strings.xml | 14 | ||||
-rw-r--r-- | java/res/xml/prefs.xml | 8 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/Settings.java | 6 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/SettingsValues.java | 6 |
5 files changed, 22 insertions, 22 deletions
diff --git a/java/res/values/config.xml b/java/res/values/config.xml index f0b12e92b..133bb0a06 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -22,17 +22,17 @@ <bool name="config_use_fullscreen_mode">false</bool> <bool name="config_enable_show_voice_key_option">true</bool> <bool name="config_enable_show_popup_on_keypress_option">true</bool> - <bool name="config_enable_bigram_suggestions_option">true</bool> + <bool name="config_enable_next_word_suggestions_option">true</bool> <!-- TODO: Disable the following configuration for production. --> <bool name="config_enable_usability_study_mode_option">true</bool> <!-- Whether or not Popup on key press is enabled by default --> <bool name="config_default_popup_preview">true</bool> - <!-- Default value for bigram suggestion: while showing suggestions for a word should we weigh + <!-- Default value for next word suggestion: while showing suggestions for a word should we weigh in the previous word? --> - <bool name="config_default_bigram_suggestions">true</bool> - <!-- Default value for bigram prediction: after entering a word and a space only, should we look + <bool name="config_default_next_word_suggestions">true</bool> + <!-- Default value for next word prediction: after entering a word and a space only, should we look at input history to suggest a hopefully helpful suggestions for the next word? --> - <bool name="config_default_bigram_prediction">false</bool> + <bool name="config_default_next_word_prediction">true</bool> <bool name="config_default_sound_enabled">false</bool> <bool name="config_default_vibration_enabled">true</bool> <integer name="config_delay_update_suggestions">100</integer> diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index a22c68cb8..28acd0fcc 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -118,13 +118,13 @@ <!-- Option to suggest auto correction suggestions very aggressively. Auto-corrects to a word which has even large edit distance from typed word. [CHAR LIMIT=20] --> <string name="auto_correction_threshold_mode_very_aggeressive">Very aggressive</string> - <!-- Option to enable bigram correction --> - <string name="bigram_suggestion">Bigram suggestions</string> - <!-- Description for auto correction --> - <string name="bigram_suggestion_summary">Use previous word to improve suggestion</string> - <!-- Option to enable using user-history bigram when no input --> - <string name="bigram_prediction">Bigram prediction</string> - <!-- Description for auto correction --> + <!-- Option to enable next word correction --> + <string name="bigram_suggestion">Next word suggestions</string> + <!-- Option to enable next word suggestion. This uses the previous word in an attempt to improve the suggestions quality --> + <string name="bigram_suggestion_summary">Use previous word to improve suggestions</string> + <!-- Option to enable using next word prediction --> + <string name="bigram_prediction">Next word prediction</string> + <!-- Description for "next word prediction" option. This displays suggestions even when there is no input, based on the previous word. --> <string name="bigram_prediction_summary">Use previous word also for prediction</string> <!-- Indicates that a word has been added to the dictionary --> diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index c5c647aac..ab5d44b24 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -111,18 +111,18 @@ android:persistent="true" android:defaultValue="true" /> <CheckBoxPreference - android:key="bigram_suggestion" + android:key="next_word_suggestion" android:title="@string/bigram_suggestion" android:summary="@string/bigram_suggestion_summary" android:persistent="true" android:defaultValue="true" /> <CheckBoxPreference - android:key="bigram_prediction" - android:dependency="bigram_suggestion" + android:key="next_word_prediction" + android:dependency="next_word_suggestion" android:title="@string/bigram_prediction" android:summary="@string/bigram_prediction_summary" android:persistent="true" - android:defaultValue="false" /> + android:defaultValue="true" /> <CheckBoxPreference android:key="enable_span_insert" android:title="@string/enable_span_insert" diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java index 7b98a7188..6bc049894 100644 --- a/java/src/com/android/inputmethod/latin/Settings.java +++ b/java/src/com/android/inputmethod/latin/Settings.java @@ -66,8 +66,8 @@ public class Settings extends InputMethodSettingsActivity public static final String PREF_KEY_PREVIEW_POPUP_DISMISS_DELAY = "pref_key_preview_popup_dismiss_delay"; public static final String PREF_KEY_USE_CONTACTS_DICT = "pref_key_use_contacts_dict"; - public static final String PREF_BIGRAM_SUGGESTION = "bigram_suggestion"; - public static final String PREF_BIGRAM_PREDICTIONS = "bigram_prediction"; + public static final String PREF_BIGRAM_SUGGESTION = "next_word_suggestion"; + public static final String PREF_BIGRAM_PREDICTIONS = "next_word_prediction"; public static final String PREF_KEY_ENABLE_SPAN_INSERT = "enable_span_insert"; public static final String PREF_VIBRATION_DURATION_SETTINGS = "pref_vibration_duration_settings"; @@ -167,7 +167,7 @@ public class Settings extends InputMethodSettingsActivity } final boolean showBigramSuggestionsOption = res.getBoolean( - R.bool.config_enable_bigram_suggestions_option); + R.bool.config_enable_next_word_suggestions_option); if (!showBigramSuggestionsOption) { textCorrectionGroup.removePreference(mBigramSuggestion); if (null != mBigramPrediction) { diff --git a/java/src/com/android/inputmethod/latin/SettingsValues.java b/java/src/com/android/inputmethod/latin/SettingsValues.java index 103678403..49ab7f9d7 100644 --- a/java/src/com/android/inputmethod/latin/SettingsValues.java +++ b/java/src/com/android/inputmethod/latin/SettingsValues.java @@ -236,18 +236,18 @@ public class SettingsValues { private static boolean isBigramSuggestionEnabled(final SharedPreferences sp, final Resources resources, final boolean autoCorrectEnabled) { final boolean showBigramSuggestionsOption = resources.getBoolean( - R.bool.config_enable_bigram_suggestions_option); + R.bool.config_enable_next_word_suggestions_option); if (!showBigramSuggestionsOption) { return autoCorrectEnabled; } return sp.getBoolean(Settings.PREF_BIGRAM_SUGGESTION, resources.getBoolean( - R.bool.config_default_bigram_suggestions)); + R.bool.config_default_next_word_suggestions)); } private static boolean isBigramPredictionEnabled(final SharedPreferences sp, final Resources resources) { return sp.getBoolean(Settings.PREF_BIGRAM_PREDICTIONS, resources.getBoolean( - R.bool.config_default_bigram_prediction)); + R.bool.config_default_next_word_prediction)); } private static double getAutoCorrectionThreshold(final Resources resources, |