Commit Graph

45 Commits (2811592934a51d78e726a27de45c9d20826dfea4)

Author SHA1 Message Date
Tadashi G. Takaoka 5f00fe09e9 Fix some compiler warnings
This CL fixes the following compiler warnings.

- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations

Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
2014-10-21 19:28:37 +09:00
Keisuke Kuroyanagi bb0eca5705 Rename PrevWordsInfo to NgramContext.
Bug: 14425059
Change-Id: Id06a71681fa8b5e589e29fba10fe5c1cfed66984
2014-09-29 10:52:18 +09:00
Keisuke Kuroyanagi 1467fa0c26 Remove SuggestionsGatherer.
Bug: 13689011
Bug: 13630847
Change-Id: I9930d5ce9cbe16489dc69f68b9590d72afe463b5
2014-07-10 16:23:27 +09:00
Keisuke Kuroyanagi 86dee2295d Quit sorting suggestions in AndroidSpellCheckerService.
Suggestions have been sorted in SuggestionResults.

Bug: 13689011

Change-Id: Iec21e97119ceb7c71673d5b15bb1f06040b59fef
2014-07-10 16:21:31 +09:00
Keisuke Kuroyanagi 9e76304d60 Make spell checker use dictionary facilitator.
Bug: 13630847
Change-Id: I07d17ccf5ce0755f63a0b8d236d77600baaf62b6
2014-07-10 12:51:37 +09:00
Keisuke Kuroyanagi b8a9479b57 Move phrase gesture from additional features to public.
Bug: 15758242
Change-Id: I703dc2703afdf9402c5d2ac27411b74ece993dba
2014-07-08 16:36:06 +09:00
Jean Chalard 0dab3171d4 [SD9] Add armenian and georgian scripts
Bug: 15840116
Change-Id: I91719e4fc2e3fe29320e4cb8b1a2f8f93c44cc4d
2014-07-01 15:01:41 +09:00
Jean Chalard 292deb632c [SD7] Actually check for script.
...also implement the check for Hebrew and Arabic.

Bug: 15840116
Change-Id: Ia6433d7d98038ade64c171be4fe4b3f094111fac
2014-07-01 15:01:22 +09:00
Jean Chalard e530fffc2c Add a relevant suggestion to period-checkable requests
Bug: 15412461
Change-Id: Ibf37df4d31141a7e43b54d6342e7861eedb1c03b
2014-06-27 12:52:23 +09:00
Jean Chalard 8d3d0f3b84 Merge "[SD1] Move script-related methods to a new utils class." 2014-06-24 01:46:27 +00:00
Jean Chalard 289299bf66 [SD1] Move script-related methods to a new utils class.
Bug: 15840116
Change-Id: I3a2a9c41e40590c0116c7885a49c6fa308ed8f44
2014-06-26 18:24:11 +09:00
Keisuke Kuroyanagi e708b1bc2e Make PrevWordsInfo have multiple words' information.
Bug: 14425059
Change-Id: I2bd6a872904a44b80f638a13d91a97559217cc1a
2014-06-25 14:14:37 +09:00
Jean Chalard 4863a06544 Special case periods in the spell checker
Special case <valid word>.<valid word> to send as a suggestion
the same string where the periods is replaced by a space.

Bug: 10780091
Change-Id: I43c94675977f9ab5d7ee5671486cb742b39f3974
2014-06-10 19:52:58 +09:00
Jean Chalard 367c199de1 Remove mPrevWordsInfo
This member has outlived its usefulness. It's not clear now that it
makes things really faster, but it does bring a lot of complexity
that we can avoid by removing it.

Change-Id: Ifbc8094a45b56b958fe165b1930f4cc358a97721
2014-06-10 12:07:51 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi 83c40a2301 Use PrevWordsInfo instead of String in Java side.
Bug: 14119293
Bug: 14425059

Change-Id: I3d5da84881a49a04550180dd9aac2c37da2ed762
2014-05-19 13:55:40 +09:00
Keisuke Kuroyanagi 09c72207c6 Make session id mandatory for getSuggestions.
Bug: 15008504
Change-Id: Ic4a17a4b7242118ae74fd89c695da2bb52204fb2
2014-05-16 17:57:03 +09:00
Keisuke Kuroyanagi 18f21f96e0 Add languageWeight as an argument of getSuggestions.
Bug: 8187060
Change-Id: I8ae20c957a8e127b76c83cc3a65ff052d43bf2b5
2014-04-03 00:47:28 +09:00
Jean Chalard 1d6e647ac3 [IL69.1] Move a static method to a utility class.
This is a followup to IL69.

Change-Id: Iba154517aa7f75b9f16aa1b808c0da8d84be837f
2014-01-24 11:59:23 +09:00
Jean Chalard 1284e556f4 [IL70] Remove unused arguments
Bug: 8636060
Change-Id: Iec56bce362ebfc52fedab02b127978abb4f3c7f9
2014-01-23 15:33:14 +09:00
Jean Chalard d1f463eacf [IL69] Oust Keyboard from WordComposer#setComposingWord
Bug: 8636060
Change-Id: I624a45500603dfad355ee3b8b794b2d895219c0b
2014-01-23 15:32:59 +09:00
Jean Chalard 9da4b49ef6 [IL68] Start refactoring setComposingWord
Bug: 8636060
Change-Id: I242b7c264abf380bcd6b6b3c848238921f988e54
2014-01-23 15:15:49 +09:00
Jean Chalard df33982fce Remove suggestions when string contains a period
This is not the right way to do it, but it's simple and will kill the
regression. We should investigate why the return values are
wrong in this case.

Bug: 10780091
Change-Id: I808727242c9cb1598df00a7426358dc3a658add4
2013-10-07 17:27:27 +09:00
Keisuke Kuroyanagi fe87f5f417 Pass additionalFeaturesOptions for getSuggestions().
This fixes null pointer exceptions that are caused when
getSuggestion() is called from spell checker.

Change-Id: Ifc9e7abb900e1a4646e33c91022effde439673e4
2013-08-28 19:24:28 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Satoshi Kataoka 244a24e368 Consolidate dummy proximity info to the spell checker info
Bug: 8783170

Change-Id: I067486e5ec1ae7cdef8e2121392464ba71ee8add
2013-05-08 11:49:12 +09:00
Satoshi Kataoka a9dd74cf3f refactor spell checker
Change-Id: Ie7bea23f2ac54f03572e77c31ba7cb3d5e8f8d2f
2013-05-07 20:21:11 +09:00
Jean Chalard 2dbb5957e3 Pass blockOffensiveWords as a parameter
Bug: 8773353
Change-Id: Ic1019742ce7ff6e4f7fff4d2729f8ab52d841488
2013-05-01 20:47:35 +09:00
Jean Chalard 73ec85b8ad Don't insert automatic spaces when text looks like a URL
This is about as ad-hoc as it gets, but then again, what we want
is probably as ad-hoc as it gets.
All URL boxes I know of double as search bars, and not adding
automatic spaces there sucks (e.g. in Chrome URL bar).
And in other boxes actually you don't want to add a space if
it looks like a URL. QSB isn't even a search box, and it behaves
like this.

So I think this is actually the right answer to the problem.

Bug: 7062925
Change-Id: Ib09472b34644fd5bf2dc84bb97cedeeba28bcd02
2013-04-16 18:03:49 +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
Ken Wakasa d17c8bd929 Update comments
Change-Id: I6aef328ec9041666cc168c8323bed04d39591b71
2013-04-08 23:05:45 +09:00
Jean Chalard 7d3836d63a Move a generic string utility to StringUtils
Change-Id: I9cc2e9a7ac0b3346af40bcb083f939333336cf09
2013-04-05 12:09:14 +09:00
Jean Chalard 0cc0544a29 Merge the dictionary pack in Latin IME.
Bug: 8161354
Change-Id: I17c23f56dd3bc2f27726556bf2c5a9d5520bd172
2013-03-19 15:40:14 +09:00
Jean Chalard 1c5b2a41ec Cleanups
Follow-up to Idc6f419a

Change-Id: I4aae8f4e19f27a0a309879dc19af6e40906d58c5
2013-02-11 21:14:56 -08:00
Tadashi G. Takaoka 8aa9963a89 Fix Apache license comment
Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
2013-01-21 22:23:37 +09:00
Jean Chalard d8590857bd Fix spell checker subtype list.
Remove the subtypes that don't get a dictionary any more in AOSP.
Also prepare for all downloadable-dictionary supported subtypes.

Bug: 7673670
Change-Id: I5b754a791233c270237b8f7e5e2208f7282ad294
2013-01-11 14:59:34 +09:00
Jean Chalard 95bfb8ac47 Fix wrong misspelling reports of fully capitalized words
Two flavors of words would be wrongly reported as misspelled
by the android spell checker when they are written in all
upper case letters:
- Words containing a quote or a dash or any other non-letter
- Words that need the first letter to be capitalized

Bug: 7659216
Change-Id: Ibc5d261945ffcbb8a858d4c73b7c62cef6671abf
2012-12-04 18:05:27 +09: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 17f7b406aa Clear cache of user dic
Change-Id: Iec2793de3fff7bf15f68f82a50331de7742b7049
2012-09-19 20:11:45 +09:00
Tadashi G. Takaoka ac78633be2 Rename and consolidate some constants
Change-Id: I7863936cca18b28bf0117afcbcf544a5fd7f185d
2012-08-21 17:54:53 +09:00
Jean Chalard 653dbfb8ed Ensure #offer always actually offers something.
This will allow remaining requests after a call to terminate
correctly.

Bug: 6963142
Change-Id: Iff67058bb8a39f2f1b468d3894861e8125de6659
2012-08-15 18:10:10 +09:00
Jean Chalard e30c05800f Preemptive anti-deadlock device
We don't know of any actual bug in the implementation of the
pool that may result in a deadlock, but this still implements
a means out of a deadlock if one ever arises anyway. It's
meant to improve the resilience of the spell checker.

Bug: 5441027
Change-Id: I689491090792dbb89110ee56631965c5bb2dc712
2012-08-14 17:04:14 +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
Satoshi Kataoka 7fcad7b9b6 Separate ICS-dependent code from the spell checker service
Bug: 6789576
Change-Id: Ia768258f6fa121c7a7757093eb8a20e665580865
2012-07-10 17:45:26 +09:00