Commit Graph

170 Commits (e04480b68bb5b4684efe21b513f1c5d4eae86cd6)

Author SHA1 Message Date
Satoshi Kataoka 7c92b421ee Purge DicTraverseWrapper
bug: 8550444

Change-Id: Iad017e66ac579c6727b9f60ad9cda64e478200e5
2013-06-03 16:45:51 +09:00
Ken Wakasa f497e1e5a0 Move suggest_options.h to suggest/core
Change-Id: Ie95872a4c90ee3089183c1ebafb67243bd2688a4
2013-06-03 11:45:06 +09:00
Keisuke Kuroyanagi 0ecfb94247 Use BinaryDictonaryInfo instead of raw pointers.
Bug: 6669677

Change-Id: I9792a872f1609de7c1ba0fc08d916047d6724c0b
2013-06-02 16:34:42 -07:00
Ken Wakasa a65c267b1f Move some dictionary related implementations to the dictionary directory
Change-Id: I6fe71a540ad91ca46755be234abc8894242e2413
2013-05-31 00:02:57 +09:00
Keisuke Kuroyanagi 338ef65077 Make DicTraverseSession having suggest options.
Change-Id: I2b802c06634e5226c763fd838f3fc0918fc4a161
2013-05-29 17:18:03 -07:00
Keisuke Kuroyanagi 50db5f0fff Passing options to native suggestion method.
Change-Id: I6da180cfa1b9e5aa39600e78e3bc41209a40f583
Signed-off-by: Keisuke Kuroyanagi <ksk@google.com>
2013-05-24 10:21:04 -07:00
Jean Chalard 03f8c6aed3 Be careful about the dictionary size in detection methods
Bug: 8857618
Change-Id: I29345ec96d53da601571ba73197a6485643a10a7
2013-05-08 18:55:18 +09:00
Tadashi G. Takaoka ef86bbceae Add const_cast to live with host's jni.h
Bug: 7970626
Change-Id: I2fd09e16dd9df36eebca2d737a0b7cc3ddd1c862
2013-03-26 17:58:17 +09:00
Satoshi Kataoka e0e6737373 Refactor parameters by naming convention
Change-Id: I8bda8075b33f656ecbec08320afcd864b620fe77
2013-03-18 15:42:15 +09:00
Ken Wakasa cffb3126ac Small cleanups
Change-Id: I3e5862a405b4c63616c7ea947cd53c52b5035862
2013-01-30 01:19:29 +09:00
Ken Wakasa 5db594abba Remove MAX_WORD_LENGTH_INTERNAL
Change-Id: Ie11ff000675601acff5fbb00e9e9f48eb32c5071
2013-01-15 12:39:08 +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
Ken Wakasa aaefc4b30c Yet another small cleanups
Change-Id: Ie940c4d4d9d85c95e2f04ba23f00a54ba3dc53bf
2013-01-08 17:57:26 +09:00
Ken Wakasa fe9ec6bc7d Remove unused variables
Change-Id: Ia5079368a1bc86ccdf0052445dc6945041c0abca
2012-11-16 19:28:56 +09:00
Ken Wakasa 44d9c1ebfc Use sizeof() more safely.
Change-Id: I7cffb4d8da847b483cf4bb482508e3c88c4903be
2012-11-01 17:29:50 +09:00
Ken Wakasa 1e61493c50 Use 32-bit code points for suggestions output
This is a multi-project commit with Ic43dd666

bug: 6526418
Change-Id: I39c1acb4e91d04cd8a4ec5a943c8cf575da75ebc
2012-11-01 00:09:51 +09:00
Ken Wakasa b02ee3d67a Make use of the NELEMS and KEYCODE_SPACE macro. Also, remove an unused parameter.
Change-Id: I3c7e6c59990c92b0d5e2fb80493e8673cdd37b09
2012-10-09 11:17:50 +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
Ken Wakasa 162c211b44 Address warnings by -Weffc++
Change-Id: Icd60f1ed2ace0b975d8785bc8a386c7944846075
2012-08-24 23:50:39 +09:00
Jean Chalard 8af8c15c6b Allow one-character suggestions.
Bug: 6906525
Change-Id: I62117653ac1281f825afc4ebb30f7e786902b750
2012-08-17 11:10:58 +09:00
Ken Wakasa 267030dd82 Cleanup casts.
Change-Id: I3bf33ca407cc3bee9f5c4c6f929cdb1421b92c50
2012-08-14 19:03:09 +09:00
Ken Wakasa 34710b03e6 A couple of cleanups. Remove unnecessary casts.
Change-Id: Ice530aa83a9a688da35aec408be2a60242699157
2012-08-14 18:07:32 +09:00
Ken Wakasa bcec82de66 Clean up constructors
And, use C++ style casts and use float math functions rather than double ones to save memory space.

Also, stop using FloatMath and NativeUtils as standard Math methods are faster now.
See http://code.google.com/p/android/issues/detail?id=36199 and https://android-review.googlesource.com/40700

multi-project commit with I4259fb5ab8a15ac5760a7f04fc8f4c860529f04a

Change-Id: I0b81cff8c91769f7559a59b9528c75a5aabb4211
2012-08-13 10:48:37 +09:00
Ken Wakasa 063c3e2171 Fix memset() bugs
Change-Id: Icf4341c0a62e782cf8c2a863408591df4e6f07cb
2012-08-10 22:13:21 +09:00
Ken Wakasa f3850e5543 Use JNI Region calls also in getSuggestions()
Change-Id: I9cc0208397c202aeb6f7b5bb5ad59e00c5afbd80
2012-08-10 21:09:23 +09:00
Ken Wakasa 5bb4206275 Use more JNI Region calls
Change-Id: I371db517ff4749c0b7e5bdb4362e6310c91a24dc
2012-08-10 00:46:20 +09:00
Ken Wakasa 04a89132e9 Use GetStringUTFRegion for filename
Change-Id: I2e9ad092ccf4c23c1c6b71916c962994314d37b6
2012-08-09 23:27:58 +09:00
Satoshi Kataoka 9127811493 Pass traverse session
Change-Id: I84bfaaa406e3f51421c08a7ee8f9576ebdba54d4
2012-08-08 23:30:31 +09:00
Ken Wakasa 1d8a246e39 Header cleanup
Change-Id: I1aa91708d0de01ca3e84e69ec8d3a3832c386ca8
2012-08-03 18:37:58 +09:00
Ken Wakasa 74fb957e49 Header cleanup
Change-Id: Idaf19de3dc75367d49bc01e84e5a9f057c1f8dba
2012-08-01 18:46:07 +09:00
Ken Wakasa f1008c5501 Cleanup headers
Change-Id: I9124366b2000cad54966fb6936bb4691bbf115a3
2012-07-31 18:45:26 +09:00
Ken Wakasa 5460ea389d Misc cleanups
Change-Id: I28308f12c3064299acefc346b72279036c3726a7
2012-07-30 16:27:44 +09:00
Ken Wakasa 0bbb917d12 Cosmetic fixes and style fixes
Change-Id: I69c42ff945cdf0d5205c6ca61d6861a0479492dc
2012-07-25 18:56:51 +09:00
Jean Chalard 6931df9c17 Pass an array to output suggestion types (A119a)
This needs the matching A119b change to not break the build.
The array is passed, but not used yet.

Bug: 6166228
Change-Id: Ia91d658461d989ee8c94e9b31bb06f4a36f4c5b6
2012-07-12 19:21:42 +09:00
Jean Chalard 18d76afa91 Remove an unused method (A109)
Change-Id: Ib785b7e8c554d030395e2c0ca92edb44eb2b245f
2012-07-12 14:30:03 +09:00
Jean Chalard cc470c78e4 Move an implementation detail to native code (A107)
Java code does not have to know about this implementation detail:
the generic method should do the dispatching, instead of having
the caller call either method.

Change-Id: Ic13727f0cb18f4ced2c356cce2f8d710588c0421
2012-07-12 13:09:44 +09:00
Jean Chalard 6a5d17cd2f Remove a useless parameter (A106)
Change-Id: Ic0ecea22212fd1a098a3a168da460374e446f4a3
2012-07-12 11:28:16 +09:00
Jean Chalard b7d7c5a369 Make a constant really constant (A104)
Change-Id: Ied1f9f96a574b1e6a8ee0a71bfb1604d9c962e1c
2012-07-12 11:16:30 +09:00
Jean Chalard 05efe576f9 Cleanup the dictionary type.
Stop storing an int in each of the different class types, and
just store a string in the top class.

Change-Id: I2af1832743e6fe78e5c1364f6d9cc21252bf5831
2012-06-27 17:31:09 +09:00
Satoshi Kataoka 7368009799 Change JNI for Gesture
Change-Id: I774a0052038d16677f60f7efa11fd266cb5f3088
2012-06-25 18:54:37 +09:00
Satoshi Kataoka 2f854e170c Add a JNI to get the frequency
Bug: 4192129
Change-Id: I3f220f5a10114d4eb23956148076cf76220bda0f
2012-05-29 17:21:59 +09:00
Ken Wakasa 3b088a2f36 Add missing includes.
Change-Id: Ic7199045d0cffb208871f52cc167194013351d32
2012-05-16 23:05:32 +09:00
satok 0028ed3627 Use "float" instead of "double"
Change-Id: I93ed4d88ede4058f081dd8d634b00dfff4e96d07
2012-05-16 20:45:05 +09:00
Tom Ouyang 4d289d39ae Contacts dictionary rebuilds only when contact names have changed.
Bug: 6396600
Change-Id: Iad693ec4bab6351793d624e5c5b0a9f5c12a60e3
2012-05-11 18:43:53 -07:00
Jean Chalard 351864b38a Fetch and pass the bigram position on suggestions.
This is a cherry-pick of change I2d81742f

Bug: 6313806
Change-Id: Ic1190b7980d032bc11b57841bca040d980889b6b
2012-04-26 15:24:42 +09:00
Jean Chalard 522a04ea5b Pass words as int[] to the native code.
We need to get the bigrams during the call to getSuggestions for
bug#6313806. We already give an int[] to getSuggestions and we
wanted to get rid of char[]'s anyway because it doesn't work with
surrogate pairs, so here we go.

Bug: 6313806
Change-Id: I56ce99f1db6b3302cdf42f0527343bded837091e
2012-04-23 16:05:36 +09:00
Jean Chalard 80111f08e2 Pass the previous word down to native code in getSuggestions
Change-Id: I477b631d81ef58461e44954f3ae5fd895928bb97
2012-04-17 20:07:10 +09:00
Ken Wakasa db87fe4d5c Just cosmetic changes in jni code
Change-Id: I8628131b5a7ccdee4c158e891002c8b86623b0cd
2012-04-16 19:16:05 +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
satok 6ba8de2a60 Good bye the proximity logic in Java code
Bug: 4343280
Change-Id: I82f7d08703647a3492ce6e2d3b741146df58927e
2012-03-28 18:42:30 +09:00
satok 9fb6f47a6a New LOG lib
Change-Id: I977e7e10fa58c0a64ca0c3c7b5cb2272446e3efe
2012-01-13 18:04:15 +09:00
satok be0cf72253 Move auto correction thresthold to the native code
bug: 5858137

Change-Id: Ic4b6270c6e51ef4ed25a6a1d8ddd7fdfa70fd78d
2012-01-12 19:56:15 +09:00
Tadashi G. Takaoka 5fdcd7d5cd Fix JNI as 64bit ready
Change-Id: I7a3ed2cee3b20744869aa5cf89ff9fd95f5ab8fe
2011-10-31 20:44:01 +09:00
Tadashi G. Takaoka 94810dec21 Remove NULL from native/jni
Change-Id: I7c4e32d0d69876c7ea85d6997c9a40fa362152eb
2011-10-28 17:06:58 +09:00
Tadashi G. Takaoka 5049f5bbb4 Fix trivial compile issue
Change-Id: I9dbc51496dbdb2195bbe589b0c3b2cd7e3d2f1fc
2011-10-28 16:24:31 +09:00
Jean Chalard f0a9809662 Check the binary dictionary magic number
...and return NULL if it does not matched an expected value.

Bug: 5052486
Change-Id: I1dc7955d2785ee080bc5c22398be9befe332f096
2011-07-20 19:43:14 +09:00
Ken Wakasa ce9e52a12a Clean up in LatinIME native code
Change-Id: I0062200a0181a491690115ac0fab8d11358e2f14
2011-06-18 23:52:09 +09:00
Jean Chalard e93b1f2209 Allow reading a binary dictionary even without proximity info.
This prepares the way for spell checking, which is to be done
without context so without proximity info.

Bug: 4176026
Change-Id: I1b4bfaefe2611e1b484acdf3c33598cb80f81ff4
2011-06-02 12:10:13 +09:00
Jean Chalard c2bbc6a449 Use translation of fallback umlauts digraphs for German.
For German : handle "ae", "oe" and "ue" to be alternate forms for
umlaut-bearing versions of "a", "o" and "u".

Issue: 3275926

Change-Id: I056c707cdacc464ceab63be56c016c7f8439196c
2011-03-03 11:52:23 +09:00
satok 8fbd552292 Add proximity info to native
Bug: 3311719

Change-Id: Ie596304070e321ad23fb67a13bf05e2b6af1b54b
2011-02-23 23:04:00 +09:00
Tadashi G. Takaoka 887f11ee43 Remove next letters frequency handling
Bug: 3428942
Change-Id: Id62f467ce4e50c60a56d59bf96770e799a4659e2
2011-02-17 13:59:41 +09:00
Ken Wakasa da50e1e98d Fixes in close() in BinaryDictionary.
Avoid using 'synchronized' in finalizer as well.

bug: 3340837
Change-Id: I9b28f54e4490ecb844ba33a379f71b625e4246a2
2011-01-17 15:58:07 +09:00
Ken Wakasa 90d96615bc Clean up: Update variable names to comply with spec of ApplicationInfo.
ApplicationInfo.sourceDir may or may not be apk file name.  It can be a directory as well.
The spec just says it's "Full path to the location of this package".

Also, added error handling in loadDictionary().

Change-Id: I5e64d0aba4b1ec7634f4b3ac5537e7a774433ece
2011-01-09 16:53:33 +09:00
Ken Wakasa e90b333017 Load main dic in native
Follow up to Id57dce51

bug: 3219819
Change-Id: I00e11ef21d0252ffa88c12dffb9c55b0f2e19a66
2011-01-07 19:51:45 +09:00
Ken Wakasa a46683a47b Just code cleanup.
Change-Id: I796b47aa168b3b2cc29de65fc7dc5dab5a7f4b17
2010-12-03 17:13:04 +09:00
satok 3008825948 Fix parameters of native functions and refactor Dictionary
- created bigram/unigram dictionary classes

Change-Id: I233a28ed8d611870db3f4cf8f25fc45b5d41529b
2010-12-02 01:16:44 +09:00
Jae Yong Sung 80aa14fd43 - separate dict (uses xml)
- retrieve bigrams that only starts with character typed and neighbor keys
- contacts bigram
- performance measure

bug: 2873133

Change-Id: If97c005b18c82f3fafef50009dd2dfd972b0ab8f
2010-07-28 11:08:08 -07:00
Jae Yong Sung 937d5ad013 added bigram prediction
- after first character, only suggests bigram data (but doesn't autocomplete)
  - after second character, words from dictionary gets rearranged by using bigram
  - compatible with old dictionary
  - added preference option to disable bigram

Change-Id: Ia8f4e8fa55e797e86d858fd499887cd396388411
2010-07-13 11:33:39 -07:00
Ken Wakasa 826269c8ae Get rid of dependency on native AssetManager API. Confirmed the native code builds with the NDK r3.
Change-Id: I0d2d3a0e262847d6948a0336a35440e21e312ad2
2010-04-27 22:23:03 +09:00
Amith Yamasani 07b1603a3f Don't let the native code target be included twice when unbundling.
Move java code to a different directory so that the unbundled
version doesn't try to compile the native code again.

Change-Id: I05cf9e643824ddc448821f69805ccb0240c5b986
2010-03-09 15:01:09 -08:00