Commit Graph

917 Commits (552d5e9d0ee4caf530d939f3029ca1617861b460)

Author SHA1 Message Date
Ken Wakasa e12e9b5b69 Fix indentations.
Change-Id: I25c26e2fe50427d11d97b6204174a4f651963d24
2012-01-06 12:24:38 +09:00
Jean Chalard cf9dbbdd1a Add methods to read shortcuts from the binary dict (A2)
This contains stubs only, it does not work yet, however it
doesn't break anything.

Change-Id: If912ae84ff3ccd7a2d6588ffd6fbb9974f87ef3d
2012-01-06 12:24:30 +09:00
Jean Chalard c8c6585f21 Add a forgotten constant
This fixes the build.
A constant was used before it was declared in another file.

Change-Id: I72dfca2f76f0c3b7dd64072d062cd48c9bfcbd56
2011-12-27 12:58:49 +09:00
Jean Chalard e0e339699a Skip shortcut targets if any. (A1)
Change-Id: I1e83bba2b36bdc0429debb22425ce75001e61c81
2011-12-27 12:22:20 +09:00
satok 1a6da631ab Prepare for proximity + two word correction No2
Change-Id: Idfa1413e853299f1db459ef07da3efa932047981
2011-12-19 17:12:20 +09:00
satok 744dab691e Prepare for proximity + two words suggestion
Change-Id: I3637f9bec1f4a3c5953498c4562e1f17a7bf593c
2011-12-16 17:32:53 +09:00
satok a7e5a5a6b9 Add words priority queue pool
Change-Id: I152df7b876a1756b69ded2ca4fb3ee26b38c971f
2011-12-15 19:20:28 +09:00
satok 4d355989bd Add a functionality to limit the max correction errors
Before
==== test finished, terminate logcat =====
(0)  121.97 (0.28%)
(1)  42032.07 (95.46%)
(2)  11.03 (0.03%)
(3)  12.19 (0.03%)
(4)  10.02 (0.02%)
(5)  1417.41 (3.22%)
(6)  258.43 (0.59%)
(20) 50.20 (0.11%)
Total 44033.07 (sum of others 43913.32)

After
==== test finished, terminate logcat =====
(0)  110.81 (0.29%)
(1)  36416.11 (94.47%)
(2)  10.06 (0.03%)
(3)  9.45 (0.02%)
(4)  9.83 (0.03%)
(5)  1535.52 (3.98%)
(6)  290.25 (0.75%)
(20) 40.57 (0.11%)
Total 38546.83 (sum of others 38422.60)

Change-Id: Iffd24ce0b2dc422c8c6085d5be5f6bfdaf59ca7d
2011-12-15 16:00:08 +09:00
satok d03317c4be Prune traversing a bit agressively and add a flag not to do auto completion
+1       1
-1       2
+2       0
-2       0
+3       0
-3       0
+4       6
-4       1
+5       4
-5       3
+6       3
-6      10
+7       7
-7       5

Before:
Total 42936.28 (sum of others 42814.63)

After:
Total 40860.56 (sum of others 40733.92)

Change-Id: I6a3d52f31ec181970083358280c3ebaca0a1f63e
2011-12-15 12:09:25 +09:00
satok 1147c7bac9 Unbundle members in unigram_dictionary
Change-Id: Id737d943d20e3de3db568162caf40d3e956c7fae
2011-12-14 19:45:51 +09:00
Ken Wakasa d5e35acffb Reorganize LatinIME native build directory structure. Now it got NDK friendly.
Change-Id: I0f62ce8a6a4d2b6134db698f8b8d0576616e524d
2011-12-13 21:16:20 +09:00
satok 16379df633 Use priority queue for native string buffer
+1 2
-6 2

Performance

before

==== test finished, terminate logcat =====
(0)  100.34 (0.26%)
(1)  37149.26 (95.30%)
(2)  8.43 (0.02%)
(3)  11.18 (0.03%)
(4)  9.92 (0.03%)
(5)  1330.60 (3.41%)
(6)  250.46 (0.64%)
(20) 12.41 (0.03%)
Total 38982.50 (sum of others 38872.59)

after

==== test finished, terminate logcat =====
(0)  97.65 (0.26%)
(1)  35427.43 (95.32%)
(2)  10.30 (0.03%)
(3)  8.95 (0.02%)
(4)  11.01 (0.03%)
(5)  1224.67 (3.30%)
(6)  243.76 (0.66%)
(20) 40.91 (0.11%)
Total 37167.04 (sum of others 37064.68)

Change-Id: Id4d3b88a9cdef765affc52973aeac951ecc6a8ca
2011-12-13 16:32:52 +09:00
satok 0a66397106 am 620b1faf: Merge "Fix the touch calibration bug" into ics-mr1
* commit '620b1faf126d4b5f7cb5c353cebd374d1347fdd4':
  Fix the touch calibration bug
2011-11-17 11:46:27 -08:00
satok 554fdd21a1 Fix the touch calibration bug
Bug: 5629373
Change-Id: Iacc746e1cc97bf305e1f287cf7431b7115607eeb
2011-11-17 15:56:41 +09:00
Tadashi G. Takaoka 6e3cb27cff Reorganize char_utils.h and basechars.h
* make BASE_CHARS[] const
  * add several inline menthods for ASCII character handling

Change-Id: I49664f219af88faf0aef43ac350cfc216570b185
2011-11-11 19:44:08 +09:00
Ken Wakasa 6d12dfd32d am 2549ce27: am df2fed2b: Merge "Fix a bug that would end up in memory corruption" into ics-mr0
* commit '2549ce275a272d552c28121ea58742e54b640e54':
  Fix a bug that would end up in memory corruption
2011-11-10 18:51:16 +00:00
Ken Wakasa 2549ce275a am df2fed2b: Merge "Fix a bug that would end up in memory corruption" into ics-mr0
* commit 'df2fed2b791c5d6ef64597d515c971aa32a59b92':
  Fix a bug that would end up in memory corruption
2011-11-10 04:53:15 +00:00
Jean Chalard 8c8ca59dd5 Fix a bug that would end up in memory corruption
Square distances array was not the right size. Copying long words
into it would result in fandango on core.

Bug: 5508337
Bug: 5591925
Change-Id: I7598081b3cfcd1975b206dada1baf8da9be35641
2011-11-10 12:27:50 +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 7e8cf3c093 Merge "Remove NULL from native/jni" 2011-10-28 01:14:47 -07:00
Tadashi G. Takaoka 94810dec21 Remove NULL from native/jni
Change-Id: I7c4e32d0d69876c7ea85d6997c9a40fa362152eb
2011-10-28 17:06:58 +09:00
Tadashi G. Takaoka 0e97148f6d Remove NULL from native/src
Change-Id: I5299af7773d28fd12faebbfe644829a401ae5644
2011-10-28 17:02:09 +09:00
Tadashi G. Takaoka 5049f5bbb4 Fix trivial compile issue
Change-Id: I9dbc51496dbdb2195bbe589b0c3b2cd7e3d2f1fc
2011-10-28 16:24:31 +09:00
Tadashi G. Takaoka d862b93578 Cleanup unused function
Change-Id: Ic0895e1973b3879b2a63f7e0b888e9a0480be6f3
2011-10-27 19:58:46 +09:00
Yusuke Nojima 04d8737015 Calculate edit distances incrementally.
Change-Id: I3ee734b9b71351523dc8658cba33d6c8435e348e
2011-10-14 14:29:28 +09:00
Yusuke Nojima a4c1f1c1fd Calibrate the scores of the proximity chars according to the distances.
+1      75
-1      27
+2       0
-2       0
+3       0
-3       0
+4      30
-4      48
+5      37
-5      27
+6       4
-6      35
+7       9
-7      18

Change-Id: I3c6ab06a0084c18ab595147c36c2ff4b1e961a7b
2011-10-11 15:28:32 +09:00
satok 57834c20a5 Fix a bug of the conversion of the correction algorithm
Bug: 5414829

+1      25
-1      17
+2       0
-2       0
+3       0
-3       0
+4      15
-4       9
+5       2
-5       9
+6      13
-6       4
+7       3
-7      19

Change-Id: Ie99db961051320ee31d31476ea7c25b1d837c484
2011-10-07 00:23:26 +09:00
Yusuke Nojima afb9076503 Enable score calibration by touch coordinates
Result of diff.sh:
+1       3
-1       3
+2       0
-2       0
+3       0
-3       0
+4       1
-4       3
+5       3
-5       2
+6       3
-6       1
+7       1
-7       2

Change-Id: I41b803df23ac03e1fc81043df4e1e6a63c0afbb1
2011-10-05 18:11:42 +09:00
Yusuke Nojima e4ba822cc6 Promote touches in hit box according to the distance from sweet spot
Change-Id: Ice0fd0514304a79aed67627c2ea3439bd5177de4
2011-10-05 17:33:43 +09:00
Yusuke Nojima c25c7ccf25 Cache the sweet spot types
Change-Id: Ibaee062dc55c11892143d48b2d0959e78e52be83
2011-10-04 17:22:41 +09:00
Yusuke Nojima 16717159ff Move ProximityInfo::calculateSweetSpotType right after ProximityInfo::setInputParams
Change-Id: Ifc76ab0aa3e9467d54696bb8b84bf523f001938a
2011-10-04 17:04:07 +09:00
satok c812d0b816 Merge "Demote words with a capitalized char" 2011-10-03 04:24:40 -07:00
satok eb050fc2dc Demote words with a capitalized char
Bug: 5371514

+1       4
-1       2
+2       0
-2       0
+3       0
-3       0
+4       1
-4       3
+5       0
-5      12
+6       3
-6       3
+7      12
-7       0

Change-Id: I6b46e43f9059f1e8a1cc02a626ea6eb8f1f9924f
2011-10-03 20:11:06 +09:00
Yusuke Nojima 5d21c5c6cb Fix bug in calculateSweetSpotType()
Change-Id: I215bc02367e123a73ffc94974e7b1cbec52a25fa
2011-10-03 14:39:40 +09:00
Yusuke Nojima 9ee8c9c45c Calibrate score by touch coordinates
Change-Id: I9fc066eb1a455243536e72405922fcb7e26d7dc6
2011-09-30 18:08:28 +09:00
Yusuke Nojima da9f556a15 Merge "Classify touches into three types." 2011-09-30 01:26:15 -07:00
Yusuke Nojima 258bfe66e0 Classify touches into three types.
Change-Id: I7c1d42835e0c15d596a1b66d421b0aa514ec0890
2011-09-30 17:22:22 +09:00
satok db096d681f Merge "Add a flag to demote completed suggestions" 2011-09-29 03:58:27 -07:00
satok 40a5f6fa4d Add a flag to demote completed suggestions
Bug: 5390063
Change-Id: I0ef4fbcc705539624269fd2f8c4e782679fc44b3
2011-09-29 19:48:18 +09:00
Yusuke Nojima ad35835bac Pass the touch position correction data to native.
Change-Id: I92958779377a530410d1682100f9d0a2ba267dea
2011-09-29 17:00:49 +09:00
Yusuke Nojima 1c923d8581 Extend JNI interface to pass the theme id of the keybaord to the native.
Change-Id: I705ec2fa1d32a673a8d84bc9afc2a46208a414a1
2011-09-28 11:56:28 +09:00
Yusuke Nojima de2f8424ea Add explicit NULL check to latinime_Keyboard_setProximityInfo() and ProximityInfo::ProximityInfo().
Bug: 5375319
Change-Id: If3016ab56b6c62c8855b394f23e09e127a279be7
2011-09-27 14:51:41 +09:00
Yusuke Nojima b225516366 Merge "Extend JNI interface to pass the key coordinate information" 2011-09-22 02:50:51 -07:00
Yusuke Nojima 0e1f656c1b Extend JNI interface to pass the key coordinate information
Change-Id: Iec0d1415d6abba43b775a014516b961b167597b7
2011-09-22 18:39:34 +09:00
Yusuke Nojima db815b79a7 Merge "Fix a dangerous macro." 2011-09-20 01:26:48 -07:00
Yusuke Nojima 6309593762 Fix a dangerous macro.
Change-Id: Idb5530ceb03c415e4ec002f8d2fbbec837b35636
2011-09-20 16:17:05 +09:00
Yusuke Nojima 2e496f5d0b Fix editDistance() not to access the outside of mEditDistanceTable
editDistance() can access the outside of mEditDistanceTable when called
with strings that contain MAX_WORD_LENGTH_INTERNAL characters.

Change-Id: I996e6cf21bd6acd6584beb4046c10491a044191e
2011-09-16 11:52:16 +09:00
Yusuke Nojima 032cfeef5a Delete unused function and add TODO comment for a potential bug.
Change-Id: I7b16de1bd6b278c51d56eb1904e186c3db3b7f3d
2011-09-14 16:09:24 +09:00
satok a6f2fcdcea Fix a bug for calculating the edit distance
Change-Id: I4c2cd102c258ccdb2de18c53901f91c0f7c7a986
2011-08-26 19:30:56 +09:00
Yusuke Nojima 0ada663f3d remove unnecessary condition check.
Change-Id: I6e5e3dee0ca3aae0088dcb309da8be16d3842d47
2011-08-26 18:54:07 +09:00
satok 7adf2cdbbc Combine proximity and corrections
bug: 4170136

Change-Id: I0a6d54c769b05f7a67f2f472d48a3e54fe3af475
2011-08-24 19:29:21 +09:00
satok 10266c09ec Combine the skipped and transposed correction
bug: 4170136

Change-Id: I7b50b40478abf27f51ec5e001815ff4882f3e5e5
2011-08-23 23:40:29 +09:00
satok 6d78302155 Fix last excessive char correction handling
Change-Id: Id1d46cd96e041fbbbee995093ef8ca56daa3b383
2011-08-19 18:31:43 +09:00
satok b9d09e73e0 Refactor correction.cpp
Change-Id: I1275496e3e7d7124494994d3c52730ec8afdfad3
2011-08-19 17:49:44 +09:00
satok 9db2097f7b Do the transposed correction and the excessive correction by one loop
Change-Id: Idc7a3451a65f7b980e5c499e9083f67646b3a199
2011-08-19 17:10:10 +09:00
satok bcac0e9e23 Improve fat finger correction.
Change-Id: I37ed0dc6956f7e6fab5dcfd0483ab5691cd819d4
2011-08-17 01:04:35 +09:00
satok 0cedd2bcc3 Combilne normal correction and skip correction
Change-Id: Ide868d977c0f35900340c7be1b71d572c69a8806
2011-08-15 17:13:39 +09:00
satok 466ed22fc6 Removed matchedChar count
Change-Id: I69e92026f802635f900b1e72d089afe4bda5fb0b
2011-08-11 23:01:54 +09:00
satok f3948c1eac Calculate the skip correction by one loop
Change-Id: Ie70829407cd58be2ffe75c7d649d86f62ee4df24
2011-08-11 17:18:23 +09:00
satok 635f68e822 Improve skip correction algorithm
Change-Id: Ife45e3886137d60a4e903d4c6f7a9ef20c7e705a
2011-08-11 12:55:26 +09:00
satok 208268d149 Add correction state.
Change-Id: I0a1419922e1ce7a15b566d1b6da3794f8e84c754
2011-08-10 19:10:26 +09:00
satok cfca3c6317 Refactor CorrectionState to Correction
Change-Id: I5f1ce35413731f930b43b1c82014e65d9eaa240b
2011-08-10 14:40:25 +09:00
satok 985312e88f Refactor the correction algorithm related to missing character correction
Change-Id: If68f2aaea7df48d013aea5401cee4ec0df32111a
2011-08-09 12:53:12 +09:00
satok 8876b75ca1 Move scoring part to the correction state
Change-Id: I2dc4a0869636fce5526f48b3a6267b6bdf61dbfb
2011-08-05 17:24:56 +09:00
satok f071e75b78 Change the prune condition
Change-Id: I92aef12e0e1d89cfe1b346ddc6ef4df158ffe0b3
2011-08-04 18:32:37 +09:00
satok 4e4e74e6b6 Move the input index and output index to correction state
Change-Id: Idebdb59143f3367929df6a0475cefe941eb16d01
2011-08-04 14:16:14 +09:00
satok 0f6c8e8aeb Move code related to ranking algorithm to correction_state.cpp
Change-Id: I52b34de45969fef82e46d9c10079c2d45e0b94eb
2011-08-03 20:34:19 +09:00
Jean Chalard 588e2f2964 Add bigram lookup implementation.
Bug: 5046459
Change-Id: Id2c7686c5da078751ed587e559417e808779aa7a
2011-08-02 18:05:59 +09:00
satok 612c6e49c0 Move code related to ranking algorithm to the correction state
Change-Id: I2d9e2db81cf6597ca4e88d7bc6737ab3b52b34b2
2011-08-02 15:44:59 +09:00
satok db2c0919cf Remove old dictionary format code
Change-Id: Ic4b9e069c9bd5c088769519f44d0a9ea45acb833
2011-08-01 16:01:54 +09:00
satok 2df3060883 Add correction state
Change-Id: I0d281cede1590893bd1def005cf83c9431d12750
2011-08-01 15:42:09 +09:00
Jean Chalard 6a0e9642a8 Small native refactoring.
Move a purely dictionary-format-related function that is needed
both by unigrams and bigrams to the binary format handling
file.
Also remove the empty UnigramDictionary::getBigrams placeholder
function, on grounds that it should be in the BigramDictionary
class.

Bug: 5046459
Change-Id: I8a67a25f72122e2fa0b19ae1d936db25eb0b20ba
2011-07-26 16:13:53 +09:00
Jean Chalard 848b69a5f9 Some refactoring
Getting the frequency of a terminal is not very useful, however
getting its position will be very useful for retrieving bigrams
later.
Moreover, from the position it's easy to find out the frequency.

Bug: 5046459
Change-Id: Ica53472c2038c7e407dbd1399d336511c731087f
2011-07-26 15:44:51 +09:00
Jean Chalard 999ba61b34 Some native cleanup
Take a function that does not need to be a member and make it
static inline.
Also replace the return value of -1 by a #define'd constant.

Change-Id: I92e0deaa1df65998b76aba6329a4c8eb4d287485
2011-07-22 18:09:48 +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
satok d24df43eaf (Step2)Move functions related to proximity to proximity_info.cpp
Change-Id: Iae0eb2a5cd758bda820fa42b4bc3eb3d2665bf96
2011-07-14 15:47:32 +09:00
satok 46f2d44a29 Merge "(Step 1) Move proximity related parameters from unigram_dictionary to proximity_info" 2011-07-13 21:30:30 -07:00
satok 1d7eaf8462 (Step 1) Move proximity related parameters from unigram_dictionary to proximity_info
Change-Id: Ic630b35f4abffeb84c38bcf5935795b7ff07556a
2011-07-14 13:21:34 +09:00
Jean Chalard b2ba41397f Merge "Activate the implementation for the new dictionary format." 2011-07-13 19:20:32 -07:00
satok 827ced8486 Separate logging definitions in C
Change-Id: I1d79814d1fd74e92a280f355c535517618c51752
2011-07-14 09:01:09 +09:00
satok 787945bf1e Fix build for profiling
Change-Id: I39cd0fa37fb738dcbbcf82839b6bb030e3af606b
2011-07-14 08:32:57 +09:00
Jean Chalard cba9e23bb1 Activate the implementation for the new dictionary format.
Bug: 4392433
Change-Id: I20b05d012b1fb193002312792d0309d36c89d16a
2011-07-14 06:55:20 +09:00
satok 3e41c071e6 Merge "Add a flag for a profiling" 2011-07-12 23:27:51 -07:00
satok 20d9fdae3a Add a flag for a profiling
Change-Id: Iae509a24fd0f0f416376c3f8051aa2eb92d48659
2011-07-13 15:21:10 +09:00
Jean Chalard 0adf7ae299 Merge "New dict format, step 7" 2011-07-12 22:48:45 -07:00
Jean Chalard 1059f27364 New dict format, step 7
This actually implements the new dictionary format, but does not
activate the implementation through #defines.

Bug: 4392433
Change-Id: I9b26b9bcb4b823a36e0984799b69730acfc6f7f3
2011-07-13 14:33:48 +09:00
Doug Kwan ce9efbff53 Compile code used in logging conditionally so that gcc does not complain
about unused-but-set variables.

Change-Id: I141f438694a1854d54d08cb5a74c23222dd9d85e
2011-07-08 00:29:11 -07:00
Jean Chalard bb15e77511 Move a function to make next commit more readable
Change-Id: Ieaa935ff4d68ce88137dcc5c672a4149a4c9c64f
2011-06-30 20:14:38 +09:00
Jean Chalard e6715e32d5 Move a function out of a #endif to reduce a future commit
Change-Id: Ic8f3160a96b6d79ba19ff9c8eda1692e94a38e98
2011-06-30 19:47:25 +09:00
Jean Chalard 0584f02ee1 Rename parameters for future change
Change-Id: Id15a17340fb26f91c72687f30bef24b2d8b94940
2011-06-30 19:23:16 +09:00
Jean Chalard 432789ac93 Internal cleanup
Moving functions around, renaming parameters

Change-Id: I3ab480f483d7d9700b9328cb07b16b51005098e5
2011-06-30 17:50:48 +09:00
Jean Chalard ffefdb6c1a Cleanup.
Function renaming, moving around for future patch readability

Change-Id: Id33b961cf2e899b5a3c9189951d2199aba801666
2011-06-30 17:22:19 +09:00
Jean Chalard 980d6b6fef Internal cleanup.
Function renaming, useless function supressing, fix comments

Change-Id: I148acbaf367cd556a85b89016676b46cc971af81
2011-06-30 17:02:23 +09:00
Jean Chalard 594a9a1963 Internal cleanup.
Removed unused function prototypes.

Change-Id: Ia56ea8e285deed17ce8377df855b045b7850d58d
2011-06-30 16:51:17 +09:00
Jean Chalard 85a1d1ea74 New dict format, step 6
Copy the modified functions to be able to see the diff

Bug: 4392433
Change-Id: Ic9b83b4b4b7b89cc922eed1825507d7d516aff24
2011-06-21 22:24:54 +09:00
Jean Chalard bc90c72faf New dict format, step 5
Move functions that will be modified and enclose those that will
be replaced into #ifdefs.
This change does not modify any code, only move some code around.

Bug: 4392433
Change-Id: Ibefbda1eb8bdc8a0c72de47ad9c67a08d0aca960
2011-06-21 12:15:00 +09:00
Ken Wakasa ce9e52a12a Clean up in LatinIME native code
Change-Id: I0062200a0181a491690115ac0fab8d11358e2f14
2011-06-18 23:52:09 +09:00
Jean Chalard 23eb0fa0b5 Merge "New dict format, step 4" 2011-06-17 05:30:26 -07:00
Jean Chalard ca5ef2890e New dict format, step 4
Consolidate terminal cases, streamline the word adding process
and create the entrances for adding alternate spellings with an
empty implementation.

Bug: 4392433
Change-Id: I781c93ec49945d71c7c20624c86596aa49add4c8
2011-06-17 20:59:21 +09:00
Jean Chalard 4fd9650f0b New dict format, step 3 - followup
Make the passing of an argument clearer
Bug: 4392433

Change-Id: Id82662ff4dc25282f70a08bee77378fee2b4b590
2011-06-17 17:08:09 +09:00
Jean Chalard 581335c3fb Fix a bug where bigram search would never return
Bug: 4690487
Change-Id: Ie8f3f651508cc48bbb043a0b308f7e0d1524371c
2011-06-17 12:45:17 +09:00
Jean Chalard 17e44a72e8 New dict format, step 3
Some refactoring and add of a parameter that will be necessary.

Bug: 4392433
Change-Id: I17f001a7efd4f69f4c35f94ee1ca8e97391b81d5
2011-06-16 23:28:09 +09:00
Jean Chalard 8124e64dcc New dict format, step 2
Move some methods around and make static some methods

Bug: 4392433
Change-Id: I2bbe98aec118a416d21d1e293638e1d324505b9b
2011-06-16 22:33:41 +09:00
Jean Chalard 293ece0f34 New dict format, step 1
This renames some variables and removes dependancies to values that
will disappear

Bug: 4392433
Change-Id: I79a44462d6bf25248cc2de0d63d7918fc6925d68
2011-06-16 22:18:10 +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
satok 99c908a595 Tweak the demotion rate for the mistyped space correction
Bug: 4402942

Change-Id: I7f5412b9fd2f1506f529cff0c3399d748c6ece92
2011-05-24 14:31:06 +09:00
satok bb68d80119 Tweak the demotion rate of mistyped space correction
Bug: 4402942

Change-Id: I6e0421dfa99e261c72a901c9699fec864ab4b3c5
2011-05-23 18:35:29 +09:00
satok d8db9f86d0 Fix a bug on the calculation of the freq on the mistyped space error correction
Bug: 4402942

Change-Id: I0b611e3d0e8c25ca528ef7408c3949200e5cad85
2011-05-18 18:36:54 +09:00
satok 0b6b0a5a98 Enable fast power
Change-Id: I00a91381f63cde62d9e7cf7e17f75869294cf2df
2011-04-27 16:29:27 +09:00
satok b2e5e5937c Handle overflow properly in multiplyRate
Bug: 3401513
Change-Id: I8dd2523caa58bb51c378a01e160a58f9106ce9b8
2011-04-26 22:03:26 +09:00
satok 9674f654a7 Fix a bug that 2 length words were demoted.
Change-Id: I4a3558d0f1f1b0a9d6a36c3f75db3089b0566d7f
2011-04-20 17:15:27 +09:00
satok 63546344b3 Merge "Promote a word with a missing space because the formula was changed by Ifa4338c5f4" 2011-04-19 07:54:02 -07:00
satok cbc66e0711 Promote a word with a missing space because the formula was changed by Ifa4338c5f4
Change-Id: Id4bc965aef387800facb64164d8c36a3bdd2fa07
2011-04-19 23:48:36 +09:00
satok 4c981d3a40 Demote a word with mistyped space and missing space according to the length of each word
Change-Id: Ifa4338c5f43b37e6bcd0700767ef2178189de3af
2011-04-19 23:14:27 +09:00
satok a4374d2eb7 Promote the correction of words with a missing space character
Change-Id: I37ba618b54f7115163a3e9c6c555485e7024dc92
2011-04-18 12:36:11 +09:00
satok 9d2a3020ba Promote a word with a proximity character
Bug: 4293295

Change-Id: Ib0ec8aff087c71c4fbe983f3f5bc78e9c7868fd8
2011-04-14 20:30:25 +09:00
satok 72bc17ec9f Promote a word with only one proximity character.
Bug: 4271049

Change-Id: I755986f582f43417fda6b117207530c519233baf
2011-04-13 19:11:13 +09:00
satok dc5301e590 Change the formula of the missing character.
- Bug: 4271049
- Due to the result of the recent user study, a word with a missing character needs to be promoted a bit.

so I changed the formula from:
- freq * 70 * (n - 2) / (n - 1)
to:
- freq * 90 * (10n - 12) / (10n - 2)

Change-Id: Ibff72cbdb0f2d7b91460a06a0fd39a9f5749aa46
2011-04-13 10:44:18 +09:00
Ken Wakasa de3070a71b Add -Werror flag to catch more warnings and errors
Change-Id: I9c39ba24578931944aae8182918ed48a2e82eb39
2011-03-19 10:12:15 +09:00
satok e07f93d3ab Merge "Tweak the demotion rate for a word with missing letter" into honeycomb-mr1 2011-03-07 22:44:16 -08:00
satok 0bddb2f4d6 Tweak the demotion rate for a word with missing letter
Bug: 4027223

Change-Id: Ie9a5552d2f41d60f433573fde52efc097f5143bf
2011-03-07 19:44:52 -08:00
satok 1df8c82d71 Fix a bug that a word with only one missing word is not promoted
Bug: 4027223

Change-Id: Icf7c5b917c18b565dca95b98b96c1c8e2963f540
2011-03-07 18:01:09 -08:00
satok 3c4bb7747d A bug fix for the mistyped space algorithm
Bug: 3311719

-- also fixed compiler warnings

Change-Id: I6941c0d02f10d67af88bc943748dde8d8783fabb
2011-03-04 23:25:48 -08:00
Jean Chalard eaecb56f94 Merge "Demote skipped characters matched words with respect to length." into honeycomb-mr1 2011-03-04 22:43:16 -08:00
satok 817e517e46 Add the suggestion algorithm of words with space proximity
Bug: 3311719

Change-Id: Ide12a4a6280103c092fa0f563dd5b9e3f7f5c89b
2011-03-04 20:37:18 -08:00
Jean Chalard 07a8406bc1 Demote skipped characters matched words with respect to length.
Words that matched user input with skipped characters used to be demoted
in BinaryDictionary by a constant factor and not at all in those dictionaries
implemented in java code. To represent the fact that the impact of a skipped
character gets larger as the word is shorter, this change will implement a
demotion that gets larger as the typed word is shorter. The demotion rate
is (n - 2) / (n - 1) where n is the length of the typed word for n >= 2.
It implements it for both BinaryDictionary and java dictionaries.

Bug: 3340731
Change-Id: I3a18be80a9708981d56a950dc25fe08f018b5b89
2011-03-05 13:20:19 +09:00
Jean Chalard a787dba83b Fix a bug with umlaut processing.
Issue: 3275926
Change-Id: Ibcb00aaea3ff05ad59ad4e8e54dd3caab5ab9bca
2011-03-04 13:07:07 +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
Jean Chalard f5f834afcd Rename variables with obscure names.
The `snr' variable has a very obscure name. Rename it to `matchWeight'.
Also, the `toLowerCase' function is error-prone, since it actually returns
a lower case version of the BASE char, that is without diacritics. Hence,
rename it to `toBaseLowerCase' and update variables with similar names.

Change-Id: Ibdbe73018a33ee864db59a51d664c3b104d5fb3f
2011-02-22 16:43:19 +09:00
Jean Chalard a5d5849701 Force autocorrection of matching words with different accents.
When entering a word without accents the user expects the system to
add accents automatically if there is no other matching word. This
patch ensures the accented version is promoted accordingly and
autocorrection really takes place.

Issue: 3400015

Change-Id: I8cd3db5bf131ec6844b26abecc1ecbd1d6269df4
2011-02-22 15:27:06 +09:00
Tadashi G. Takaoka 887f11ee43 Remove next letters frequency handling
Bug: 3428942
Change-Id: Id62f467ce4e50c60a56d59bf96770e799a4659e2
2011-02-17 13:59:41 +09:00
Jean Chalard 8dc754a411 Promote full matches with differing accents.
Stop considering accented characters as different from their base
character for proximity scoring.
Also give a huge boost (basically overriding frequency) to a word
fully matched with only differing accents.

Bug: 2550587

Change-Id: I2da7a71229fb3868d9e4a53703ccf8caeb6fcf10
2011-01-27 17:29:24 +09:00
satok fd16f1d2a3 Handle the last char correctly in excessive char correction algortihm.
bug: 3278422

Change-Id: I651d3cb0130ab9834ed9d7a97f41360c6eaa9de1
2011-01-27 16:44:54 +09:00
satok 58c49b9132 Fix auto-correction threshold and promote full matched words
Bug: 3374359
Bug: 3278422

"zbe" will be auto corrected to "be" by fixing s-line
"teh" will be auto corrected to "the" by promotion of full matched words

Change-Id: I314c632820e4e0b1501edeca60ada205d291451f
2011-01-27 12:53:13 +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
satok f7425bb15b Supress overflow at mulitplying demotion rate
Change-Id: I2003c5f88a5062b11e2f21522095bb94b1eb4efd
2011-01-05 16:43:17 +09:00
satok 61e2f85e3f Add profiler for native dictionary code
Change-Id: I2569756c9ef4fa677ae52f2ccfcb90d2115d129f
2011-01-05 15:47:29 +09:00
Ken Wakasa 458249e703 Consolidate main dictionary files.
This change is a preparation for upcoming optimizations on dictionary file loading.
* We can consolidate dictionary files because we are no longer relying on Asset Manager.
* Stopping compressing dictionary files as planning to use mmap() on the region in the apk file.
* Probably we won't rely on Asset Manager.  Instead we'll probably use offset and size obtained from AssetFileDescriptor.

Change-Id: Id57dce512fd3d2397a58628f8264bd824194da76
2011-01-05 11:31:58 +09:00
Jean-Baptiste Queru 2912c654b4 Manual merge from gingerbread-plus-aosp
Change-Id: If048354f9b80bcaa1e97df5c31c3df80231eb612
2010-12-29 14:55:20 -08:00
Bruce Beare 1dea9bdc1a Don't use stale NDK libraries for IA
IA builds will break (due to the bionic _dso_handle bug) if stale libraries are
used. For now, just guard the defns against IA builds.

Change-Id: Ic9df6e0de78a0e221b95370ba6f01ce07714edde
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2010-12-27 12:26:16 -08:00
satok 54fe9e0e20 Suggest words with excessive chars out of proximity chars
Bug: 3273807

Change-Id: Ib8f48e562bcf4c2aac0ad5cb46809fd5f539a322
2010-12-13 17:44:14 +09:00
satok a3d78f606e Suggest words with transposed chars
Bug: 3193883

Change-Id: I884b669258bfc522bc04e14f22a7646164a4cac5
2010-12-10 18:34:23 +09:00
satok e07baa6fab Limit the suggestions with an excessive character by filtering proximity characters
Change-Id: Iad26dad545f1a431aa0fa53f99198b27defd03a3
ug: 3269482
2010-12-10 00:47:37 +09:00
satok aee09dc5fa Fix a bug that We can't suggest words with missing space if one of the words starts with a capitalized character.
Bug: 3268825
Change-Id: I0634a243ad1e45dd096b30824b463c366a2e7f0f
2010-12-09 21:41:26 +09:00
satok 662fe69ba2 Suggest words with missing space
Bug:  3193883

Change-Id: I8d25f3e1d4db10be733d85edfa4f55a094feef80
2010-12-09 14:26:27 +09:00
satok cdbbea735f Suggest excessive characters
bug: 3193883

Change-Id: Iea7a0fce7ce62d8779a7c7e4613d50db30d82b07
2010-12-08 16:56:06 +09:00
satok d299792368 Make no-recursive getWordRec
Change-Id: Id90f3ca86ef490834cefa92f0d6958b1289fc633
2010-12-07 16:45:32 +09:00
satok f5cded1c6c Fix a crash when MAX_WORD_LENGTH is too short.
Change-Id: Idcb5aa2685321b8d0ac7d846caecbd1c79e4dd77
2010-12-06 22:58:56 +09:00
satok 48e432ceb8 Breakdown getWordRec
Change-Id: I4fef02c227fb858334dbe2eabf2762d5b6e1d919
2010-12-06 18:45:48 +09:00
satok 683192684c Trim the flow of getWordRec
Change-Id: Ic0cfa64ee1e55682ca73681c585db6a5cb510900
2010-12-06 14:56:11 +09:00
satok cfb24365f9 Merge "Breakdown getWordRec" 2010-12-03 02:29:52 -08:00
satok 28bd03b9f5 Breakdown getWordRec
Change-Id: I8556efb1dd053eff9a9681971cbe1014abf0333f
2010-12-03 19:25:42 +09:00
Ken Wakasa a46683a47b Just code cleanup.
Change-Id: I796b47aa168b3b2cc29de65fc7dc5dab5a7f4b17
2010-12-03 17:13:04 +09:00
satok 715514d7dd Breakdown getWordRec and add comments
Change-Id: I88bad8a4a8177e3540b995b664c47b86d6904027
2010-12-03 10:01:09 +09:00
satok 18c28f431e Detach bigram functionarities from unigram_dictionary
Change-Id: Ie35164a5f293e5370885a1ba13d6ed7caf6000ec
2010-12-02 18:24:53 +09:00
satok e808e436cb Refactor: Move utility functions and no suggestion functions from unigram_dictionary.cpp to dictionary.cpp
Change-Id: I6f695e4f5852547d2c00de5ee54a650fef9accbe
2010-12-02 16:11:35 +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
satok d4952c8fe9 Move a logic for finding words with a missing character to the native code.
Change-Id: I58338643830ff4f9708f78a9c26f75c8bf2ebf45
2010-12-01 19:26:36 +09:00
satok 15dc33d9f6 Add an easy way to output native debug logs
Change-Id: Ieff2b8e60c5e7dedb7f86e17f7c37b349a912ab4
2010-12-01 15:56:17 +09:00
Ken Wakasa 9b195dda60 Revert https://android-git.corp.google.com/g/#change,63791 as library loading issue seems to have been fixed now.
bug: 2963855

Change-Id: Iafdfda801083f85126c443508755e3cc711fbf52
2010-09-03 22:44:52 +09:00
Amith Yamasani ca4e42785f Fix UnsatisfiedLinkError for Latin IME. Don't use old NDK version in a platform build.
Also added a clean step, since it's only a Makefile change.

Change-Id: Ide1684a5f34e99496e969edb8443dc4545b57306
2010-08-31 12:04:30 -07:00
satok 979f869096 DO NOT MERGE. Backport LatinIME from master to Gingerbread
TODO: Cleanup will follow.

Change-Id: I4a68ba9f2f55760aa24187f1f13fdfa8a0b70963
2010-08-20 14:37:03 +09:00
Dan Bornstein bf45d3619f For issue #2651381, allow library prelinking.
Change-Id: If7015f2fa5932f69807797ffcc496550d5cb1630
2010-05-05 09:38:52 -07: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