Commit Graph

981 Commits (83b094a4c899818855c16122e6036e79be29d56f)

Author SHA1 Message Date
Satoshi Kataoka 94885f572c remove invalid comparison
Change-Id: I162c478debe5897be057998bd22924ed487d01af
2012-12-03 18:15:06 +09:00
Ken Wakasa 17f71ca6bc Fix offdevice regression test build error
Change-Id: I97128108b3bd75c61069517c3f8ce68ecc7bf285
2012-11-30 19:32:45 +09:00
Satoshi Kataoka 16e9d343c4 Merge "Tweak beeline speed" 2012-11-30 02:08:55 -08:00
Satoshi Kataoka 6ae8dd4343 Tweak beeline speed
Change-Id: I77bbd5e1888281e838d87824dc04a574b1a7ecb7
2012-11-30 02:02:59 +09:00
Jean Chalard da439fa461 Merge "Add utilities to read header values." 2012-11-29 03:11:06 -08:00
Jean Chalard 22025c6a37 Add utilities to read header values.
Bug: 7540132
Change-Id: I19d85481135e79d8782f711da5cbb3a5a7bc06f8
2012-11-29 20:08:37 +09:00
Ken Wakasa 2a6f58d902 Prep for GCC 4.7
On Galaxy Nexus (./vendor/google/apps/LatinImeGoogle/tests/etc/run-profile.sh -g)

Before
==== test finished, terminate logcat =====
(0)  2506.11 (10.48%)
(1)  21289.22 (89.01%)
(2)  108.29 (0.45%)
(3)  0.00 (0.00%)
(4)  0.00 (0.00%)
(5)  0.00 (0.00%)
(6)  0.00 (0.00%)
(20) 0.00 (0.00%)
Total 23917.44 (sum of others 23903.62)

After
==== test finished, terminate logcat =====
(0)  2499.58 (10.98%)
(1)  20145.66 (88.51%)
(2)  103.17 (0.45%)
(3)  0.00 (0.00%)
(4)  0.00 (0.00%)
(5)  0.00 (0.00%)
(6)  0.00 (0.00%)
(20) 0.00 (0.00%)
Total 22761.98 (sum of others 22748.42)

Change-Id: I662cb361ff9205ef87d640c458b8473df7d54659
2012-11-27 20:11:29 +09:00
Ken Wakasa b543c9c1bc Fix liblog declaration in Makefile to make it more NDK-build friendly
Change-Id: I1459124b84e1db9df13700514f8029851bc21c97
2012-11-27 12:28:11 +09:00
Ken Wakasa 11bb2ffd4a Tidy up SORTED_CHAR_MAP a bit more for obvious Latin chars
Change-Id: Ia18eacf4ad3ea882e4ec3cdfebc7f662503660d9
2012-11-26 19:31:09 +09:00
Ken Wakasa 2d27ca6ce3 Update SORTED_CHAR_MAP[] in char_utils.cpp
Change-Id: I683793a0fd0ccf41f5a378275ef11def4e70ce76
2012-11-26 17:17:16 +09:00
Satoshi Kataoka 9af533538e Calculate point to point duration
Change-Id: I4e0cabdbc628658619b7a71dc66aa3bf8a5030b2
2012-11-22 17:03:09 +09:00
Jean Chalard 41a77f9e6e am 37fbcb0d: am 6d471258: am c9349db1: Merge "Add a constant for S_INT_MIN" into jb-mr1.1-dev
* commit '37fbcb0ddf2bf61f0e432534b671596b1b6f897e':
  Add a constant for S_INT_MIN
2012-11-20 19:41:28 -08:00
Jean Chalard 592f2b315f Add a constant for S_INT_MIN
This is necessary for I807ae4bd

Bug: 7491364
Change-Id: I46ee92a76eb65e80b64538d0300b718eac6a3ddb
2012-11-20 21:25:46 +09:00
Ken Wakasa 249a614ab7 Tentatively suppress -Winline for gcc 4.7
bug: 7584718
Change-Id: Ifcb7b6dbb5f0025fa3c44ef6023a95bd91452bc8
2012-11-20 10:27:36 +09:00
Ken Wakasa 97ff1714e2 Tidy up the base char map
Change-Id: I1c3119c5db35faaf73180f17a0888224e301c121
2012-11-19 00:24:45 +09:00
Satoshi Kataoka b5b434d867 Merge "Cleanup speed related code" 2012-11-16 02:46:12 -08:00
Satoshi Kataoka feec20a692 Cleanup speed related code
Change-Id: Id6ea99a9e28f20f3ac34b9bfdac1bf62fd7a9a5d
2012-11-16 19:44:14 +09:00
Ken Wakasa fe9ec6bc7d Remove unused variables
Change-Id: Ia5079368a1bc86ccdf0052445dc6945041c0abca
2012-11-16 19:28:56 +09:00
Satoshi Kataoka f25cc4405e Fix debug logs
Change-Id: Ie7dc32f28915df62a7c31bdaed38c0ad7a4b0f1c
2012-11-15 22:48:20 +09:00
Ken Wakasa 1ce96fecf5 Fix debug build error
Change-Id: Id18d72093a36d41859744f98238b3b761ddb667e
2012-11-15 19:14:36 +09:00
Jean Chalard b240c38ea2 Merge "[DO NOT MERGE] Correct a wrong base character in Russian" into jb-mr1.1-dev 2012-11-14 20:34:15 -08:00
Ken Wakasa aef0acdbe0 DO NOT MERGE - Fix an error in the base char table for LETTER L WITH STROKE
Cherrypick of I67a431d8

bug: 7539944
Change-Id: I0d1f9649f30c36b8e464944a5b881c2cb9c05ccf
2012-11-15 00:54:53 +09:00
Ken Wakasa e3fc8bc54d Fix an error in the base char table for LETTER L WITH STROKE
bug: 7539944
Change-Id: I67a431d8d60f3236fb7d616504c5d0cf2166f486
2012-11-14 20:07:16 +09:00
Jean Chalard 7c5b89a4d0 Correct a wrong base character in Russian
This is the master counterpart of I80cee4b2

Bug: 7516306
Change-Id: I1db4362bf12a98542c5f6fca3ae8010f16bd61a9
2012-11-14 17:09:41 +09:00
Jean Chalard f1d0b2b911 [DO NOT MERGE] Correct a wrong base character in Russian
Bug: 7516306
Change-Id: I80cee4b2b11e5bfa68c12923049cb612abd0bc7e
2012-11-14 15:50:28 +09:00
Ken Wakasa ee05f3f5b7 Cleanup basechars.cpp
Change-Id: I7b88876f60720182910fab97ef79f3d04fbd81f0
2012-11-10 19:38:26 +09:00
Ken Wakasa f775bf3b6f Fix a build error in x86 builds
Change-Id: I64a7c35d01540eb63f09cacddaab03f95729ed02
2012-11-07 07:52:34 +09:00
Ken Wakasa 5f2fa6b82c Tidy up visibility of members of BinaryFormat.
Change-Id: I38a00076b82de8e1a19209c67954fe01585f7943
2012-11-05 20:16:52 +09:00
Ken Wakasa 6e66349ed1 Adjust compiler warning options with the offdevice Makefile
Make use of AK_FORCE_INLINE for -Winline and better performance

Change-Id: If0016e2ef61c1fe007c83bb1a5133a6b6bde568e
2012-11-05 14:26:53 +09:00
Ken Wakasa 19d844c7a7 Follow up to Ic6af0c596374d936d2b9b31e626fb62bd265ce64
Tidy up inline functions with AK_FORCE_INLINE.  Moved back some inline methods to header files.

Change-Id: Ibd37b595666ebddda198d9237f19f6712653a8e8
2012-11-03 00:29:40 +09:00
Ken Wakasa 2c2f3a90d8 Add more compiler warning flags
Change-Id: Ic6af0c596374d936d2b9b31e626fb62bd265ce64
2012-11-02 18:29:26 +09:00
Ken Wakasa a323fa6746 A small code cleanup in geometry_utils.h
Change-Id: Ie9ff77c661693a1e21d0aa4cfc079bfbf3171f49
2012-11-02 12:25:19 +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 fd08cd498e Adjust C++ compiler warning flags with the off-device TRT
Change-Id: I031d191f8de99789fa0c000c01d61baffa2d3627
2012-10-29 18:22:53 +09:00
Jean Chalard 5f9e008d60 am 005f3768: am 25b4a14e: am d03e065b: Don\'t consider non-words for split word suggestion
* commit '005f3768400ce1d7bb29ef69151183084aceeb2c':
  Don't consider non-words for split word suggestion
2012-10-17 17:06:11 -07:00
Jean Chalard d03e065b86 Don't consider non-words for split word suggestion
Bug: 7368683
Change-Id: Iecd8348be788e5a749dafabdf7eddc4a14d901e0
2012-10-18 07:28:18 +09:00
Keisuke Kuroyanagi 350309aeb8 Evaluate score by alignNextKeyToPath for not in the dictionary word.
Change-Id: I68d30e734f8b4f629797d73d6b4745e967bdb09d
2012-10-12 19:46:23 +09:00
Keisuke Kuroyanagi 1e06a4d8e9 Improve gesture input scoring method 3.
Change-Id: I3142cb5ec922e661f0d7c1e1706de6015360b2ff
2012-10-12 13:55:30 +09:00
Keisuke Kuroyanagi ff74cc3e5e Improve gesture input scoring method 2.
Align next key to path bases its scoring method on probabilities.

Change-Id: I5247c965b92c0052bfdab8a9b1027bc86eb33218
2012-10-11 13:08:06 +09:00
Ken Wakasa 3873d36128 am 00f3d809: am a62a1926: am 471252b9: Merge "Fix a bug in multiple shortcut handling code." into jb-mr1-dev
* commit '00f3d8094733de407c9cd2669bf579a4d7740328':
  Fix a bug in multiple shortcut handling code.
2012-10-09 08:53:55 -07:00
Jean Chalard 516f9d6ea4 Fix a bug in multiple shortcut handling code.
Bug: 7301525
Change-Id: Ib38f5ab4b7e4f7996bccbc6830d46f52fd71c6f9
2012-10-09 20:24:13 +09:00
Keisuke Kuroyanagi 806eba4524 Improve gesture input scoring method 1.
Calculate probabilities for each points in advance.
It enables to input not in the dictionary word.

Change-Id: I8d84642045dc3b8ad49719d9b70dda14457995cd
2012-10-09 19:58:20 +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
Satoshi Kataoka 448e732272 Follow up change for I5f166a738f6e84a1b807be
Bug: 7283955
Change-Id: Iec716d75e7c8a727b198688f44ef4a8cd1255ec1
2012-10-05 21:39:28 +09:00
Satoshi Kataoka 441b3e5a90 Fix addtional proximity correction
Change-Id: I3125764b98af28ce423dc12cbf0dac321ef22386
2012-10-05 20:54:57 +09:00
Ken Wakasa 5150e154f0 Cleanups in LatinIME native source code
Change-Id: I9b5e57583deb2d0c980e66c3dfbfd1e12734bc8e
2012-09-27 19:23:38 +09:00
Tom Ouyang 4d1f3d11db Merge "Make gestures work correctly on keyboards with accented keys" into jb-mr1-dev 2012-09-26 22:50:50 -07:00
Tom Ouyang f34ec5aa95 Make gestures work correctly on keyboards with accented keys
Examples: Spanish, Russian

Bug: 7225962

Change-Id: I6887bc6d81b84e4a73a74de679b955f7abf0ba4f
2012-09-25 19:36:44 -07:00
Tom Ouyang edd5b7365f Fix lower case conversion bug for some characters
Bug: 7232296
Change-Id: Iaf3f6be55f1bdc2294533938bb54fedcf25fb0cb
2012-09-25 19:30:09 -07:00
Keisuke Kuroyanagi 4d75fe9bca FIX: Wrong way to gesture speed calculation.
This is a follow-up to bug: 7165929

Change-Id: I7ad2bbd1f6ef1f74ea8770585f584d4232cb40b5
2012-09-25 13:03:56 +09:00
Satoshi Kataoka 089c7d43c7 Merge "Use touch position correction in the geometric input" into jb-mr1-dev 2012-09-24 20:27:14 -07:00
Satoshi Kataoka 0edab9d2fc Use touch position correction in the geometric input
bug: 7108161

Change-Id: I72d51bcfa26f241bec8fa907d64384e7eebe5c5e
2012-09-24 21:58:16 +09:00
Keisuke Kuroyanagi 2866106959 Using relative speed instead of duration rate for gesture input distance calculation.
bug: 7165929

Change-Id: I94fe18c57bf19fe58b5050f2c7b3085c6cba6fa8
2012-09-24 20:02:57 +09:00
Tom Ouyang a811938d40 Refine gesture point duration calcuation to be more localized
Bug: 7165929
Change-Id: I3bb1c2622338023626fe4a879e43a86ac8fd0707
2012-09-19 10:54:52 -07:00
Keisuke Kuroyanagi 41f12ee27b Simplify distance calculating method for gesture input.
Change-Id: Ic466b787b6cc60e6d23b67c8a7f84ad4d0b521c7
2012-09-19 15:46:00 +09:00
Ken Wakasa 246d227c5d Fix offdevice full debug build crash
Change-Id: I7640863738d1548f7d9cf4b95c4a0d896eb667d7
2012-09-19 01:23:45 +09:00
Ken Wakasa 764dd71203 Stop using GNU extension in-class initializer for non-integral members
Change-Id: Ibc8f1c67aba91bdfeceef763ac82d61cc8d2efe1
2012-09-16 01:23:56 +09:00
Ken Wakasa 03dc8fe141 Use more int values in ProximityInfoState::getPointScore()
Change-Id: If2f8ce3c7211d28161d64acbad10e3b2abb8e634
2012-09-14 20:35:20 +09:00
Keisuke Kuroyanagi 1cd7ca9919 Using isSkippableChar instead of '\'' and '-'.
Change-Id: I295a72b683b2ebc28a006baa66baf7e1b97100eb
2012-09-14 18:03:10 +09:00
Tom Ouyang 0e301bdc29 Merge "Generalize incremental recognition to non-Latin languages" into jb-mr1-dev 2012-09-13 02:26:54 -07:00
Satoshi Kataoka f4554d8b10 Fix an issue on FP calculation diff of osx and linux
sugar on mac

result_type=1 expected=<1093> actual=<1047>
result_type=4 expected=<730> actual=<698>
result_type=5 expected=<177> actual=<173>

sugar on linux

result_type=1 expected=<1093> actual=<1047>
result_type=4 expected=<730> actual=<698>
result_type=5 expected=<177> actual=<173>

Change-Id: I4cd39becb0de4076dd37d870adda6463a96de424
2012-09-13 15:13:02 +09:00
Tom Ouyang 132168519e Generalize incremental recognition to non-Latin languages
Bug: 7043019
Change-Id: I9a26f74177d4f8f03b7b65e2e255e4087d5ef8d9
2012-09-12 20:09:18 -07:00
Satoshi Kataoka 9182daf98c Output detailed log in ProximityInfoState
Change-Id: If6a254e2a116d1b6812f448d38139b7656168be6
2012-09-12 12:19:47 +09:00
Satoshi Kataoka 040f1c50bf Merge "Debug flag" into jb-mr1-dev 2012-09-11 01:08:36 -07:00
Satoshi Kataoka 952ec4977d Debug flag
Change-Id: Ied846162fd5052a33fd3c8596e73dfdd48c446ee
2012-09-11 17:04:10 +09:00
Ken Wakasa 41c2765b44 Remove an unused file.
Change-Id: I422d27aae063c4eb17d0e00277cf4492e5b4986e
2012-09-11 14:55:08 +09:00
Satoshi Kataoka d45c0faec3 Add debug utils for geometric input
Change-Id: If01bd5593cfc7428572aa43253d6d72409ac6b8e
2012-09-10 19:36:38 +09:00
Satoshi Kataoka 23a57eafbb Add DEBUG_GEO_FULL flag
Change-Id: Ibf8eb5fc2056fd138e9e6af1c13fbc065b44a6f1
2012-09-10 17:59:17 +09:00
Ken Wakasa 5964d4e607 Variable type cleanups
Change-Id: I5d892494200c09f8cb8a46c327c29bbd63eab093
2012-09-10 16:49:36 +09:00
Satoshi Kataoka 1c8fc83dce Fix backtrace tool
Change-Id: Icc0e8ad94331e62a569183fa05ada335dcc5e26a
2012-09-10 12:54:42 +09:00
Keisuke Kuroyanagi 096f35ff4b Fix the condition of continuation for gesture input and make ProximityInfoState incremental.
Change-Id: I69ad295b660e0c4ba5bb29c8d3d8805291ec43a8
2012-09-07 21:04:12 +09:00
Ken Wakasa b85df9d5ef Merge "Fix bug of sampling and become to save corner points for geometric input." into jb-mr1-dev 2012-09-07 00:03:44 -07:00
Keisuke Kuroyanagi aba26e4f63 Fix bug of sampling and become to save corner points for geometric input.
Change-Id: I6278a1f7fdcc897c1d6c8d4c8e53730087cc2e5e
2012-09-07 16:02:18 +09:00
Ken Wakasa 7914e907b5 Add comments for meaningless lines
Change-Id: I20ebe246f6980fd3054c2c7e98b5150eaabbcc77
2012-09-07 08:55:16 +09:00
Satoshi Kataoka 3051966b8c Merge "The processNextKey becomes to use actual average duration." into jb-mr1-dev 2012-09-06 05:33:56 -07:00
Keisuke Kuroyanagi 3811a28ddc The processNextKey becomes to use actual average duration.
Change-Id: I35d8915eb113e513ce8c9f979dbdb8b0b013db50
2012-09-06 20:55:45 +09:00
Jean Chalard 18ebba3a66 Fix one-off bugs reported by Valgrind
Bug: 7108990
Change-Id: I40ba30f50a26b65bcac905fc005ad6bb9cb034cc
2012-09-06 20:37:55 +09:00
Satoshi Kataoka cde005c05e Fix apostrophe issue
Bug: 7109083
Change-Id: I47275b1bd5fae023981cae502628f5a8284f49ce
2012-09-05 20:32:35 +09:00
Tom Ouyang 8c220a0aa2 Fix bug that can cause unexpected off-keyboard chars to appear as suggestions.
Bug: 7050587
Change-Id: I59ea659a411ab966380fadd3f7f9df3f0866192f
2012-09-04 22:22:43 -07:00
Ken Wakasa d86d313b31 Fix variable type
Change-Id: Ifbee00119ff9801d480ca97bf2aedbb25be25bf4
2012-09-04 20:29:38 +09:00
Keisuke Kuroyanagi 95a49a527a Restricting children for gesture input.
Change-Id: Id2607ef48e67685b0a71b8c628663eceb6b6fe95
2012-09-04 17:00:24 +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
Satoshi Kataoka 1a397ececf Merge "Add backtrace tool" into jb-mr1-dev 2012-09-03 05:00:33 -07:00
Satoshi Kataoka 5540acb676 Add backtrace tool
Change-Id: I2795bedf8d8fd545ae411e74b65770d520c715c4
2012-09-03 20:59:05 +09:00
Keisuke Kuroyanagi d9c10b1979 Smart sampling for geometric inputs.
Gesture:
+1     227
-1     131
+2       0
-2       0
+3       0
-3       0
+4     261
-4     167
+5      73
-5     263
+6       0
-6       0
+7       0
-7       0
Gesture incremental:
+1     228
-1     127
+2       0
-2       0
+3       0
-3       0
+4     269
-4     167
+5      68
-5     271
+6       0
-6       0
+7       0
-7       0

On device:
0: all, 1:initialize

(0)  56285.82 (99.99%)
(1)  3886.59 (6.90%)
->
(0)  42795.78 (99.98%)
(1)  3916.80 (9.15%)

Change-Id: I3eed99cbd75b22fd2d8b5404a4f7e0972f284a85
2012-09-03 17:50:46 +09:00
Jean Chalard 72b1c93941 Reinstate the shortcut-only attribute
Also add the blacklist attribute

Bug: 7005742
Bug: 2704000
Change-Id: Icbe60bdf25bfb098d9e3f20870be30d6aef07c9d
2012-08-31 22:11:52 +09:00
Jean Chalard 07aea409ba Fix a bug giving broken characters
Bug: 7050587

Change-Id: I54ff7e680c228e78236567bb79832a43086b70c6
2012-08-29 20:13:30 +09:00
Satoshi Kataoka 95c272596d Merge "Step 40-A Cleanup touch path" into jb-mr1-dev 2012-08-27 01:02:25 -07:00
Satoshi Kataoka 923a6a31ae Merge "Revert "Change the definition of NOT_A_CHARACTER"" into jb-mr1-dev 2012-08-27 00:58:25 -07:00
Satoshi Kataoka fba0019ee2 Revert "Change the definition of NOT_A_CHARACTER"
This reverts commit a31d180cc3

Change-Id: Ifd753d2d2ac5092dd47e22a8829c1cc416d99ea5
2012-08-27 00:53:48 -07:00
Satoshi Kataoka 37b153e205 Step 40-A Cleanup touch path
Change-Id: Id22c5ae6afbf040227dc47153b0849bbe38ff66f
2012-08-27 16:30:59 +09:00
Satoshi Kataoka 76951d8e5a Merge "Change the definition of NOT_A_CHARACTER" into jb-mr1-dev 2012-08-26 20:32:28 -07:00
Satoshi Kataoka a31d180cc3 Change the definition of NOT_A_CHARACTER
Change-Id: I519b1e5478abefb1c18cb6e3ab2862be045583de
2012-08-27 12:27:53 +09:00
Ken Wakasa 297f239196 Try using hash_map
Change-Id: Icac47d03e1355e83b4dd3b0e3d7739f1dd5a3b98
2012-08-26 18:39:15 +09:00
Ken Wakasa 0d63e6ea84 Fix initialize order.
Change-Id: I2686540bc6ed858e6d7ddc05a962c93714b94e1d
2012-08-25 00:03:16 +09:00
Ken Wakasa 162c211b44 Address warnings by -Weffc++
Change-Id: Icd60f1ed2ace0b975d8785bc8a386c7944846075
2012-08-24 23:50:39 +09:00
Satoshi Kataoka 08f00cf55f Step 39-A Cleanup proximity_info_state
Change-Id: I6070929f310f7dc6359d12d62e81d2e2e032c38e
2012-08-24 17:52:36 +09:00
Satoshi Kataoka 233aad5e5c Refactor
Change-Id: I907126034d9cc821df8353a78f713638dfc322d6
2012-08-24 14:45:54 +09:00
Satoshi Kataoka 687a244703 Step 38-A Cleanup touch path
Change-Id: I9bfac98b9ac10f3812290f21673c4002241eae01
2012-08-23 18:15:43 +09:00
Ken Wakasa de8a9a8227 Small cleanups
Change-Id: Ib66507b8934bc8019a762d24d5311411e044ec84
2012-08-17 13:06:28 +09:00
Jean Chalard 8af8c15c6b Allow one-character suggestions.
Bug: 6906525
Change-Id: I62117653ac1281f825afc4ebb30f7e786902b750
2012-08-17 11:10:58 +09:00
Jean Chalard 3083b4b77d Merge "Fix a debug method" into jb-mr1-dev 2012-08-16 17:59:11 -07:00
Jean Chalard cc1062cfd0 Fix a debug method
Change-Id: Icf78fb0d5f7caea78f053fffd1ecd4289629964a
2012-08-17 09:24:45 +09:00
Ken Wakasa fee0ac60b1 Cleanup and fix method visibility.
Change-Id: Ia9e8c69da21ce22bf674ec6c7b2536008a360ea3
2012-08-16 19:34:02 +09:00
Satoshi Kataoka f6be15cffe Step 30-A Constize gesture
Change-Id: I6c0b89d96532dc1c8ca71bb730ba22de5592ec67
2012-08-15 17:21:53 +09:00
Ying Wang 50eadf7985 Retire LOCAL_NDK_VERSION.
Bug: 6932421
Change-Id: I6cb8cdb3869c9c1c3d908f9c182e6f634ae76322
2012-08-14 12:07:28 -07: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
Satoshi Kataoka e7398cdb2b Step 26-A Cleanup geometory_utils
Change-Id: I839c498c85009a5d6428a71f121a2906fd667db8
2012-08-14 03:39:14 +09:00
Jean Chalard 8c12bd87cc Merge "Tag the whitelisted entries in native code." into jb-mr1-dev 2012-08-13 03:24:47 -07:00
Ken Wakasa 0fb950858e Cleanups in geometry_utils.h
Change-Id: Ic051703e5b67adfc62753ebd9ab254296719c6e9
2012-08-13 17:47:00 +09:00
Jean Chalard b14fc88e48 Tag the whitelisted entries in native code.
Since this is already used in Java land, this actually does
activate the whitelist path, and the code is now fully
functional. We still have to remove the old whitelist resource
and to compile the dictionary that includes the whitelist.

Bug: 6906525
Change-Id: Iacde5313e303b9ed792940efaf6bcfa4ee1317bd
2012-08-13 16:35:59 +09:00
Satoshi Kataoka f144cc61cc Merge "Step 24-A remove setdict" into jb-mr1-dev 2012-08-13 00:20:12 -07:00
Satoshi Kataoka ddb12ea63a Step 24-A remove setdict
Change-Id: Iab28bf0fd785b9e81fc86837e64a1ef2e315a229
2012-08-13 14:32:17 +09:00
Ken Wakasa 507113a1bb Fix typo in include guard macro, and some cleanups.
Change-Id: I455f6a52667b1c6ae5eb9f58b3494dd87eb2c3f5
2012-08-13 11:51:37 +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
satok 847c8dfe17 Fix JNI
Change-Id: If134baf52e78fbe18b78611a23870f5d10c80955
2012-08-11 13:54:01 +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
Satoshi Kataoka f6c2200890 Workaround to stop init dict traverse session
Change-Id: I3d46c54a96a9fc0359ef75b9d2f8590b44164a8b
2012-08-10 21:07:53 +09:00
Satoshi Kataoka 0f4de30e58 Fix a bug on jni of DicTraverseSession
Change-Id: Ieeac36cbad9a99d15911f2e6e2e841cae38ecb9b
2012-08-10 20:13:57 +09:00
Satoshi Kataoka 88dfeb30bf step 23-A remove unused method
Change-Id: I382c654fd30aca1a3277a186ee25fc946449c639
2012-08-10 19:35:04 +09:00
Satoshi Kataoka c14d55a289 Merge "Step 22-A implement session" into jb-mr1-dev 2012-08-10 02:06:05 -07:00
Satoshi Kataoka 6b4a1d79eb Step 22-A implement session
Change-Id: Ida63382ffb756e20cc5b17c2702d2895e7e6e889
2012-08-10 18:06:04 +09:00
Jean Chalard dc2fb6bc6d Merge "Pass the type from native code all the way to Java." into jb-mr1-dev 2012-08-10 01:26:59 -07:00
Jean Chalard 926ef06a1e Pass the type from native code all the way to Java.
Bug: 6906525
Change-Id: I057390d47a223450e22d8338509e22c28fc0d5f6
2012-08-10 15:51:55 +09:00
Satoshi Kataoka e9f3e182e4 Add arguments for dic traverse session
Change-Id: I8776ad528eeea9a5fc4dcf394ca13bb80c04fb6d
2012-08-10 12:34:00 +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
Ken Wakasa 9e0c711a62 Stop using STL string in additional_proximity_chars
Change-Id: Ic016fd5983b8855b0fd9506a17b205db86af3a2f
2012-08-09 22:28:57 +09:00
Ken Wakasa 805ac949d2 Fix string.compare() logic. It happens to be working luckily.
Change-Id: I262c6d5779124e5b09ad1a66ca3c9ddb2fc6d7d5
2012-08-09 19:36:58 +09:00
Ken Wakasa 71b379df51 Merge "Use GetStringUTFRegion" into jb-mr1-dev 2012-08-09 02:54:38 -07:00
Satoshi Kataoka 9d29871605 Add reset method for dic travserse session
Change-Id: Ia3dd924f92549da2cf8302ef77c629902d4f275b
2012-08-09 17:49:19 +09:00
Ken Wakasa 0151145924 Use GetStringUTFRegion
Change-Id: I56ad66af4ee42ed32a6fd909a9a34d601874783a
2012-08-09 16:05:54 +09:00
Satoshi Kataoka 60d4961f34 Merge "Pass traverse session" into jb-mr1-dev 2012-08-08 07:50:44 -07:00
Satoshi Kataoka 9127811493 Pass traverse session
Change-Id: I84bfaaa406e3f51421c08a7ee8f9576ebdba54d4
2012-08-08 23:30:31 +09:00
Ken Wakasa bb005f787f Start using JNI's Get<Type>ArrayRegion()
Change-Id: Iaa1014efe639dd79540835b0d5201093dbd8dab8
2012-08-08 21:06:52 +09:00
Satoshi Kataoka 181567f9c7 Merge "Add traverse session" into jb-mr1-dev 2012-08-08 04:40:36 -07:00
Satoshi Kataoka c4e4dfe17d Add traverse session
Bug: 6942265

Change-Id: I384cf701f5ee44c4b1037e5b8ddfa3d570286f55
2012-08-08 20:39:43 +09:00
Ken Wakasa 9b392364b7 Cleanup headers.
Change-Id: Ied1bedb8ba5fae590987ea23bed32f4db1a60d77
2012-08-08 17:12:09 +09:00
Ken Wakasa e2a6badf60 Merge "Show results in the native code." into jb-mr1-dev 2012-08-05 19:34:23 -07:00
Satoshi Kataoka 586b0ca1a2 Show results in the native code.
Change-Id: I712ba49cf4a89a36836fbf49cd72e7eef218e61f
2012-08-06 11:26:13 +09:00
Ken Wakasa 1d8a246e39 Header cleanup
Change-Id: I1aa91708d0de01ca3e84e69ec8d3a3832c386ca8
2012-08-03 18:37:58 +09:00
Ken Wakasa 77e8e81ad9 Header cleanup. Moved a couple of functions from .h to .cpp.
Change-Id: Ifd12a7632f75395bd0ef5e394d5c2abd6cbe28c6
2012-08-02 20:19:39 +09:00
Ken Wakasa 74fb957e49 Header cleanup
Change-Id: Idaf19de3dc75367d49bc01e84e5a9f057c1f8dba
2012-08-01 18:46:07 +09:00
Jean Chalard 195605084e Move flags belonging to BinaryFormat to the right place.
These masks and flags are constants that are an integral part
of the format. They belong in BinaryFormat and have nothing to
do in UnigramDictionary.
This needs I6751dda4 to not break the build

Bug: 6429243
Change-Id: Ic1c842b3245f7fdc25aa8d1459c5bb07b262e265
2012-08-01 00:23:52 +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 e3f26dd21e Fix native debug log
Change-Id: If19f808522a5a35fa06c2825fcd0d92e6e4a0631
2012-07-27 18:06:06 +09:00
Ken Wakasa d3e10bb694 Build LatinIME with NDK r8
Change-Id: I0e233f9561f4bb4dee2311b98e7b0a1cd9cd5061
2012-07-27 09:39:21 +09:00
Ken Wakasa 0bbb917d12 Cosmetic fixes and style fixes
Change-Id: I69c42ff945cdf0d5205c6ca61d6861a0479492dc
2012-07-25 18:56:51 +09:00
Tom Ouyang eb2fe2ab10 Add wrapper for incremental decoder.
Change-Id: Ie11e2b83c2602c0d5a2739a7d4f4994f80d7e298
2012-07-19 17:50:40 +09:00
Jean Chalard c7387a4fd0 Add values for suggestion types (A120)
Also, use it in getBigrams.

Change-Id: Ia0be9b57d1b7effcd8a936e01e957d1195b39c68
2012-07-12 19:21:44 +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 3b57631b60 Resolve a TODO: bury some implementation detail in native (A110)
The fact that prediction does not accept a null argument is an
implementation detail, it should not be visible to Java code.

Change-Id: I3a156b323b6db9353de898d33f3f7c81751cecb1
2012-07-12 14:30:30 +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 1a69ad5a10 Remove a constant parameter (A105)
Change-Id: I8a09fa2f0649880c943364699a07652e47dede22
2012-07-12 11:27:55 +09:00
Jean Chalard b7d7c5a369 Make a constant really constant (A104)
Change-Id: Ied1f9f96a574b1e6a8ee0a71bfb1604d9c962e1c
2012-07-12 11:16:30 +09:00
Ken Wakasa ea92b7b987 Avoid LatinIME crash
bug: 6790620

Change-Id: I6fd271c6f79790cfb9d875b052854eab60a30b7f
2012-07-10 09:57:04 +09:00
Ying Wang 0493bb2f10 Use TARGET_BUILD_APPS to distinguish
It's in a full build or just an unbundled build.
Bug: 6790620

Change-Id: Ifa2df86462747acb8b561ebab879e03b1201b4f7
2012-07-09 17:47:31 -07:00
Ken Wakasa f52c1c50ef Revert "Fix the build"
This reverts commit 48a436081f.
2012-07-06 15:53:51 +09:00
Ken Wakasa 48a436081f Fix the build
Change-Id: Iff324c705b46cfae27ea9b6b8dc8b0a0d56a193d
2012-07-06 15:35:13 +09:00
Ken Wakasa c646102b94 Update Makefile of LatinIME native code for the unbundled build
Change-Id: I117e2429c5f5e75a6ffe84b5869afb2e033f2b2d
2012-07-06 15:17:11 +09:00
Jean Chalard e9a86e2cdb Search bigrams for the lower case version of the word (A46)
...if there aren't any for the exact case version.

Bug: 6752830
Change-Id: I2737148b01ba04a64febe009ceb2ef53c265d224
2012-07-04 20:12:58 +09:00
Satoshi Kataoka deb0987274 Cleanup gesture code overlay
Change-Id: I6ab1462f62b2d53a157494d27342a832ec1f15f7
2012-07-04 12:43:36 +09:00
Ken Wakasa 0336ec4e12 Reorganize LatinIME native Makefile a bit more
Change-Id: Iabb6caa620cb587110a3d88ce7129ed978eea83a
2012-07-03 00:11:03 +09:00
Ken Wakasa 8658e552f3 Makefile and source code structure update for LatinIME AOSP build
Change-Id: Ia2ab54651ef96521fce01fe4755147909b818803
2012-07-02 20:20:42 +09:00
Satoshi Kataoka 737c87a5f1 Merge "Accept external debug flag in native code" 2012-06-28 22:56:04 -07:00
Satoshi Kataoka 6b8e79bc25 Merge "Add a new define for gesture" 2012-06-28 21:03:18 -07:00
Satoshi Kataoka 3ffaf39281 Accept external debug flag in native code
Change-Id: I762fd9025ffd6518daf42903875d6ca0a5389ff4
2012-06-29 12:54:36 +09:00
Ken Wakasa 8fcd7694ae Update LatinIME native Makefile for gesture code
Also, a small clean up in the proguard.flags file

Change-Id: I860034c51a2abf448f7ecc250ed35687b1f1dd82
2012-06-29 00:06:14 +09:00
Satoshi Kataoka 712e02fba7 Add a new define for gesture
Change-Id: I6e0d8de75e129a6d1a33f7c7d5f5fa8c11dd2006
2012-06-28 15:13:57 +09:00
Jean Chalard a238e393b9 Merge "Cleanup the dictionary type." 2012-06-27 01:55:45 -07:00
Satoshi Kataoka 2f6817e567 Add skeleton implementations for gesture
Change-Id: I169034eba2001b98bad8f8a05372426c3ff8774e
2012-06-27 17:34:06 +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 efb63246c2 Change native functions' interface for gesture
Change-Id: I106a858f0be7452dd89f425805a6f72aa88c3f65
2012-06-27 16:22:39 +09:00
Satoshi Kataoka 91eb4d898e Add skeleton classes for gesture
Change-Id: I6ada110a934b0dafc57d0dcd87723275fa733548
2012-06-26 17:33:03 +09:00
Satoshi Kataoka 7368009799 Change JNI for Gesture
Change-Id: I774a0052038d16677f60f7efa11fd266cb5f3088
2012-06-25 18:54:37 +09:00
satok b1ed1d47ac Make native bigram dictionary const
Change-Id: Id883f2d69483c9234877ad42446a582258e1cf91
2012-06-14 18:01:27 -07:00
satok 1bc038c5e4 Move correction state to stack memory
*Before
(0)  13.18 (0.01%)
(1)  93025.41 (62.06%)
(2)  10.75 (0.01%)
(3)  10.50 (0.01%)
(4)  117.50 (0.08%)
(5)  55678.98 (37.14%)
(6)  9.09 (0.01%)
(20) 883.84 (0.59%)
Total 149898.24 (sum of others 149749.25)

*After
(0)  17.41 (0.01%)
(1)  92673.41 (61.95%)
(2)  10.62 (0.01%)
(3)  10.37 (0.01%)
(4)  120.96 (0.08%)
(5)  55741.18 (37.26%)
(6)  11.01 (0.01%)
(20) 862.72 (0.58%)
Total 149595.52 (sum of others 149447.68)

Change-Id: Ia5a25a544fc388e4dab1e08d8f78d5117b249cf3
2012-06-14 15:57:28 -07:00
satok 1035bc990d Fix debug build
Change-Id: I48a87967ac741455502ac1a18465ae6ed7ef0d12
2012-06-13 16:07:54 -07:00
Ken Wakasa e7b34b9f86 Add NativeUtils.powf()
Change-Id: I0339f39d49bc6390d098017f32d92c776974e03e
2012-06-08 20:46:19 +09:00
Satoshi Kataoka 6bc051d291 Refactor step3: const unigram_dictionary
- make all functions in unigram_dictionary const

Change-Id: I94a64865aa793435e6c81890e68d999f6374074e
2012-06-08 20:04:36 +09:00
Satoshi Kataoka 4a3db7057f refactor native step 2
- proximity_info is now stateless

Change-Id: I62725bfe05b161fa8fc050ea6b50867e10a354e2
2012-06-08 18:14:49 +09:00
Satoshi Kataoka 3e8c58f68d Separate state from proximity_info step1
Bug: 6548943

Change-Id: I7b4fbe20615a28151a74875be43b9f4a20e0dce9
2012-06-07 13:35:34 +09:00
Satoshi Kataoka 02963c4032 am fb3fdf15: Merge "Enhance the safety net in multiple word suggestions" into jb-dev
* commit 'fb3fdf15040cb67c311047dea0144fa5aa071185':
  Enhance the safety net in multiple word suggestions
2012-05-31 01:14:57 -07:00
Satoshi Kataoka 67e3cc8488 Enhance the safety net in multiple word suggestions
Bug: 6576793

Change-Id: I97100b482d3cf4e1b417c197b5d1e971a72b998d
2012-05-31 17:07:31 +09:00
Satoshi Kataoka d8096b1a12 am 6cbe204f: Fix the performance issue on suggesting aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
* commit '6cbe204fce109fab652da15f4c8ea1ae35fca3e7':
  Fix the performance issue on suggesting aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2012-05-30 02:50:29 -07:00
Satoshi Kataoka 6cbe204fce Fix the performance issue on suggesting aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Bug: 6576793

Change-Id: I46f56654cd25dc28668ad75ac71e0e3beb8cdcf3
2012-05-30 18:43:23 +09:00
Jean Chalard 987aa1536b am 62cd919d: Remove a compiler warning.
* commit '62cd919dca9ef85cdd045b539b3ef85e921c6e4c':
  Remove a compiler warning.
2012-05-29 22:54:21 -07:00
Jean Chalard 62cd919dca Remove a compiler warning.
Change-Id: Id2c949d03a2e38787cbf3c8f99313bcfe8610a1f
2012-05-30 14:46:43 +09:00
Satoshi Kataoka 40ab25cab0 am 51705efc: Merge "Add a JNI to get the frequency" into jb-dev
* commit '51705efc96c1c555cf9e0f557ea8cdc1c1c97781':
  Add a JNI to get the frequency
2012-05-29 01:30:26 -07:00
Satoshi Kataoka 51705efc96 Merge "Add a JNI to get the frequency" into jb-dev 2012-05-29 01:27:59 -07:00
Satoshi Kataoka 2f854e170c Add a JNI to get the frequency
Bug: 4192129
Change-Id: I3f220f5a10114d4eb23956148076cf76220bda0f
2012-05-29 17:21:59 +09:00
Jean Chalard e3864d429e am b074dfea: Merge "Add a comment on a caveat for future reference." into jb-dev
* commit 'b074dfead504fba4039e4eaaded07c10244ff292':
  Add a comment on a caveat for future reference.
2012-05-29 00:59:14 -07:00
Jean Chalard 46fe49fc05 Add a comment on a caveat for future reference.
Change-Id: I328a0cd4346275aac960e1369bf370688a004e11
2012-05-29 16:50:25 +09:00
Jean Chalard 18f650172d am bfba64bc: Merge "Compute the correct frequency for bigram prediction" into jb-dev
* commit 'bfba64bcfd70ce8e3932d52c4b9f3182d33e1f55':
  Compute the correct frequency for bigram prediction
2012-05-29 00:38:16 -07:00
Jean Chalard e382bcc39a am 8f9f55dd: Merge "Fix a bug where the bigram freq would be underevaluated" into jb-dev
* commit '8f9f55dd9d27f6c759c12416c872138b9b4661dc':
  Fix a bug where the bigram freq would be underevaluated
2012-05-29 00:25:50 -07:00
Jean Chalard c941bc9bd3 am 22cf6958: Merge "Split a method to reconstruct freq from uni/bi freq" into jb-dev
* commit '22cf695834009929a6c0fbcd75a9ff56efa04d83':
  Split a method to reconstruct freq from uni/bi freq
2012-05-29 00:25:49 -07:00
Jean Chalard ca134ccc2a am bf61bba3: Merge "Fix two small possible bugs." into jb-dev
* commit 'bf61bba35feda09a2ad08475481ce042879ff5bb':
  Fix two small possible bugs.
2012-05-29 00:25:47 -07:00
Jean Chalard e308459531 Compute the correct frequency for bigram prediction
Change-Id: I3196f48a0ca2ed5e94f430254d58e65d341398c8
2012-05-29 16:22:46 +09:00
Jean Chalard cb99376307 Fix a bug where the bigram freq would be underevaluated
The difference in score is not large, but it's still a bug

Change-Id: Ie22c2b6e1206e829c1c8af096469df05af14d47b
2012-05-29 16:04:07 +09:00
Jean Chalard 19ebd93646 Split a method to reconstruct freq from uni/bi freq
This has no impact at all on the logic.

Change-Id: I3788c8335cc193433ad9a7512b211a49bb2ffb02
2012-05-29 16:00:25 +09:00
Jean Chalard 402b057050 Fix two small possible bugs.
None of these had any real impact, but they were potential
liabilities for the future

Change-Id: I2de581f8b638e423d47a6d99b1a3c96af4c6150d
2012-05-29 15:56:30 +09:00
Ken Wakasa 7d81f31871 am 7b1570e6: Merge "Cleanup Makefiles of LatinIME" into jb-dev
* commit '7b1570e60c2e04fe7d132df758476b34685eb709':
  Cleanup Makefiles of LatinIME
2012-05-23 20:22:04 -07:00
Ken Wakasa dd58065733 Cleanup Makefiles of LatinIME
Change-Id: Id4c6700bc045825eb64fb2b7ae57f23a6211441d
2012-05-24 12:08:59 +09:00
satok 074e8c9206 am a0ac31fc: Fix the issue on multiple words suggestion
* commit 'a0ac31fcaa01c21592a6e7af243c14dada65cf3e':
  Fix the issue on multiple words suggestion
2012-05-23 05:06:08 -07:00
satok a0ac31fcaa Fix the issue on multiple words suggestion
Bug: 6509844
Change-Id: I823074a2b29befc3e60c63699ab4dc7719105c63
2012-05-23 20:40:59 +09:00
Jean Chalard 7557d3c6f3 am bc77adef: Merge "Return the bigram frequency if available." into jb-dev
* commit 'bc77adefbb0305c5ec0e41ab01e3a085c47c21eb':
  Return the bigram frequency if available.
2012-05-17 03:31:15 -07:00
Jean Chalard bc77adefbb Merge "Return the bigram frequency if available." into jb-dev 2012-05-17 03:15:40 -07:00
Jean-Baptiste Queru cd7c41352f Fix build
Change-Id: I799811aa3afb59bba2e4086a063f5da03669bba3
2012-05-16 16:56:11 -07:00
Ken Wakasa 3b088a2f36 Add missing includes.
Change-Id: Ic7199045d0cffb208871f52cc167194013351d32
2012-05-16 23:05:32 +09:00
Jean Chalard 9416c81403 Return the bigram frequency if available.
This concludes the work on bug#6313806.
Don't submit it before the dictionaries are suitably amended.

Bug: 6313806
Change-Id: Icfea45bd52bb9d8cc68ba2266f80640e3942bb7f
2012-05-16 21:14:06 +09:00
satok 0028ed3627 Use "float" instead of "double"
Change-Id: I93ed4d88ede4058f081dd8d634b00dfff4e96d07
2012-05-16 20:45:05 +09:00
satok f837b57bf5 Merge "Reorder suggestions result according to auto correction threshold" into jb-dev 2012-05-16 04:13:08 -07:00
satok db1939dbaa Reorder suggestions result according to auto correction threshold
Bug: 5413904
Change-Id: I3aa3a8109ba45d2129b58d8242866fd3dd3473cb
2012-05-16 19:58:48 +09:00
satok 6804b8e0fd Fix a bug of handling single quote in the correction algorithm
Bug: 6096247
Change-Id: I5490bbdee4ce1e3e0729ec1510a2baab85eeaf05
2012-05-15 15:12:55 +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 49ba135fde Perform the actual bigram frequency lookup.
This still returns the unigram frequency, because the values stored
for bigrams in the dictionary are not ready to be returned in-place
instead of unigram values. Aside from this, the code is complete.

Bug: 6313806
Change-Id: If7bb7b644730782277f0f6663334c170b7fe13fb
2012-05-10 20:01:44 +09:00
Jean Chalard 8950ce6c44 Replace the bigram list position with the map and filter
Passing the position will not allow us a reasonable lookup
time. Replace this with a map and bloom filter for very fast
lookup.

Bug: 6313806
Change-Id: I3a61c0001cbc987c1c3c7b8df635d4590a370144
2012-05-07 17:15:21 +09:00
Jean Chalard f1634c872c Fill in the bloom filter for bigram lookup.
Bug: 6313806
Change-Id: Ib79e14f6f8b241f053da6069c15f19c71084317e
2012-05-07 15:38:43 +09:00
Jean Chalard 1ff8dc47be Fill up a map of bigram addresses for lookup.
We don't want to do a linear search on each terminal when there
may be 100+ bigrams for a given word because that would be
disastrous for performance. Also, we need to resolve each bigram
address anyway.
This change resolves the addresses at first and puts them in a
balanced tree so that lookup will be O(log(n)).

Bug: 6313806
Change-Id: Ibf088035870b9acb41e948f0ab7af4726f2cee24
2012-05-02 17:50:44 +09: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 4d9b202c40 Pass the bigram list position from the top level
The position itself is still a const int = 0 until we have the previous
word passed to the function. This basically does the plumbing.

Bug: 6313806
Change-Id: Ib58995f334fe93e3ff5704d7c79f332017f101ac
2012-04-24 16:47:09 +09:00
Jean Chalard 171d1809ff Add methods to inverse compute the probability.
For now the probability is just returned with the same
value it had, but this is some ground work that needs to be
done anyway.

Bug: 6313806
Change-Id: I9bb8b96b294109771208ade558c9ad56932d2f8e
2012-04-24 09:40:44 +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
Tadashi G. Takaoka a58ebc73ae Fix typo of some methods' name
Also changes some methods' argument type from Locale to String.

Change-Id: Ib68b528a450dc68a01546483403230f76500bee4
2012-04-18 16:40:50 +09:00
Jean Chalard bde232dcaa Merge "Pass the previous word down to native code in getSuggestions" 2012-04-17 18:01:05 -07: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
Jean Chalard fec6837ae1 Fix debug compilation + small cleanup
Change-Id: Ia89d84f62ba38dee05d25fbc94698e889cf27d2c
2012-04-17 17:33:25 +09:00
Jean Chalard ee396df162 Fix a native crash
This was introduced by Ieb2e306a which failed to keep the return
behavior in case the word doesn't have a bigram.

Change-Id: I6d2f0b79d41c4335e94696690c8331e314961133
2012-04-17 16:57:42 +09:00
Jean Chalard 9c2a96aa6c Preparatory refactoring
Split out getting the pointer to the bigrams to a separate
function. This is a preparative change to bug#6313806

Change-Id: Ieb2e306a1151cd95dc1a16793c8dc2f7fed8b654
2012-04-17 11:46:20 +09:00
Ken Wakasa db87fe4d5c Just cosmetic changes in jni code
Change-Id: I8628131b5a7ccdee4c158e891002c8b86623b0cd
2012-04-16 19:16:05 +09:00
Jean Chalard 3f675f7060 Fix a large native memory leak.
This leak was about 500k and would happen whenever a new binary
dictionary was opened/closed.

Bug: 6299535
Change-Id: I4fad5b4d9c556ca889f5ef62d9d083a2eff6346a
2012-04-16 16:48:53 +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
Jean Chalard aa8df59914 Enable using the flags read from the binary file.
Change-Id: Ib420c3e174ccc1a80c4b6fd066de3b7a2b6fb290
2012-04-06 18:54:20 +09:00
Jean Chalard cd274b1469 Save the flags in a member in the unigram dictionary.
Change-Id: Ic8fad9110db6b97f98ace27af0f347b4e69de8c8
2012-04-06 18:34:59 +09:00
Jean Chalard e81ac8baa0 Add a method to get the flags from a binary dictionary.
This method is not used yet

Change-Id: Ic15d3d423aff2c83c712bc0aa56571d30755e663
2012-04-06 18:34:22 +09:00
Jean Chalard 5b0761e6a9 Remove write-only stuff
Change-Id: I5ac8ab64c77a298502b3d063ea70db9b4da41716
2012-04-06 17:52:18 +09:00
Jean Chalard 9a933a742d Read shortcuts as strings in the dictionary.
This has no impact on performance.
Before:
(0)  9.61 (0.01%)
(1)  57514.58 (56.70%)
(2)  10.55 (0.01%)
(3)  10.79 (0.01%)
(4)  133.20 (0.13%)
(5)  43553.87 (42.94%)
(6)  10.03 (0.01%)
(20) 47.20 (0.05%)
Total 101431.47 (sum of others 101289.84)

After:
(0)  10.52 (0.01%)
(1)  56311.16 (56.66%)
(2)  13.40 (0.01%)
(3)  10.98 (0.01%)
(4)  136.72 (0.14%)
(5)  42707.92 (42.97%)
(6)  9.79 (0.01%)
(20) 51.35 (0.05%)
Total 99390.76 (sum of others 99251.84)

The difference is not significant with regard to measure imprecision

Change-Id: I2e4f1ef7a5e99082e67dd27f56cf4fc432bb48fa
2012-04-06 16:22:08 +09:00
Ken Wakasa 0c1a3ec629 Make LatinIME's native Makefile NDK-friendly
Change-Id: I55d430756b3a8251c9ff49dfabfcecb047d979a4
2012-03-31 05:07:32 +09:00
Ying Wang 32f0e24b33 Remove ".." in the native LOCAL_SRC_FILES.
The build system does not work well with ".." in the path of native
source code.
".." causes the object files to spill out of the module's intermediate
directory.

Change-Id: Ib4a473426be296a738e7facbaa091e56f0b7c5b8
2012-03-30 10:50:26 -07:00
Ken Wakasa 3ef3e24a12 Move the "src" directory as a preparation for Ib4a47342 and I66f6c5b9
Change-Id: I3ab65059f6e356530484bfd0bba26a634a4cba65
2012-03-30 09:53:51 +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
Tom Ouyang aeda8a7798 Change the first character check in bigram dictionary to be case insensitive.
Bug: 6188977
Change-Id: I121c1abf245c7f8734730810c07d3351b1ec581a
2012-03-24 15:31:27 +09:00
satok acb6c5445f Fix build breakage
Change-Id: Ic4d3cf6932dcd57c1040c7877ab7c7f48cd6c408
2012-03-23 20:58:18 +09:00
Jean Chalard 350ffc879a Merge "Fix a bug with negative coordinates, step 3" 2012-03-23 04:04:48 -07:00
Jean Chalard e2222b78d3 Merge "Fix a bug with negative coordinates, step 2" 2012-03-23 03:50:21 -07:00
Jean Chalard 7f18f44461 Merge "Fix a bug with negative coordinates, step 1" 2012-03-23 03:48:53 -07:00
Jean Chalard 52612a0d1b Fix a bug with negative coordinates, step 3
This implements the actual change, now that indentation is okay

Change-Id: Idd897f988394125611516431711c1e575df871df
2012-03-23 19:38:23 +09:00
Jean Chalard 3094d12cdc Fix a bug with negative coordinates, step 2
Indentation changes only

Change-Id: I95011e7d3f787ae6749b826af627f9acaed34e97
2012-03-23 19:37:13 +09:00
Jean Chalard 88ec125cfc Fix a bug with negative coordinates, step 1
This breaks style guidelines but for some reason git diff gets
so lost on this re-indent that it's better to do it like this

Change-Id: Ie0a603eb0739704894a5adc25f9d527b37bdf151
2012-03-23 19:34:53 +09:00
satok 8980bd4a25 Merge "Cleanup jni 1" 2012-03-23 03:24:08 -07:00
satok 9df4a4527a Cleanup jni 1
Change-Id: Ieb6af8385356e259720b50f1fe46a694a098b30f
2012-03-23 19:03:20 +09:00
Jean Chalard 2b5b6388d6 Merge "Fix a typo" 2012-03-23 02:48:15 -07:00
Jean Chalard bbc25607f0 Fix a typo
Change-Id: If794344629e93b558d60b023ae70b703f9c039ab
2012-03-23 17:05:03 +09:00
Jean Chalard cc78d03a62 Add processing for French ligatures.
Bug: 5140033
Change-Id: I1c2751fc617e662aad9f67506e28a622f81d0bc9
2012-03-23 16:50:59 +09:00
Jean Chalard 081616cd2f Send correct coordinates for the spell checker
This results in the computation being done in native code
and the correct proximity being used.
Bug: 6181080

Change-Id: I08fa05c781d607e4feca2caeda353ec19c133a3d
2012-03-23 13:02:58 +09:00
Jean Chalard d30433837d Add a replacement character to digraphs system
The digraphs system used to allow only the replacement of
a pair (A, B) by (A). This change allows the replacement to
be any character.
Bug: 5140033

Change-Id: Icf5995f0ec553f7b7989af9902cbb2c4c6b51009
2012-03-22 11:37:26 +09:00
Jean Chalard 9c4396abb3 Merge "Generalize the digraph code" 2012-03-21 18:47:10 -07:00
Jean Chalard 6c30061c70 Generalize the digraph code
Bug: 5140033
Change-Id: I19c8c89f79f7c1ce1fba58d50bc2697747052599
2012-03-21 17:50:55 +09:00
Jean Chalard 9715cc4ed5 Fix a bug where the returned number of bigrams was incorrect
Bug: 6191885
Change-Id: I1daa4d2eaeec5f5c1a4eef79221fd7de357763e9
2012-03-21 16:55:04 +09:00
satok 1caff47ecd Calculate proximity characters in the native code
Bug: 4343280

Change-Id: I6adaf560f7a4f1f96dcb6ec2f61f20ee3001167e
2012-03-16 17:26:36 +09:00
satok 0cb2097a45 Fix additional proximity in the native code
Bug: 4343280
Change-Id: I4164bb916b2dbdfb6bdc151b99d46a6171d9c355
2012-03-14 11:17:59 +09:00
satok 5eec574cf0 Use additional proximity chars in the native code
Bug: 4343280

Change-Id: Ida690fe246cea80a82fcdb3ad0c28e2907b882ac
2012-03-13 19:00:16 +09:00
satok 552c3c27f0 Implement additional proximity characters in the native code
Bug: 4343280

Change-Id: I9bbc5cab2fef1ee80c1fe32017df811ef8af10bc
2012-03-13 17:38:50 +09:00
Ken Wakasa 951ab9d7eb Fix typo.
Change-Id: Ia18cd090fd81022041854ce190e36eca49c6b04a
2012-03-09 19:18:59 +09:00
satok f0d5a78388 Merge "Add functions to calculate proximity characters in the native code" 2012-03-07 23:31:17 -08:00
satok 219a514082 Fix a bug on German umlaut digraph correction
Bug: 6129372
Change-Id: I2d629735028c35bf12289f381ada2f4ffe8d7ad3
2012-03-08 13:55:34 +09:00
satok a70ee6e3b3 Add functions to calculate proximity characters in the native code
Bug: 4343280

Change-Id: I17f8f6295b01900948b98680d0267753f33a46cf
2012-03-08 12:55:15 +09:00
Jean Chalard 46a1eec4d8 Add a variable-length header region to the binary format.
Also bump up the format version to 2.

Bug: 5686638
Change-Id: I3aafdd7e42c422202122998ec093280051aa8e07
2012-03-06 17:37:28 +09:00
Tadashi G. Takaoka d1dbdb6b20 Make some debug aid functions to inline
Change-Id: I973f9d4a3989f3d2b797ad26f9d006c0f2c613b5
2012-03-06 15:51:32 +09:00
satok bb0bd66942 Fix correction utility
Bug: 6096247

Change-Id: Ie17c60dde9bd081790b79312ce8d96d292c5128c
2012-03-02 12:34:17 +09:00
Jean Chalard ad290d6505 Activate bigram predictions from the binary dictionary
Change-Id: If1cc50539d7677b854b1cd3bea3423c8c0865de5
2012-02-15 19:51:24 -08:00
Jean-Baptiste Queru 26e315785d resolved conflicts for merge of 3ad1145a to master
Change-Id: I13159b95f90c5095373951bf9e91b7dbf8b14558
2012-02-14 13:09:49 -08:00
satok a85f4929cd Support multi words suggestion
result: I4d097612db2f2a93522

Change-Id: Iedbb24f431dac43e52b6dcce8cb610a75e0ca46e
2012-02-08 13:00:31 +09:00
Ken Wakasa 4c5daa8a55 Fix indent
Change-Id: I77b4fb3a47faae7d4ad45d9903556e77a2fc7163
2012-02-06 21:51:31 +09:00
Tadashi G. Takaoka a27cb62390 Merge "Use C++ template for min/max" 2012-02-05 17:38:30 -08:00
Tadashi G. Takaoka 09baa36f7d Use C++ template for min/max
To be more friendly for off-device regression test.

Change-Id: I7edf4c9de73915aad9c1760ace7df3177ed3c4e9
2012-02-06 09:41:41 +09:00
satok 1b9fa942b4 Support correction conversion from skip to additional proximity
Result:  I34bedff6149a6a4e01

Change-Id: I46d528f228a969a0a996299221622627f43c55ec
2012-02-03 20:00:15 +09:00
satok 04fd04d6ff Separate the logic for touch caribration again
Change-Id: I59c6244674caa899af559402290160ad411d1bb5
2012-02-02 19:03:04 +09:00
satok e05b3f4b3a Support additional proximity characters
Change-Id: Ifbe0d7e4eafea1926bbce968eae4724dd5769689
2012-02-02 16:07:16 +09:00
Bhanu Chetlapalli b093cc4824 [MIPS] Remove reference to NDK
Change-Id: I6137c4a93b29a8906abb5bd0f320dd3f37fdea08
Signed-Off-By: Bhanu Chetlapalli <bhanu@mips.com>
2012-01-31 12:08:27 -08:00
satok 1f6b52e76c Implement multi words suggestions step1
Change-Id: I96e8e1b0d9ccc0ed13d53c40300d8c19bcb7af5b
2012-01-30 18:01:25 +09:00
satok 9955716d0b Merge missing space and mistyped space correction algorithm
Change-Id: Idd64d38d3d29be24748f9c0359667883698a5756
2012-01-27 16:54:15 +09:00
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
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