Commit Graph

112 Commits (7f58115a861d1c7a926b8f2eb8612c02b388456a)

Author SHA1 Message Date
Jean Chalard b740886aeb [CS4] Remove useless tests and processing
Since we have a de-duped and transformed collection, we
can just read from it instead of computing it separately.

Bug: 13238601
Change-Id: I0aa4b0d91d3b350f9449e13658bfb587fc538764
2014-06-26 18:26:08 +09:00
Jean Chalard c82257ba6e [CS3.5] Small correction
Bug: 13238601
Change-Id: I7bd82a4678d8bf88f16bf271f20be8d37f9b97d7
2014-06-24 18:26:51 +09:00
Jean Chalard fdebf4005f [CS2] Refactor a bit removeDups
This way is more understandable, and also supporting an
external string is helping for future refactorings

Bug: 13238601
Change-Id: I4ebeed46eb0b35011164946af71ac257c6449ddb
2014-06-23 22:58:46 +09:00
Keisuke Kuroyanagi 7d57fc248b Clean up for Iba6eeb7981634e7ddb.
Bug: 15298959
Change-Id: I6921db77b7d231ad3aad99d4c380ae2ed6bbf540
2014-05-29 13:16:24 +09:00
Keisuke Kuroyanagi 4bffac6db9 Stop directly checking SuggestedWordInfo.mKind
Bug: 15298959

Change-Id: Iba6eeb7981634e7ddb896404978b30f6efd6e72f
2014-05-28 20:35:45 +09:00
Tadashi G. Takaoka 14ea11fcde Add TODO comment about SuggestedWordInfo's kind and flags
This CL must be checked in together with I6fd87e1eec.

Change-Id: I4b24157f3e3ce6327579d37122a34d7a30069885
2014-05-28 11:51:05 +09:00
Keisuke Kuroyanagi a6278eb9c1 Use whether it's exact match to detect distracters.
Bug: 13142176
Change-Id: Id5b7286d28897931f7bfe571be45d46ffeef4adf
2014-05-26 21:56:20 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Jean Chalard 32c6d4caea [IL111] Remove a member.
...and improve encapsulation and readability.

Bug: 8636060
Change-Id: I36407630b307df0721ea7fdb7e7a22cdf2b018b3
2014-03-04 14:31:47 +09:00
Jean Chalard 0c34ee20a8 [QRP5] Fix boldness for predictions, and small refactoring
This is more correct. When predictions, the typed word should
always be null unless explicitly passed. The text color should be
that of a valid typed word only if it's actually the typed word.

Bug: 13170509
Change-Id: I769ae100e112c37c6f02064fe9ef2f81372ca9e5
2014-02-25 19:44:57 +09:00
Tadashi G. Takaoka a273319c59 Add PunctuationSuggestions class
This change must be checked in together with I366c477516.

Bug: 12640318
Change-Id: I8d3864b9d9649c9e3306e82b01a6327b11281b1f
2014-02-14 14:13:39 +09:00
Jean Chalard a49f61f8a7 Conditionally store the raw suggestions.
Bug: 12913520
Change-Id: Ie15f97d90c142c51089280252b35b5ad1d226e19
2014-02-06 16:14:41 +09:00
Jean Chalard 1d2e4f9dcc [IL103] Save the typed word separately in SuggestedWords.
This helps managing the cases where the typed word is not
in the suggestions. This happens during recorrection.

Bug: 8636060
Change-Id: I6784feb793cae96272a7f1d123a0e3bbb8f03143
2014-01-29 12:22:21 +09:00
Jean Chalard 491a6a6f23 [IL100] Pull up a check
Bug: 8636060
Change-Id: I344ed59f5f55b412880fc6dc70205eecb1e79961
2014-01-28 17:18:01 +09:00
Jean Chalard a1ed211c4e [IL76] Remove a SuggestionStripView dependency
This constant is better located in SuggestedWords.
Or it could be in Constants, that would be fine too.

Bug: 8636060
Change-Id: I3e721bb1e2559f028dce8929eceadfe0478c5924
2014-01-23 16:25:48 +09:00
Jean Chalard 30a72da42c [IL37] Small simplification
Bug: 8636060
Change-Id: I08a6c04986a0bd86ce4c232893e804766ebeebb9
2013-12-26 13:51:09 +09:00
Jean Chalard ac76463306 Add a sequence number to SuggestedWords.
This allows testing for suggestion freshness in an asynchronous
suggestions world.

Bug: 11301597
Change-Id: Ic76cd17568598d8534aec81e037f9e37f52eb6b4
2013-10-22 12:52:58 +09:00
Jean Chalard b1e98c2f4f [AC8] Restrict the suggestion strip to the correct part
...for phrase gesture.

Bug: 9059617
Change-Id: Ic5c0616f28af4ba45ca72a5721d1926029adc1c5
2013-09-17 18:43:12 +09:00
Jean Chalard 24aad5a4d5 [AC4] Add native methods necessary for auto-commit
Bug: 9059617
Change-Id: I7a47b0675446fc4f39628c60d16de9aea90d1b4d
2013-09-13 20:15:15 +09:00
Jean Chalard 66a870cb53 [AC3] Start calling the methods for auto-commit.
Bug: 9059617
Change-Id: I190a4baf2fa831b70e00e129b5dfaa8c9c32b3a0
2013-08-20 19:26:11 +09:00
Jean Chalard e8ef095670 [AC2] Reference a dict rather than a string in suggestion infos
Bug: 9059617
Change-Id: Ic17bc0fd5d812268fd37d7fd35b4e9ebfb95fa5e
2013-08-20 19:18:09 +09:00
Jean Chalard ef1e363016 [AC1] Add a memory of where to cut the first word.
Bug: 9059617
Change-Id: I931b6d1eb49f9f7dd7d5b18956e35751d1b2b631
2013-08-20 18:43:19 +09:00
Tadashi G. Takaoka 4be6198cb7 Reorganize Utils class
Change-Id: I7294d1547def5dcfcae9d1d53b277cb3cc9f2d18
2013-07-05 19:24:40 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Tadashi G. Takaoka a0c3e02d71 Refactor SuggestionStripLayoutHelper a bit
Bug: 9059710
Change-Id: Ief12029bad75d4dc78090ab97555aece01b873de
2013-05-31 18:14:47 +09:00
Satoshi Kataoka 3d97b95b90 Implement KIND_OOV_CORRECTION
Bug: 9127749
Change-Id: I96db15a3138e6b522c4c6ad16cc7faad577d3772
2013-05-27 18:53:43 -07:00
Jean Chalard 99e998286d [ZF1] Check profanity in Java rather than in native
Bug: 7226877
Change-Id: Ib6c32bfee9977c27dbf7e1e590b2b00d9ceb7301
2013-04-25 20:29:11 +09:00
Jean Chalard 0e9ee4d3bf If there are no suggestion span, recompute suggestions.
Bug: 8084810
Change-Id: I1743c09c43ca6835bb2f607684b037bf17d36335
2013-04-15 19:33:23 +09:00
Jean Chalard 6a114fa700 Restart suggestions when the cursor moves.
This uses the old suggestions. It does not try to recompute
new suggestions if there are no old suggestions yet: this is
coming in a later change.
If there are no suggestions, this shows the word itself
as a suggestion.

Bug: 8084810
Change-Id: I4c2e25df0ff3673be1825f57a0c19a9d23d47a48
2013-04-12 20:49:03 +09:00
Tadashi G. Takaoka 8aa9963a89 Fix Apache license comment
Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
2013-01-21 22:23:37 +09:00
Kurt Partridge b5ac8ef586 Consolidate SuggestedWords.getWordInfo and .getInfo
Change-Id: I959cf049f550b7be3ec002281ca7457e566b0214
2013-01-17 07:50:15 -08:00
Tadashi G. Takaoka bc464e2952 Replace useless CharSequence to String
Change-Id: Idc478f901185ee1b4912acc82d0cbc54fee4e991
2012-10-22 11:03:28 -07:00
Tadashi G. Takaoka c6ff7c42d9 Add SuggestedWords.isEmpty() method
Change-Id: I0fcb104a6a81aee4b99f5ee848eba7495630dc7d
2012-10-03 15:09:10 +09:00
Tadashi G. Takaoka a28a05e971 Cleanup: Make some classes as final
Change-Id: I6009b3c1950ba32b7f1e205a3db2307fe0cd688e
2012-09-27 19:03:30 +09:00
Ken Wakasa f2789819bd Cosmetic fixes and a bug fix in UnigramDictionary::testCharGroupForContinuedLikeness().
This change has actually been extracted from a change work in progress I4fe423834b8131fb122251892c98228a6e08ba25

Change-Id: I52568fa09da2ea22be7f8bfe9676b7cd73c31fa4
2012-09-04 14:23:37 +09:00
Tadashi G. Takaoka 5f282ea9e4 Add CollectionUtils class to create generic collection easily
Change-Id: I6b4de9187e122298e5e9cd8ddc9070d062df6a89
2012-08-22 10:21:38 +09:00
Jean Chalard c7387a4fd0 Add values for suggestion types (A120)
Also, use it in getBigrams.

Change-Id: Ia0be9b57d1b7effcd8a936e01e957d1195b39c68
2012-07-12 19:21:44 +09:00
Tadashi G. Takaoka f3897fb54e Get rid of redundant CharSequence member from SuggestedWordInfo
Change-Id: Ie8792f4f5d3593c25c992fc72cf219daeaa70beb
2012-07-04 16:04:59 +09:00
Jean Chalard cd288620ea Make the autocorrection scheme more straightforward (A37)
Change-Id: I4833ca7e057b8c1f1f22390673cbca0d2433b1bd
2012-07-02 15:45:34 +09:00
Jean Chalard aba432bf8d Remove a duplicate method (A36)
Bug: 6705473
Change-Id: Ib6260034b09739b60071e90a018b2dc6be3815d7
2012-07-02 12:12:16 +09:00
Jean Chalard 84074cf503 Update log and make a variable private (A35).
Change-Id: Ib4a8f41dc5941bce46402e1a41a6c21dccb0601f
2012-07-02 12:11:27 +09:00
Jean Chalard 1b2e2d893d Add a more synthetic variable (A33)
The goal here is to disambiguate TypedWordValid and
HasAutoCorrectionCandidate. Ultimately, HasAutoCorrectionCandidate
will disappear.

Bug: 6705473
Change-Id: I1acbd0a5efc7f4bf7b0bdb12839fe3d84e9d1dda
2012-06-29 17:00:57 +09:00
Jean Chalard 0a63111821 Remove a useless parameter (A29)
Change-Id: I52625e707abf61da9b95e542f0814c66b532f483
2012-06-29 17:00:56 +09:00
Jean Chalard 4f444410f2 Remove a useless variable (A28)
Change-Id: I1058123d233540fb72a94028987a43740224f635
2012-06-29 17:00:56 +09:00
Jean Chalard 24eec0fa68 Remember the source dictionary for each suggestion.
Change-Id: I3c63372bd5572a479a67eaecfe8c8ea1cabc70d9
2012-06-27 18:17:28 +09:00
Ken Wakasa e55c23e4b0 Small cleanups
Change-Id: Ic1a198ab1b4f0323fde9e4245729fd0e6011b914
2012-06-27 16:54:37 +09:00
Jean Chalard 7c406ed655 Tentatively remove a dependency on WordCallback (A3)
Bug: 6252660
Bug: 6166228
Bug: 2704000
Bug: 6225530
Change-Id: Id5a59eaec2aeefa0ba4524420a8e035d383f6545
2012-06-21 10:03:44 +09:00
Jean Chalard e7d2ee3ec3 Add a kind to the suggestion for bookkeeping (A1)
This will help for debug as well as serve as groundwork for
Bug: 6252660
Bug: 6166228
Bug: 2704000
Bug: 6225530

Change-Id: I74d0a7b943fb22c514ad79dc064d69ddf336d3ef
2012-06-16 03:10:36 +09:00
satok 0142b997bf Do not set "SuggestionSpan"s for suggestions from the next word predicition
Bug: 6294817
Change-Id: I5010eafa5ba7e947743706adf7e722f4f0cfb415
2012-05-15 12:08:31 +09:00
satok f088204a90 Fix NPE in SuggestedWords
Bug: 6279966
Change-Id: Ia94a78d79cc51014126d18612aabdc7ce51487a4
2012-04-04 11:09:13 +09:00