Commit Graph

33701 Commits (009e02ce4a132b0f94d130c36761e18935577af1)

Author SHA1 Message Date
Adrian Velicu 009e02ce4a Further fixes to treat 0-frequency words
Previously, when both legitimate 0-frequency words (such as
distracters) and offensive words were encoded in the same
way, distracters would never show up when the user blocked
offensive words (the default setting, as well as the setting
for regression tests).

When b/11031090 was fixed and a separate encoding was used
for offensive words, 0-frequency words would no longer be
blocked when they were an "exact match" (where case
mismatches and accent mismatches would be considered an
"exact match"). The exact match boosting functionality meant
that, for example, when the user typed "mt" they would be
suggested the word "Mt", although they most probably meant
to type "my".

For this reason, we introduced this change, which does the
following:
* Defines the "perfect match" as a really exact match, with
no room for case or accent mismatches
* When the target word has probability zero (as "Mt" does,
because it is a distracter), ONLY boost its score if it is a
perfect match.

By doing this, when the user types "mt", the word "Mt" will
NOT be boosted, and they will get "my". However, if the user
makes an explicit effort to type "Mt", we do boost the word
"Mt" so that the user's input is not autocorrected to "My".

Bug: 11031090
Change-Id: I92ee1b4e742645d52e2f7f8c4390920481e8fff0
2014-10-31 15:58:50 +09:00
Adrian Velicu 10416241f7 Block offensive words in multi-word suggestions
If the user has chosen to block offensive words and types
"aaaxbb", where "aaa" is an offensive word and "bb" is not,
we should not suggest "aaa bb".

Bug: 11031090
Change-Id: Ie23b8dd5d347bc26b1c046c3f5e8dfbc259bf528
2014-10-31 15:58:50 +09:00
Adrian Velicu 61d43e5c94 Merge "Update unit tests for new static dict version." 2014-10-31 06:49:51 +00:00
Adrian Velicu f59c3b6238 Merge "Update dictionaries (possibly_offensive flag)" 2014-10-31 06:49:42 +00:00
Adrian Velicu aa20342d7e Merge "Using "blacklist" flag as "possibly offensive"" 2014-10-31 06:49:29 +00:00
Adrian Velicu 88480f39f6 Update unit tests for new static dict version.
Bug: 11031090
Change-Id: Ifd7b241f1a0a30678ca7de97cc6e96927a9b5c8f
2014-10-31 14:50:18 +09:00
Adrian Velicu 8dd31a28ae Update dictionaries (possibly_offensive flag)
Correctly encoding possibly offensive words with their correct
frequency and the possibly_offensive flag set.

Continuing to encode with zero frequency only distracters or
words that should never come up.

https://paste.googleplex.com/5167060875214848

Bug: 11031090
Change-Id: Ia394b1827f292ff8d4791cc2f3e6e50b5aff4cbe
2014-10-31 14:49:24 +09:00
Adrian Velicu 7c87859d4c Using "blacklist" flag as "possibly offensive"
Bug: 11031090
Change-Id: I5cc0d006ab003656498eb82b0875eb9c051d331e
2014-10-31 14:33:05 +09:00
Keisuke Kuroyanagi 0cd1f222fd Fix: native unit test build.
Change-Id: Id2bd4b60d6a4023815a630ebb3059a435b72c193
2014-10-31 12:50:45 +09:00
Keisuke Kuroyanagi c096100b01 Merge "Enable count based dynamic ngram language model for v403." 2014-10-31 03:15:20 +00:00
Keisuke Kuroyanagi bcb52d73e2 Enable count based dynamic ngram language model for v403.
Bug: 14425059

Change-Id: Icc15e14cfd77d37cd75f75318fd0fa36f9ca7a5b
2014-10-30 23:38:19 +09:00
Keisuke Kuroyanagi 04a492cb49 Merge "Add DynamicLanguageModelProbabilityUtils." 2014-10-30 14:08:17 +00:00
Keisuke Kuroyanagi 660b00477c Add DynamicLanguageModelProbabilityUtils.
Bug: 14425059
Change-Id: Ia58ab3f0ead02798046d182a9464dcbd95f086bc
2014-10-30 21:33:57 +09:00
Tadashi G. Takaoka 77947c9c96 Merge "Consolidate TimerHandler.Callbacks with PointerTracker.DrawingProxy" 2014-10-30 09:55:51 +00:00
Tadashi G. Takaoka be708c4e59 Consolidate TimerHandler.Callbacks with PointerTracker.DrawingProxy
Change-Id: I654f7483d1c013ac2685a45af4eb2af15fa219ad
2014-10-30 18:28:40 +09:00
Keisuke Kuroyanagi 5286073529 Merge "Add method to encode probability." 2014-10-30 03:46:19 +00:00
Keisuke Kuroyanagi 0a9c3f30b6 Add method to encode probability.
Bug: 14425059
Change-Id: I3e5d359ba5fa38f1669f0e98dfae792ff53efbf8
2014-10-30 12:42:35 +09:00
Andy Wang 0ca400c827 Merge "Add a preference to resize the keyboard height." 2014-10-30 03:37:26 +00:00
Tadashi G. Takaoka d9b1327c21 Merge "Consolidate similar methods" 2014-10-30 02:54:38 +00:00
Andy Wang bb9400aebc Add a preference to resize the keyboard height.
The keyboard height is controlled by a slider in the debug preferences.
Without access to debug preferences, this change is a no-op.

Bug: 6867494
Change-Id: I984064ed1cab752876615f5ed582818474d6041b
2014-10-30 11:45:41 +09:00
Tadashi G. Takaoka d2c00f550d Fix dismiss key preview bug introduced by I658a5b16cc
Change-Id: I5248374dfe0504f6e64cc5d994e275d80364ec9d
2014-10-30 11:43:53 +09:00
Tadashi G. Takaoka 051f8b1442 Consolidate similar methods
This CL consolidates similar methods in MainKeyboardView.
- startWhileTypingFadeinAnimation and startWhileTypingFadeoutAnimation
- showSlidingKeyInputPreview and dismissSlidingKeyInputPreview

Change-Id: I607ab74683820de2456af3e75663cf8cf358ab38
2014-10-30 11:15:59 +09:00
Geoff Mendal c96bb3e9a7 Merge "Import translations. DO NOT MERGE" 2014-10-29 19:14:14 +00:00
Geoff Mendal 4caa03c839 Import translations. DO NOT MERGE
Change-Id: I3643a631ae94f295bdcd4cf4427fd4bcfef00a17
Auto-generated-cl: translation import
2014-10-29 12:02:07 -07:00
Keisuke Kuroyanagi c2ba0ce411 Fix: TRT and ime-simulator bulid.
Change-Id: I1697a907562d1ed6aff2b001763d1594263ba0d3
2014-10-30 01:01:40 +09:00
Tadashi G. Takaoka 4e0149c22a Merge "Remove DrawingHandler" 2014-10-29 13:42:44 +00:00
Jean Chalard 93e5cdea71 Merge "[CS8] Add explanations" 2014-10-29 12:26:23 +00:00
Keisuke Kuroyanagi afe67611c3 Merge "Add a class to have global counters for LanguageModelDictContent." 2014-10-29 12:18:12 +00:00
Keisuke Kuroyanagi 6b0561f9d2 Add a class to have global counters for LanguageModelDictContent.
Bug: 14425059
Change-Id: I08ec19903432356b6028853fd73b4eefce20218e
2014-10-29 21:05:41 +09:00
Tadashi G. Takaoka 2ad6d9cda3 Remove DrawingHandler
Change-Id: I658a5b16cca1e56f0b944009b8aef09e0a97a0db
2014-10-29 18:51:41 +09:00
Tadashi G. Takaoka ca6e5dfedb Remove DrawingHandler.Callbacks.dismissAllKeyPreviews()
Change-Id: I2b11ca0dec0f3522648557a9a909f305cc4170fb
2014-10-29 15:25:09 +09:00
Jean Chalard 36799b2aa2 Move InputPointers and ResizableIntArray to common
Bug: 18108776
Change-Id: Ie5c0430aa41a8d6c58bf510a10173223d7dfe9fe
2014-10-29 12:09:11 +09:00
Tadashi G. Takaoka 80980574ac Fix test breakage
This CL also adds null analysis annotations to StringUtils.

Change-Id: I751932c1ed2579bc10f4584651b997356f180899
2014-10-29 11:52:08 +09:00
Tadashi G. Takaoka 48ee473c1e Merge "Clean up UserDictionaryCompatUtils" 2014-10-29 00:37:43 +00:00
Jean Chalard 4beeb9253a Move StringUtils under common.
Bug: 18108776
Change-Id: Ia46a4102a0e86e71118ca5e641f9f531998e166b
2014-10-28 22:44:30 +09:00
Jean Chalard 8cad60ae88 Fix tests build
Change-Id: I873ab97e2c4b30caa9227d26d7880d5ed6d134b0
2014-10-28 22:37:16 +09:00
Jean Chalard ca724ef71f Reduce StringUtils dependency on the Android libs
Bug: 18108776
Change-Id: I43feb25d79f89276d44462ba71788a14c4583277
2014-10-28 22:03:18 +09:00
Ken Wakasa b3b1ba8d4a Fix unit test failures
Change-Id: I1d66a0124961d524f83f7895a2c09e0ee2c1aab4
2014-10-28 19:33:01 +09:00
Tadashi G. Takaoka 1290399123 Merge "Fix Serbian Latin subtype handling" 2014-10-28 09:40:00 +00:00
Tadashi G. Takaoka fec5219974 Fix Serbian Latin subtype handling
This CL also adds unit tests for Hinglish and Serbian Latin.

Bug: 9687668
Bug: 17169632
Change-Id: Ib9aa1bcdf5b390a9d8c61f07165beacf850e2692
2014-10-28 18:36:16 +09:00
Keisuke Kuroyanagi dabc12974c Merge "Improve space substitution error correction." 2014-10-28 09:26:40 +00:00
Tadashi G. Takaoka dccf4f2a41 Clean up UserDictionaryCompatUtils
Change-Id: I1b22c82930af4f30db4237335850fb34b66f9299
2014-10-28 17:42:17 +09:00
Keisuke Kuroyanagi 8a809f3433 Improve space substitution error correction.
Bug: 17432052

[Category diff]
+1     262
-1      93
+2       2
-2      18
+3      18
-3       2
+4     111
-4     148
+5     295
-5     217
+6      51
-6     276
+7     139
-7     124

[Weighted category diff]
+1     276
-1     100
+2       4
-2      20
+3      20
-3       4
+4     118
-4     160
+5     309
-5     225
+6      52
-6     298
+7     163
-7     135

show diff for ./en_user_log_phones_2011_08.csv
+1     173
-1      28
+2       2
-2      17
+3      17
-3       2
+4      63
-4      82
+5     120
-5      51
+6      24
-6     220
+7      88
-7      87

Change-Id: I9d673acb0ff632828ae2e0ead56e76e3a20411c6
2014-10-28 17:11:14 +09:00
Baligh Uddin ef541aa91d am d0384c1d: (-s ours) am 34e8a1fe: (-s ours) am c04edfc3: (-s ours) Merge "Import translations. DO NOT MERGE" into lmp-dev
* commit 'd0384c1d3e641f4eda78a296a6beed6ee442e0fe':
2014-10-28 07:13:51 +00:00
Baligh Uddin 6474503b15 am edd51699: (-s ours) am b209b0af: (-s ours) am 815b31f9: (-s ours) Merge "Import translations. DO NOT MERGE" into lmp-dev
* commit 'edd51699eccbb684f296d754706e6f36dcab1f6f':
2014-10-28 07:13:50 +00:00
Baligh Uddin 867f2d494a am 9a3a3db1: (-s ours) am 79d81b58: (-s ours) am cf1c95ec: (-s ours) Merge "Import translations. DO NOT MERGE" into lmp-dev
* commit '9a3a3db19cc97307fbaa7a9e61204b359db026ad':
2014-10-28 07:13:49 +00:00
Baligh Uddin f5f7944e54 am 9d883f2e: (-s ours) am aa62905b: (-s ours) am be25b245: (-s ours) Import translations. DO NOT MERGE
* commit '9d883f2e84d3fc721a45774f5efdafb9b7286dca':
2014-10-28 07:13:47 +00:00
Jean Chalard 94cd03279f am ab5d4e11: am 199b7636: am ecea8551: Fix a bug with no suggestions flag
* commit 'ab5d4e11a0061ef36183c7e3889da84ac87320d2':
2014-10-28 07:13:46 +00:00
Tadashi G. Takaoka 82506d5e17 am 09b8cbc2: (-s ours) am 8ee7e33b: (-s ours) am ae3ad8eb: (DO NOT MERGE) Fix checking a11y status just before calling an a11y method
* commit '09b8cbc278bbcb3081b09e6651eef4f141fc874e':
2014-10-28 07:13:45 +00:00
Geoff Mendal b4207f2415 am 3e5dbefe: (-s ours) am 820f5aeb: (-s ours) am d218ba4b: (-s ours) Import translations. DO NOT MERGE
* commit '3e5dbefeb4b400e931dd1a8945fef8b945379f78':
2014-10-28 07:13:44 +00:00