Commit Graph

193 Commits (9e713dd45c8b83b335fa31dea5e0fb3be2ec8d60)

Author SHA1 Message Date
satok 3c09bb18d9 Merge multiple words suggestions algorithm
Change-Id: I70d85b90ddaa28a41e9679f445bc14ef9ff50f16
2012-01-26 18:59:51 +09:00
satok 7409d151a1 Refactor words priority queue
Change-Id: I14b7ef39263ad2b1d5ec087bc80b7b8d7c30abe7
2012-01-26 16:13:25 +09:00
satok f8ce19c29d Merge "Cleanup unused code" 2012-01-25 22:12:52 -08:00
satok 1c03306994 Cleanup unused code
Change-Id: I6c840f9ed170919e48d1c576cd0a48777ad44030
2012-01-26 14:56:52 +09:00
satok 61b31a646e Merge "Do other error correction for the second word of two word correction" 2012-01-25 05:48:15 -08:00
satok 8330b488e9 Do other error correction for the second word of two word correction
result: I4e0b68a12190933f9

Change-Id: I98afce6fe4d5bde97392146d204370ba31a72566
2012-01-25 22:30:37 +09:00
Jean Chalard 0bfe359ee4 Add a test for auto-correction.
Fix two related subtle bugs:
- Stop singling out fat-finger-only corrections for rejection
  when touch coordinates are not available.
- Remove a racy check that would happen only in debug mode

Change-Id: Ic904f9b27c091ca6b369052c4e65a630bff81257
2012-01-25 19:29:40 +09:00
Jean-Baptiste Queru 11c41216f1 Merge 2577fca1
Change-Id: Ie2c9f6c2eafb59dff95db8954481ce49c87a6d44
2012-01-23 09:06:00 -08:00
satok bd6ccdd5f0 Clean up two word correction
Change-Id: I5cd2697d7f61b81aff0c249df01479d86ad0fba5
2012-01-23 15:35:03 +09:00
satok 54af64ae92 Two words error correction with other error correction for the first word
+1      26
-1       5
+2       0
-2       0
+3       0
-3       0
+4       9
-4      25
+5      20
-5      21
+6      13
-6       6
+7      15
-7      26

Change-Id: Iad682d417a6bb42b11ca6e60157698ca66fef3ff
2012-01-19 19:17:29 +09:00
Robert CH Chou bd1ed5b859 Make the JNI lib an optional module
Make it a user module will force it installed no matter the
IME is actually required by the product or not. Replace the
user by optional and add requiring the libjni_latinime by using
LOCAL_REQUIRED_MODULES

Change-Id: Ibfc37cf2e2391021d45538c7cea342894b56fbf8
2012-01-19 10:02:25 +08:00
satok 29dc80614b Prepair for advanced two words error correction
Change-Id: I4c8a21f0f6e349ddafd9b402583321a60855cfe8
2012-01-17 16:00:55 +09:00
satok a161a4afd6 Use edit distance for transposing correction
+1      73
-1       4
+2       0
-2       0
+3       0
-3       0
+4      11
-4      19
+5       9
-5       3
+6       2
-6      63
+7       2
-7       8

Change-Id: I269cd2386f451f8932e4e0ae66223e794fdfa862
2012-01-17 13:14:35 +09:00
Jean Chalard 82ddd16889 Stop avoiding adding what the user typed to candidates
There does not seem to be any reason other than a historical
one to avoid doing this, but it takes processing power and
makes things more complicated.

This has a very limited impact on regression tests:
5 -> 3 [He,           the]
5 -> 3 [An,           an]
5 -> 3 [Where,        where]
5 -> 3 [This,         this]
7 -> 1 [wAtch,        watch]
6 -> 4 [oveNs,        oceans]
5 -> 1 [Ahere,        Where]
7 -> 1 [Hast,         Hast]
7 -> 5 [bjp,          bill]
5 -> 1 [What,         What]
5 -> 3 [Sound,        So und]
7 -> 3 [causalities,  casualties]
7 -> 3 [discontentment, discontent]
7 -> 3 [irregardless, regardless]

5 -> 1 : 2
5 -> 3 : 5
6 -> 4 : 1
7 -> 1 : 2
7 -> 3 : 3
7 -> 5 : 1

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

Change-Id: I6407cf922f27bbd3992df11d63690e71fc61111b
2012-01-16 18:58:10 +09:00
satok 67e13976b7 Merge "Store suggestions for each input length for missing space algorithm etc." 2012-01-16 00:18:37 -08:00
satok 6ad15fcd15 Store suggestions for each input length for missing space algorithm etc.
Change-Id: Ief8f6ddd29e043744863e5b9be3a51a70987291c
2012-01-16 17:11:17 +09:00
Jean Chalard 4c0eca6e41 Read multi-byte char group counts
Change-Id: Idc62382f1c814e9bd1466c9f7dda1fcc8ba4137d
2012-01-16 15:59:33 +09:00
Jean Chalard 6d4198107b Remove a bunch of obsolete methods.
Change-Id: I218007bf411489d1d648fd9b8b408c5d27c41811
2012-01-16 15:19:47 +09:00
Jean Chalard 512c669fee Fix a native crash with shortcuts
Creation of the TerminalAttributes object failed to take into
account that there may be children on this node.

Change-Id: I8224a1a51532d1a40a8555f46425e3744388326b
2012-01-13 20:50:43 +09:00
satok 9fb6f47a6a New LOG lib
Change-Id: I977e7e10fa58c0a64ca0c3c7b5cb2272446e3efe
2012-01-13 18:04:15 +09:00
satok b960477952 Use placement new to construct the queue
Change-Id: I455f9954165bd4524f2883db7ea24a6fed3015f9
2012-01-13 17:32:55 +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
Jean Chalard b0c49b7684 Actually add shortcut targets to the suggestions (A4)
Change-Id: Ia6f551d36b2897863e7faf5143bc319522b0668e
2012-01-06 15:21:11 +09:00
Jean Chalard e1e5a3fa2f Merge "Fill in the format-specific shortcut reading methods (A3)" 2012-01-05 21:36:20 -08:00
Jean Chalard 8e464d41cc Fill in the format-specific shortcut reading methods (A3)
Change-Id: Ie5d8b344ed46873c92f3ef878a1e45017eb699c6
2012-01-06 14:09:54 +09:00
Ken Wakasa ecbf3f2cbc Merge "Fix indentations." 2012-01-05 19:29:22 -08:00
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