Commit Graph

64 Commits (c4977b5f8990ce73a7c9c26daa5b7cfb201fe024)

Author SHA1 Message Date
Mohammadinamul Sheik b00c054125 AOSP changes to use KeyboardLayout to support the new DictionaryFacilitator
Change-Id: Ie0c9ce805d9ad009fc9bbaac37b715aff90cd844
2015-02-04 12:50:31 -08:00
Dan Zivkovic 0d3f01f301 Remove last vestiges of contextual+personal dictionary.
Change-Id: I20746381583ee8a4d7d42b1243f5c7ba45529e5e
2015-02-04 11:38:19 -08:00
Dan Zivkovic 23574d1231 LatinIME portion of "green plus" feature.
Removes the feature that adds strings to the user dictionary,
aka the "green highlight with a plus sign".

Bug 19237189.

Change-Id: I2387129a3add2d69d625f2ff16ed8cab3f10a735
2015-02-03 15:12:01 -08:00
Jatin Matani 15acbdc905 Nuke Amanatto
Change-Id: Ieff2cd37f869dca69abf53ac32a576c2e45cc1e3
2015-02-02 17:10:38 -08:00
Mario Tanev ab6f3b36d0 Change DictionaryFacilitator.java to an interface, create its
implementation DictionaryFacilitatorImpl.java and add a java-overridable
factory DictionaryFacilitatorProvider.java used to create a
DictionaryFacilitator.

Change-Id: Id4a58ae31feaa4d12a048a772c8d76ff82fdee45
2015-01-27 21:38:32 +00:00
Jatin Matani bc4ae6bdc0 Passing account info to dictionaryFacilitator
Attempt to use dictionary facilitor without invoking
preference manager. Instead use account from settings only when
things are being reset/changed. Discussion forked from ag/591663

Overall, the idea here is to maintain an account information
inside dictionary groups. Reset the dictionary groups if
account changes (the way we do for locale). Since only user
history dictionary is currently affected, the check to reset user
history dictionary also includes the check to verify the account.
For other things remain the same.

SettingsValues holds the current account (and is updated if prefs change
due to change in account settings). The updated settings are then
propagated to dictionary facilitator via LatinIME#loadSettings.

Bug:18104749,18469539
Change-Id: I553e776e7ea125d0fb7a1fe70a4c7eb0b2277fb8
2014-12-16 15:56:00 -08:00
Jean Chalard 949045b6a3 Merge "Be always confident in the current language when only one" 2014-11-28 03:25:29 +00:00
Jean Chalard 2d81c1f183 Be always confident in the current language when only one
Change-Id: I7ea289f7e78aa33562c7737e91024a25c02333b6
2014-11-28 12:22:16 +09:00
Tadashi G. Takaoka 063b2e8d71 Merge "Make LocaleUtils.constructLocaleFromString as @Nonnull" 2014-11-28 03:02:20 +00:00
Jean Chalard e752aab70d Use confidence to fix whitelist
With this the most obvious problem is fixed. However there
are two remaining items : we should still enforce whitelist
when there are no close candidates at all, and we should
start in confident mode when pressing the globe key.

Bug: 18063142
Bug: 18130489
Bug: 18132240
Bug: 18136721
Bug: 18200415
Change-Id: Ibc0571ae35fc28f8d13760aa86b25db1163d3e31
2014-11-26 17:29:59 +09:00
Jean Chalard d06dd0ca12 Add confidence.
Bug: 18063142
Bug: 18130489
Bug: 18132240
Bug: 18136721
Bug: 18200415
Change-Id: Ica09d11cb95308dd014c4e4e0d99a30dd66bfea9
2014-11-25 14:41:27 +09:00
Tadashi G. Takaoka ebe5b42f71 Make LocaleUtils.constructLocaleFromString as @Nonnull
Change-Id: I82d574c67b25239510f3ecc8882efe46e40677eb
2014-11-21 12:02:06 +09:00
Jean Chalard 0e00f5fe3a Fix a NPE
Bug: 18451316
Change-Id: Ia20bf388471f84c963354df050182e722d966a02
2014-11-20 13:50:27 +09:00
Jean Chalard ecab6aff59 Remove Dict dependency on WordComposer and ProximityInfo
Bug: 18108776
Change-Id: I9b399a44241e05a7add9bb8094263aa76de37880
2014-10-29 12:27:24 +09:00
Ken Wakasa 9342484e8d Move Constants.java to the latin.common package
Our intention is to have classes of latinime-common under the common
package as much as we can.

Change-Id: I76efbbbe7bebf1a4aa943715cdff64f91675e20d
2014-10-23 20:27:37 +09:00
Keisuke Kuroyanagi 16cc3992d7 Use trigrams for personalization dict.
5Bug: 14425059
Change-Id: I73cf6904e569d60996a3b079f16ea6df0cb90f02
2014-10-23 14:32:45 +09:00
Tadashi G. Takaoka d3a4c51324 Fix Javadoc and null analysis related warnings
This CL also adds @SuppressWarning("unused" to java-overridable package.

Bug: 18003991
Change-Id: If70527e30654384705d7a814f5efd181d9f539e1
2014-10-23 09:58:42 +09:00
Tadashi G. Takaoka 5f00fe09e9 Fix some compiler warnings
This CL fixes the following compiler warnings.

- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations

Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
2014-10-21 19:28:37 +09:00
Adrian Velicu 05172bf1a5 Renaming "blacklist" flag to "possibly offensive"
No behaviour changes.
Unified the overloaded FusionDictionary::add method to always take an
isPossiblyOffensive argument.

Bug: 11031090
Change-Id: I5741a023ca1ce842d2cf10d4f6c926b0efabaa78
2014-10-21 11:51:47 +09:00
Jean Chalard 81a5a10476 [ML19] Actually switch the language when appropriate
That is, when auto-correcting or when manually picking.
This is not great, but it's a good starting point.

Bug: 11230254
Change-Id: I07627f48e2de1c28053d6572c7c72625808ec79c
2014-10-09 13:13:25 +09:00
Jean Chalard be4e1539cb [ML17] Add a method to switch the most probable language
Also directly hold a ref to it. It's simpler for now, though
we may want to remove it completely later to have a flat,
purely weight-based system with no preference.
Also split weights between gesturing and typing.

Bug: 11230254
Change-Id: Ica15964a193ae6e7f14c85a9a3ed806130fa7efb
2014-10-07 19:09:49 +09:00
Jean Chalard 38ec825ef8 [ML16] Remove DictionaryFacilitator.getLocale()
Bug: 11230254
Change-Id: Ife99df42bc145fbd2d5c3128330bc0f88b104de9
2014-10-07 16:44:26 +09:00
Jean Chalard ea07734956 [ML15] First step in removing DictionaryFacilitator.getLocale
Bug: 11230254
Change-Id: Ied010ec6f1024080e8a499f682d2fc1780e82ef7
2014-10-07 16:06:35 +09:00
Jean Chalard bc051a561f [ML14] Forward the locale list to relevant places, again
Diff:
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardBuilder.java
@@ -735,7 +735,7 @@ public class KeyboardBuilder<KP extends KeyboardParams> {

     private boolean matchLocaleCodes(TypedArray caseAttr, final Locale[] locales) {
         // TODO: adujst this for multilingual input
-        return matchString(caseAttr, R.styleable.Keyboard_Case_languageCode, locales[0].toString());
+        return matchString(caseAttr, R.styleable.Keyboard_Case_localeCode, locales[0].toString());
     }

     private boolean matchLanguageCodes(TypedArray caseAttr, Locale[] locales) {

Change-Id: Icefac18dd6d5fea97f591177cf8df1ba6de7f4f0
2014-10-06 21:27:32 +09:00
Ken Wakasa faefad5b0f Revert "[ML14] Forward the locale list to relevant places"
This reverts commit 15dbd38283.

Bug: 11230254

Reverting due to unit test breakage.

Change-Id: Icf29ba5c808c754515aef2d1b4162d72f606acfe
2014-10-03 23:48:53 +00:00
Jean Chalard 15dbd38283 [ML14] Forward the locale list to relevant places
Bug: 11230254
Change-Id: Idf3ed27b396d63ade9800c72c5ce0ed613f5f669
2014-10-03 23:20:38 +09:00
Jean Chalard 1c0876dc49 [ML12] Add a getPrimaryLocale function and some refactoring
Bug: 11230254
Change-Id: Ic579b93702c24f47e6cdb0c9a4da6b11f1fa76c8
2014-10-02 18:15:35 +09:00
Keisuke Kuroyanagi bb0eca5705 Rename PrevWordsInfo to NgramContext.
Bug: 14425059
Change-Id: Id06a71681fa8b5e589e29fba10fe5c1cfed66984
2014-09-29 10:52:18 +09:00
Keisuke Kuroyanagi bbd6a26be0 Refactoring PrevWordsInfo.
Bug: 14425059
Change-Id: I48a193b965e3055bd10a00046322c2b7b19a6232
2014-09-26 21:46:57 +09:00
Adrian Velicu bacf2dbac6 Merge "Added @UsedForTesting to 'missing' methods to avoid ProGuard removing them" 2014-09-19 05:39:31 +00:00
Adrian Velicu 8c889784e2 Added @UsedForTesting to 'missing' methods to avoid ProGuard removing them
Bug: 16864527
Change-Id: I698a1b3e09e7e9a12722169b37f87bd51c8cbd34
2014-09-19 14:31:33 +09:00
Jean Chalard 6da9b21191 [ML8] Add a language weight
...and rename an improperly named normalization value

Bug: 11230254
Change-Id: I0f5633148a9f66dbfd7d28540b8a8985131c4549
2014-09-19 13:44:42 +09:00
Tadashi G. Takaoka f4c7eb478f Fix showing important notice even at beginning of sentence
This is a cherry-pick of Ic72d6fecc3 from lmp-dev.

Bug: 17536096
Change-Id: Id76b8f8dc85d03bc7ed5f24800301c081a82a8d2
2014-09-18 18:51:23 +09:00
Jean Chalard 8cd5326622 [ML7] Have multiple DictionaryGroup instances in facilitator
This is the central change of multilingual input.

Bug: 11230254
Change-Id: Id8b68fb101e837e8cf182ab4bc1e55e4da5cc49d
2014-09-16 19:00:50 +09:00
Jean Chalard 96f0ae5e68 [ML6] Have asyncReloadMainDictionary support multiple locales
Change-Id: I4c3dfaad38ec1cc91d1a9f81d5ff45ef12f70029
2014-09-11 19:05:22 +09:00
Jean Chalard e6df5f015c [ML5] Rewrite resetDictionariesWithDictNamePrefix
This change rewrites resetDictionariesWithDictNamePrefix so
that it would work if there were several locales, which is going to
happen shortly. This change on its own is quite large and difficult
already, so I didn't want to merge it into the change that actually
makes several locales happen; another such change is following.

Change-Id: Ibb80b05b73c0f0f0bea64b7e308cc4d38ca448f9
2014-09-11 19:05:19 +09:00
Keisuke Kuroyanagi af1a06d7e1 Enable personalization for multilingual users.
Bug: 16547557
Change-Id: I03eda34edc902fc4732d16d234216344d8d84d88
2014-09-10 18:23:09 +09:00
Keisuke Kuroyanagi 89e34169f8 Get locale using detected language for personalization.
Bug: 16547557
Change-Id: If3d88a548e5a2255ff81c819b056f77bfbe237ae
2014-09-10 18:23:07 +09:00
Keisuke Kuroyanagi d843081193 Move case and OOV detection logic into distracter filter.
Bug: 16547557

Change-Id: I8502585976deb5e93fff3b1e0266654b8a927bda
2014-09-10 11:25:34 +09:00
Jean Chalard 78d1dcd356 [ML4] Rename Dictionaries to DictionaryGroup
We're going to have multiple DictionaryGroup objects and it
would be very confusing to have this class name a plural.

Change-Id: I8f5c621459ede49f245be26097fe71f44289761c
2014-09-04 18:35:47 +09:00
Jean Chalard 576c96af95 [ML3] Put the locale in SuggestedWordInfo
...and remove it from SuggestionResults.

Change-Id: Iae85ec7e82e2caf18cc6d7656aa46dc150707cdd
2014-09-01 20:09:32 +09:00
Keisuke Kuroyanagi e59f3e4fbf Use DictionaryFacilitatorLruCache for personalization.
Bug: 16547557

Change-Id: I5faba5e26d072b49c0fffcaeaf5062f9e0c2dcc0
2014-08-29 12:57:50 +09:00
Keisuke Kuroyanagi 9cbf814cb5 Get dynamic dict stats via DictionaryFacilitator
Bug: 16553957
Change-Id: Ida08ceaf34708daed52d61b3d5adfbdb48e42c71
2014-08-25 15:19:48 +09:00
Keisuke Kuroyanagi 87ab5b0518 Use DistracterFilterCheckingIsInDictionary for User History
Bug: 13142176
Bug: 15531638
Change-Id: I7e4e5afa05c5cee6eedef62c053d81edac5fa6af
2014-08-07 18:39:06 +09:00
Keisuke Kuroyanagi b8a9479b57 Move phrase gesture from additional features to public.
Bug: 15758242
Change-Id: I703dc2703afdf9402c5d2ac27411b74ece993dba
2014-07-08 16:36:06 +09:00
Keisuke Kuroyanagi 92827b0712 Merge "Make PrevWordsInfo have multiple words' information." 2014-06-24 01:52:26 +00:00
Keisuke Kuroyanagi e708b1bc2e Make PrevWordsInfo have multiple words' information.
Bug: 14425059
Change-Id: I2bd6a872904a44b80f638a13d91a97559217cc1a
2014-06-25 14:14:37 +09:00
Jean Chalard e83e79cb05 [CS1] Some initial clean up
Bug: 13238601
Change-Id: I54ee9a85ecfee3c50c8db3eb4cd6f391a775a630
2014-06-23 22:19:09 +09:00
Keisuke Kuroyanagi 0fbca1ac23 Remove word from personalized dicts when it's canceled.
Bug: 15555552
Bug: 15552347
Change-Id: Ia4d8c79d079e3ce233d46d4bbad4fff1be5c5c39
2014-06-20 14:46:13 +09:00
Keisuke Kuroyanagi cb368a6dac Fix: Probability used for one word contextual phrase.
Bug: 14161647
Change-Id: Ia5f985ea467145fb381e3ad2c1f67f3b013f19e8
2014-06-16 18:20:33 +09:00