Commit Graph

278 Commits (932aeb9d22a9e612dbeff7e45629bcdd6b99486c)

Author SHA1 Message Date
Satoshi Kataoka 87d06afc66 Refactor on the user history dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I1a2bfe96e18119d30a72290aa48746f77a021018
2013-07-31 16:48:55 +09:00
Satoshi Kataoka ffcbbaf127 Refactor on UserHistoryDictionary
Bug: 9429906
Change-Id: I576a91643bdaf5017cc826ac2e07a74a9a275d60
2013-07-26 13:00:19 +09:00
Ken Wakasa b03447e1af Move a couple classes to the utils package
Change-Id: Ia14a2011d79bad7cd02697b9254705f6e2099442
2013-07-19 10:46:46 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Jean Chalard 1562fc91f0 Make it easy to open several dictionaries from tests
Bug: 9127175
Change-Id: I3f1840ee73b364df26dfddb5acb10001e0f2cb61
2013-05-31 15:36:05 +09:00
Tadashi G. Takaoka 740d829092 Merge "Use localized toLowerString in AutoCorrection.isValidWord" 2013-05-24 20:00:38 +00:00
Tadashi G. Takaoka 94027c7201 Use Locale.ROOT for locale neutral operations
Bug: 9112465
Change-Id: I6cd63007287b5a1a57cfbabff35d53f66fc5620e
2013-05-24 12:07:30 -07:00
Tadashi G. Takaoka 618407ab7e Use localized toLowerString in AutoCorrection.isValidWord
Bug: 9112465
Change-Id: I63eb4115f393444560e80220d4c90f0f7101b934
2013-05-24 11:47:36 -07:00
Tadashi G. Takaoka ebe0544fc8 Remove redundant method AutoCorrection.isInTheDictionary
Change-Id: I0737fb0b68f411f4db06014f2d94804935808922
2013-05-24 11:40:03 -07:00
Jean Chalard 2dbb5957e3 Pass blockOffensiveWords as a parameter
Bug: 8773353
Change-Id: Ic1019742ce7ff6e4f7fff4d2729f8ab52d841488
2013-05-01 20:47:35 +09:00
Jean Chalard d91268ad9f Initialize dictionaries at onStartInputView
Bug: 8344402
Change-Id: I41b8440f0d72a66fde3f6feb0db8239c9bb10ea3
2013-04-18 14:48:42 +09:00
Jean Chalard a5a2f3e3c7 Remove gesture suggestions with an INT_MIN score
Bug: 7980115
Change-Id: I8de31068992aec712eaad132857d9dc61f28e30a
2013-04-15 20:55:49 +09:00
Jean Chalard d40f3f6bc1 Reject a previously user-refused suggestion.
If the user gestures a word, then hits backspace in
disapproval, and gestures about the same thing again,
make sure that we don't suggest the same thing again.

Bug: 7549311
Change-Id: I793bc4df7c3841fa8f2f4146707c26e873f374c1
2013-04-15 16:36:44 +09:00
Jean Chalard 99b93d17d5 Fix a bug where autocorrection status would be wrong.
Change-Id: Ic220129dc59f585164dbf63591cd1c96de17fe6f
2013-04-10 17:49:19 +09:00
Jean Chalard 01a4ebcd88 Add a way to know externally if we're installing a new dict
That helps tests know when to wait and when to declare the
dictionary actually not usable.

Bug: 7925814
Change-Id: Ic963c1206c43e3cde39ac4214a0d601f4fc6c03b
2013-01-31 09:04:55 +09:00
Tadashi G. Takaoka 8aa9963a89 Fix Apache license comment
Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
2013-01-21 22:23:37 +09:00
Ken Wakasa f6870cc82d Remove BinaryDictionary.MAX_PREDICTION and MAX_SPACES, and rename MAX_WORDS to MAX_RESULTS
Change-Id: Iab2a422b367e7521f346481c7fe5e2575f2e9de3
2013-01-11 20:47:42 +09:00
Tadashi G. Takaoka 240871ecaf Move code point constants from Keyboard to Constants class
Change-Id: Iee01d4d2b916d0b584531104ac865ae6e6370a3d
2012-10-29 16:04:20 +09:00
Tadashi G. Takaoka 7f77aed507 Merge "Replace useless CharSequence to String" 2012-10-22 14:27:35 -07:00
Tadashi G. Takaoka 15f6d4ae34 Add @UsedForTesting and @ExternallyReferenced annotations
Bug: 7268357
Change-Id: I0b7e0c19f04af9ae30874d0a4c26ad81bc80be8c
2012-10-22 11:18:43 -07:00
Tadashi G. Takaoka bc464e2952 Replace useless CharSequence to String
Change-Id: Idc478f901185ee1b4912acc82d0cbc54fee4e991
2012-10-22 11:03:28 -07:00
Tadashi G. Takaoka a28a05e971 Cleanup: Make some classes as final
Change-Id: I6009b3c1950ba32b7f1e205a3db2307fe0cd688e
2012-09-27 19:03:30 +09:00
Satoshi Kataoka 87cecf7db6 Log for geometric input
Change-Id: Ia0f0e38086b0be70cf2d04fc6fae48358f16e74f
2012-09-19 17:45:27 +09:00
Tadashi G. Takaoka f035649cb6 Asynchronously look up dictionary for gesture input
Bug: 7149248
Change-Id: Icba2db73508b89a85828ae9e196ab618e5e6c280
2012-09-14 02:12:11 -07:00
Jean Chalard 8c06a468e0 Stop auto-correcting non-whitelisted one-char strings
Bug: 7134017
Change-Id: I75cf474dedafda3e1683dd8f7740c13aafdcf5ab
2012-09-11 17:24:08 +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 1eba97d92f Treat all caps for gesture input.
Bug: 6950087
Change-Id: I9f2271780600572c9befa96c7ad98494c554dd2b
2012-08-21 20:29:53 +09:00
Jean Chalard adbd9ae105 Tell the shift mode to the word composer.
Bug: 6950087
Change-Id: Ifab9d6d075af398c6468d081216488712f8a53fb
2012-08-21 20:27:42 +09:00
Jean Chalard 46fc768e54 Remove the whitelist dictionary.
The functionality now lives in the binary dictionary.

This finalizes work on
Bug: 6906525

Change-Id: Id106d871e8afdf9afa886d2a30bea87ff89f2d24
2012-08-17 15:13:10 +09:00
Jean Chalard 3e43e6998e Remove access to the whitelist class.
...which becomes useless. It will be entirely removed in an
upcoming change.

Change-Id: I2f1d27f1eceda79454b01f21e057b98f2953131a
2012-08-17 13:01:25 +09:00
Satoshi Kataoka 3979f060f0 Step 28-A Introduce the session Id to getSuggestion
Change-Id: I39d9bf1a7c272eb16d6ed4698f52457579b40f10
2012-08-15 15:44:45 +09:00
Jean Chalard 7b258e512d Accept whitelisted entries from any source.
...not only the WhitelistDictionary.

Bug: 6906525
Change-Id: I7f181eb6936ec17bbccdc4e736fd09292af24e9c
2012-08-10 19:02:19 +09:00
Jean Chalard caed149b67 Optimization & Simplification
It's useless to do the whitelist lookup twice. Also, putting
this test out of this method will allow whitelist entries to
come from other sources.

Bug: 6906525
Change-Id: I4afe678cae6556d16642d155ce770fbf4e61ad49
2012-08-10 19:02:15 +09:00
Tadashi G. Takaoka 79eefda0d3 Add SuggestInitializationListener to BinaryDictionary.resetMainDict()
Change-Id: I4c01f172ddb2ca60fa6e604384610c90b76e5457
2012-08-08 15:55:26 +09:00
Jean Chalard e7c471a52f Don't auto-correct when there are digits.
Bug: 6667462
Change-Id: I796655f57c71c9f50ae6e38dd08b71df3998dbcf
2012-07-28 00:15:54 +09:00
Tadashi G. Takaoka 369e54cc33 Add Suggest initialization finish listener
Bug: 6860204
Change-Id: I1e4c03c99415cd9bdea5a8556ff4093c33f0f508
2012-07-25 09:55:22 +09:00
Tom Ouyang eea34598bf Merging minimal gesture input
Change-Id: Iee6ae48bb6309c2867b5d2e344fe7d86dfabd654
2012-07-13 19:32:18 +09:00
Jean Chalard 1343d27de3 Readability improvement (A117)
Change-Id: I6f8bb05a23edb40a079da60b7136170ec9043282
2012-07-12 15:58:16 +09:00
Jean Chalard 24a63b5537 Simplification (A116)
Change-Id: I97cf92a7b0dabc251dd241b24978ea00d1e5f047
2012-07-12 15:58:16 +09:00
Jean Chalard f5b55cb70c Compute variables closer to where they are used (A115)
This improves locality, it's better for readability/performance

Change-Id: Ibb1efaf86e362dd2c9398722d0da2144df96b333
2012-07-12 15:58:09 +09:00
Jean Chalard 2549b4978e Cleanup (A114)
Change-Id: I7e24e0aeae7c004cae310ae9f46cf90dac2d4d14
2012-07-12 15:09:57 +09:00
Jean Chalard 02f1c1534c Cleanup (A113)
If not composing a word, then consideredWord is always the empty
string.
Hence, it's never whitelisted, but it's also always "NotAWord",
so isWhitelistedOrNotAWord returns always true, so
allowsToBeAutoCorrected is always true. Which means that
isPrediction implies allowsToBeAutoCorrected == true.
Thus, !isPrediction && !allowsToBeAutoCorrected is strictly
equivalent to !allowsToBeAutocorrected.

Change-Id: I4ad7a7c3447851c539646d97cf55ff065e6ee115
2012-07-12 15:09:48 +09:00
Jean Chalard ae13061245 Simplification (A112)
If we are not composing a word, that isFirstCharCapitalized
and isAllUpperCase are guaranteed to return false.

Change-Id: Ic4a0be9574acf4653c729a9594f963f5bcf0c757
2012-07-12 14:30:33 +09:00
Jean Chalard d8afa2fbe1 Remove the ultimate code duplication (A111)
Change-Id: I7c76613df8f148feb02765f187db3ca6dc577977
2012-07-12 14:30:33 +09:00
Jean Chalard 3b57631b60 Resolve a TODO: bury some implementation detail in native (A110)
The fact that prediction does not accept a null argument is an
implementation detail, it should not be visible to Java code.

Change-Id: I3a156b323b6db9353de898d33f3f7c81751cecb1
2012-07-12 14:30:30 +09:00
Tadashi G. Takaoka d82dcdc924 Add batch input dictionary lookup
Change-Id: I4da3c976838e8eb56c9ec80aafaaf54d759b7981
2012-07-10 20:01:28 +09:00
Jean Chalard 5e573a1f0a Remove a useless parameter (A91A)
Change-Id: I1d1758048649ef337875a5141d825569af7ad38c
2012-07-10 19:31:36 +09:00
Jean Chalard 82009901ea Add a consolidated method to the Dictionary interface (A85)
Change-Id: I5d79021e69cc738e3013e31764ab0a59e15decdf
2012-07-10 18:57:12 +09:00
Jean Chalard c677b0071d Enhance behavior consistency (A84)
Use the word the same way for suggestion and prediction. It makes
little logical sense that the trailing single quotes be removed
for suggestion lookup but not for prediction lookup.

Change-Id: I0de4b5f7c5b4c1b4ba1817ff9653d7c03967146d
2012-07-10 18:05:20 +09:00
Jean Chalard 1c6693a219 Refactoring for whitelist (A83)
Avoid special casing the whitelist dictionary by having it implement
the interface it pretends it implements

Change-Id: I8b873cb0f3fe13cefd32c8cb756a25c8ae16a2b4
2012-07-10 18:05:20 +09:00