Commit Graph

17 Commits (2be51f4fd0c5cd70c7a2757558ffe45e703700cf)

Author SHA1 Message Date
Jean Chalard 24aee9100e Change the flags to a boolean in constructors.
Change-Id: I9939204f3b16346aaebd4d726315ba9c4faf910a
2012-04-06 19:33:01 +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 43ebd8a035 Fix the locale of flags in BinaryDictionary
Bug: 6129372
Change-Id: I4958c2aabf651d7e26648a29b75fcc6c77813451
2012-04-04 21:50:42 +09:00
Tadashi G. Takaoka 16c6f35570 Add RunInLocale class to guard locale switching
Bug: 6128216
Change-Id: I8d9c75c773c3de886183b291ada7a3836295839b
2012-04-03 17:43:45 +09:00
Ken Wakasa 660776e09b Small performance improvement by removing interface accesses.
Change-Id: I6d91f3b086470b79306dbe2874db9748b9e0eb5f
2012-03-17 01:53:51 +09:00
Tadashi G. Takaoka cc8c8b99bd Split Utils class to StringUtils, SubtypeUtils, and JniUtils
Change-Id: I09e91675fe7d573dad8c933ad513b21d7e409144
2012-03-08 20:30:38 +09:00
Jean Chalard 673cebf9e9 Make use of the FULL_EDIT_DISTANCE flag.
In effect, this stops the spell checker from suggesting overly
long words.
More precisely, it takes advantage of the new facility that
takes into account the whole length of the dictionary word when
computing scores, so words much longer than the input word will
see their score demoted accordingly.

Bug: 5384578
Change-Id: I326cd7c87c3080e7fa8729f78517f8ba13672a9b
2011-09-30 16:00:07 +09:00
Jean Chalard ef35cb631c Move locale-related utility methods to LocaleUtils.
Change-Id: I7e9e6e5bc4486d8618d0213b112308c3d305c15e
2011-08-29 12:29:35 +09:00
Jean Chalard 0ee3b69483 Fix an excessive fallback problem.
LatinIME has several fallbacks to ensure a dictionary is used.
However, it should now be possible to deactivate the main dictionary
through the dictionary pack settings. In this case, Latin IME should
not fallback to the built-in dictionary.

Change-Id: Ibd992ad89793169f04a968b40781fce819b87b6f
2011-08-23 17:55:46 +09:00
Jean Chalard 150bad6fd4 Have the spell checker use the User dictionary.
Bug: 5175868
Change-Id: I165eee4c865caa5ee1daf3e0b1acde8788b996ef
2011-08-19 17:19:49 +09:00
Jean Chalard e150ef9856 Set the locale for opening an asset
This is necessary because we don't know any more whether the
locale of the process is the expected one when the dictionary
is loaded asynchronously.

Bug: 5023141
Change-Id: Ia9e4741f3b4a04a9f085f5b65ec122471b0c2dff
2011-07-21 19:14:16 +09:00
Jean Chalard 7e19a64c86 Fallback to the included dict if the passed one is invalid
If all dictionaries returned by the dictionary pack are invalid,
then fallback to the dictionary included in the resources for this
locale.

Bug: 5052486
Change-Id: Id875194ca56a74b2ed6f5b0b4fdd55475f6842c8
2011-07-20 19:53:47 +09:00
Jean Chalard 44861474fb Add a number of NULL pointer guards.
None of these are expected to actually be null, but those are
included for peace of mind and foolproofing against future
code changes.

Bug: 4580040
Change-Id: Ib112b3e5db5f177aaf61767164b7e78d711f90a0
2011-07-19 18:19:23 +09:00
satok f733074aae Fix the available input locales and moved Recorrection
Bug: 4409091

Change-Id: I6efd23ebb9528bf1bd35320057a0ea264c187451
2011-05-12 20:26:24 +09:00
Jean Chalard d8f52a4f18 Improve the architecture to support multiple dictionaries.
This change enables the interface to get multiple dictionaries from a
dictionary pack. It only implements it to the end in the case of the
proprietary method, as the open method needs still some working out,
and the "inside the package" method does not need it.

This change goes together with Iaa95bf36, and breaks the build
without it.

Bug: 1752028

Change-Id: I3ccfd696e8ef083ef9c074e1c3e4bb0bf2fcfd23
2011-04-28 16:16:46 +09:00
Jean Chalard 19bfef6cb0 Use the new Utils.setSystemLocale method in the new code.
The change list that introduced this code was created at the same
time as the one that introduced the Utils.setSystemLocale method
and didn't use it yet. Fix this.

Change-Id: Ifdd2ad9f7dbb7f300bc255bc2e035ae893a9d410
2011-04-27 17:10:18 +09:00
Jean Chalard 4250eb27f5 Create a dictionary collection and a dictionary factory.
The dictionary collection is a class complying to the Dictionary
interface that acts as a front end to a collection of arbitrarily many
dictionaries of any type.
The dictionary factory is a helper class for creating various
dictionaries and get some meta information about them.

At the same time, this change makes the BinaryDictionary class
not a singleton any more.

This also needs I9afe61a9 to not break the build.

Change-Id: I61fdcc4867fcda18342807bf1865e6e46979e5d5
2011-04-27 17:06:20 +09:00