Commit Graph

147 Commits (5475e92b3fb33dd7d6b021ddcbe1ca593112b5c8)

Author SHA1 Message Date
Jean Chalard 5475e92b3f Cleanup, part 3 (C3)
Change-Id: Ib0be8dc26b6fa366a3dabeea940d466602073244
2012-06-16 10:46:18 +09:00
Jean Chalard 67fd0c240d Remove deprecated classes.
Should we maybe rename back *BinaryDict* to *Dict* in another
change for simplicity?

Change-Id: I8f7dcb78b9bdf1a13ce403a997fbb8619f2b453b
2012-06-08 17:12:15 +09:00
Jean Chalard 1b06b59e28 Fix a bug with a concurrent modification of a map.
Bug: 6538848
Change-Id: I1a8422356d9909213e53cfdc8c5bcc12eb48f19d
2012-05-24 19:38:04 +09:00
Tadashi G. Takaoka b5db270962 Remove unused private method Suggest.searchBigramSuggestion
Change-Id: I077c4c019676fefb8eac6042bd7db1b7ab33ca03
2012-05-23 15:32:48 +09:00
satok 0028ed3627 Use "float" instead of "double"
Change-Id: I93ed4d88ede4058f081dd8d634b00dfff4e96d07
2012-05-16 20:45:05 +09:00
satok f837b57bf5 Merge "Reorder suggestions result according to auto correction threshold" into jb-dev 2012-05-16 04:13:08 -07:00
satok db1939dbaa Reorder suggestions result according to auto correction threshold
Bug: 5413904
Change-Id: I3aa3a8109ba45d2129b58d8242866fd3dd3473cb
2012-05-16 19:58:48 +09:00
Jean Chalard ed49e4d82e Merge "Stop meaningless bigram computations" into jb-dev 2012-05-16 01:43:39 -07:00
Jean Chalard f0e12a9699 Don't auto-correct when there is no main dictionary.
Bug: 6502485
Change-Id: I5803b0db8552867110587a1140fc03fc2e0eccef
2012-05-16 16:09:14 +09:00
Jean Chalard a86c0f1ea4 Stop meaningless bigram computations
Bug: 6313806
Change-Id: Idf765b40812a43de13aa166ed0b44c7b5f7cc218
2012-05-15 16:34:17 +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
Jean Chalard 4b5b46bb66 Don't autocorrect after suggestion resuming
Bug: 6105732
Change-Id: I92e7a9c6d6eb648f747c3b396d7993479fd8478a
2012-05-01 17:06:29 +09:00
Tom Ouyang 0806bb01d9 Binary bigram lookup checks both uppercase and lowercase when previous word is uppercase.
Bug: 6363029
Change-Id: I71a1ed5b88f54fcc15bfaf89d3645b8f17ebb821
2012-04-22 17:48:00 -07:00
Jean Chalard ac27e4544b Pass the previous word to getSuggestions
This is a preparative change to bug#6313806

Change-Id: I1be9ec49b21005c1f45ce459fa93712bc74ef3f0
2012-04-17 12:43:53 +09:00
Tom Ouyang 18222f8c86 Add a new binary contacts dictionary based on ExpandableBinaryDictionary and use locale for bigrams.
Bug: 6188977
Change-Id: I753422eed1effaeb5fd01124cf1ddd1e31ee9d60
2012-04-13 17:54:39 -07:00
Jean Chalard e6269759d6 Read the dictionary resource in a more sensical place.
We don't need to pass this down all the way from LatinIME any more.
It fetched be done exactly where it needs to be.

Change-Id: I9f277f9c4f9de70ae755a1334d86c67bbb24c988
2012-04-11 21:03:21 +09:00
Jean Chalard 338d3ec725 Replace the flags in getSuggestions with a boolean.
Change-Id: I0ec44df1979cb1dc21017ea290d2151a2af0e7cd

Conflicts:

	java/src/com/android/inputmethod/latin/Suggest.java
2012-04-06 19:34:48 +09:00
Jean Chalard 24aee9100e Change the flags to a boolean in constructors.
Change-Id: I9939204f3b16346aaebd4d726315ba9c4faf910a
2012-04-06 19:33:01 +09:00
satok 7540fd009d Merge "Fix the locale of the flags in BinaryDicitonary for tests" 2012-04-05 22:33:17 -07:00
Ken Wakasa aa300bb73a Don't draw red underline for manually picked words that came from bigram prediction
Change-Id: I544680c8b4b1baff71bd08168630a34e803c40b9
2012-04-05 20:50:27 +09:00
satok ae234abd21 Fix the locale of the flags in BinaryDicitonary for tests
Bug: 6129372
Change-Id: I5611f88b10c44261b6145c9dc8615b80e4341e77
2012-04-05 12:48:30 +09:00
satok 7e518d8b83 Combine candidate words and scores
Bug: 5240798
Change-Id: Ie56c1c2cfd7f365e771fee88c1ed15012448feed
2012-04-02 18:39:24 +09:00
Jean Chalard 9ffb94fa13 Rename the user history dictionary.
UserBigramDictionary -> UserHistoryDictionary.

Also update all methods, strings and comments, except those needed
for backward compatibility (which only include the name of the
database file).

Change-Id: I0bccea29880dc566b90100575b83baaa947b03ae
2012-03-19 12:03:51 +09:00
Ken Wakasa 660776e09b Small performance improvement by removing interface accesses.
Change-Id: I6d91f3b086470b79306dbe2874db9748b9e0eb5f
2012-03-17 01:53:51 +09:00
Jean Chalard 3187ba5dfe Remove a now-useless flag.
This has been moved to the SuggestedWords object and is now
represented by a single flag instead of a flag in each suggestion.

Change-Id: I6e9a7cff5a7701de7e61b4de13baac25c9a87b1b
2012-03-15 14:21:02 +09:00
Jean Chalard 03a3517075 Add info for obsolete suggestions in SuggestedWords
Change-Id: I9684c7b08244b34853ce8a99b6e9d885389f6687
2012-03-15 13:12:08 +09:00
Jean Chalard ca3e7cbdf4 Move a computation closer to where it's used.
Change-Id: I5aee4c36ceaacbb1dbfc47c011f1e4aec4b9dca6
2012-03-15 12:23:16 +09:00
Jean Chalard 271e5b6cb7 Some readability improvement
In-place replacements of visibly identical things.

Change-Id: I02b51bd7f63597e3428f0650b239e9a39ef5a7c7
2012-03-14 18:50:08 +09:00
Jean Chalard 0d0f182959 Cut out a private method to make things more readable
Change-Id: I791700890338e023bd86b8794dbc90379b91dc7d
2012-03-14 18:43:32 +09:00
Jean Chalard ac5e463402 Minor optimization
We know the size in advance, this may save a few allocations

Change-Id: I2fb9a725f34ba2da4f34ed335652f10447d5d166
2012-03-14 18:35:07 +09:00
Jean Chalard def4551c2a Some code simplification
Just write the same thing in a more succint manner

Change-Id: I08a2c5edd52a3502914541061fd5b6ee7a92ebc4
2012-03-14 18:33:57 +09:00
Jean Chalard 4a08b2f0e4 Cleanup & optimization
Renaming some variables, and obvious optimizations.

Change-Id: Ib716748e9f3d602cf276dcd4e73f3bcfb819585e
2012-03-14 18:29:06 +09:00
Jean Chalard f985efe39c Remove a useless parameter
Change-Id: I03005240238fb004c20b2df0d836796e2e8b307f
2012-03-14 18:12:12 +09:00
Jean Chalard bdf6d1b18b Remove a useless method
Change-Id: I208dd2e725e37c2fb3cd51fe48194679e5912f6b
2012-03-14 15:59:04 +09:00
Jean Chalard 7d55c891af Make the Builder private
Change-Id: I2184084f4b7729c4324f8291d548bd4c4c2872a1
2012-03-14 15:42:14 +09:00
Jean Chalard 5b0643f50d Re-sequence the last calls to build()
Change-Id: If77ee5aa9483d3ca03c52812f31665dee6468e99
2012-03-14 14:19:24 +09:00
Jean Chalard 88bf1ba526 Move up the static methods of the Builder
Change-Id: Ic3e07b745b7b24cae0f772ea49e0de615b44caf9
2012-03-14 13:10:22 +09:00
Jean Chalard e3afb7d192 Make the Builder fully immutable at last
Change-Id: Ie399ca7a9e76ccab44a92bc378d11f92392fed2c
2012-03-13 20:33:13 +09:00
Jean Chalard 6ffb5018c1 Straighten out the last bastion of the Builder
...and go for the kill

Change-Id: I5ad57211b250d2578ca22a5dae93344d52f9da80
2012-03-13 20:26:47 +09:00
Jean Chalard 2e2519ee91 Make still more members of the Builder final.
Change-Id: Ic455f97247da5e40d4939555ab639ecffef36e2d
2012-03-13 20:05:00 +09:00
Jean Chalard bd4ba23d2b Some code reorganization.
Use the same local variable inside both branches of an if.

Change-Id: I61f7d506d984f3723ec90604416d1875dd97cd8c
2012-03-13 19:54:56 +09:00
Jean Chalard b5eeb724fc Make some more Builder attributes final.
Change-Id: I3132b7fe4ee97c566736bfc21c3783cfc79fc7ff
2012-03-13 19:53:38 +09:00
Jean Chalard c60fea852d Make the suggested word list final in Builder.
Change-Id: I2ddfab00dc8c141fc989a051f16eb2b3571b7e86
2012-03-13 19:37:17 +09:00
Jean Chalard 08adb09e14 Remove unused stuff.
Remove 2 methods that were left only for tests to compile in
another project, but are not used any more now that the tests
have been updated.
Also remove an attribute that is never read.

Change-Id: Ic9ba1f52a465199c82c923d77ed7450460e8a4b9
2012-03-13 19:37:16 +09:00
Jean Chalard 674ffcdf93 Make an add into a set.
This method now only sets words, so it should be named set.
The functionality is identical since there are no more places
where the list is reused.
This will also allow to make the list final in an upcoming change.

Change-Id: I25b0c7d7f13c3fa5d89806f01f48f1026769603f
2012-03-13 19:07:42 +09:00
Jean Chalard d6662ecd30 Cleanup
Remove an unused method, make others static, fix a formatting
issue

Change-Id: I40cb0b5e01a6f8e2f7b953bd9aad3168dfee71d1
2012-03-13 18:34:19 +09:00
Jean Chalard adf218eed5 Kill the StringBuilderPool.
The intention may have been nice originally but these end up
being copied anyway :/
Let's remove them now, and in a later change, just keep
references to the created objects.

Change-Id: Ifba8357c20384f9eb40cd916665ed1fc6dc8cab1
2012-03-13 17:59:49 +09:00
Jean Chalard d0d4074392 Remove a useless parameter.
Change-Id: I7625bf17158c207ad7e8cd496bef825704173c4c
2012-03-13 15:34:06 +09:00
Jean Chalard c3c4ed91cf Consolidate words into SuggestedWordInfo
We can't get rid of SuggestedWordInfo because it conveys
the information about whether a suggestion is outdated or
not. It is always created anyway. So it makes sense not
to have separate lists and to just keep everything in the
SuggestedWordInfo object.

Change-Id: Idd79dc267d97633901d3d2869da457736963e178
2012-03-12 18:58:20 +09:00
Jean Chalard 682c2d53cc Make access to the safety net calculation easier
Change-Id: If33897b38af94ae81b05e5ef140a542724b9f34a
2012-03-09 21:44:40 +09:00