aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/binary_format.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Be careful about the dictionary size in detection methodsJean Chalard2013-05-081-19/+34
| | | | | Bug: 8857618 Change-Id: I29345ec96d53da601571ba73197a6485643a10a7
* Improve bigram frequency lookupTom Ouyang2013-04-261-0/+72
| | | | | | Bug: 8592527 Change-Id: I1908bcb552279b9acb140fe4d8d26b10ed9eda72
* A small follow-up to I8d03bae3264974eff7b790e27c073b0a8758d17aKen Wakasa2013-04-271-1/+1
| | | | Change-Id: Id3727f075e74c0102edcb51eabcfdbef745b94b7
* Fix a small bugJean Chalard2013-04-221-0/+5
| | | | | | | Tests results in Ibcd6c110f1d5582425f9592c42e31152131ef80c Bug: 7226877 Change-Id: I8d03bae3264974eff7b790e27c073b0a8758d17a
* Use additional multi-word cost per language (for Russian)Satoshi Kataoka2013-04-161-0/+12
| | | | | Bug: 7540133 Change-Id: I7eb7b8399746c15452ed2ed5069955e88fb546d3
* Refactor parameters by naming conventionSatoshi Kataoka2013-03-181-40/+44
| | | | Change-Id: I8bda8075b33f656ecbec08320afcd864b620fe77
* Small cleanups in binary_format.hKen Wakasa2013-01-301-8/+6
| | | | Change-Id: I6049a2f312b7d53a3ffa688ddca5731004784ebe
* Small cleanupsKen Wakasa2013-01-301-1/+1
| | | | Change-Id: I3e5862a405b4c63616c7ea947cd53c52b5035862
* Clean up sign conversions in binary_format.h (done by -Wsign-conversion)Ken Wakasa2012-12-101-12/+13
| | | | Change-Id: I9ca88c22ee5bbb66d50640e1d96021fbe71fc8ab
* Merge "remove invalid comparison"Ken Wakasa2012-12-031-2/+0
|\
| * remove invalid comparisonSatoshi Kataoka2012-12-031-2/+0
| | | | | | | | Change-Id: I162c478debe5897be057998bd22924ed487d01af
* | Fix offdevice regression test build errorKen Wakasa2012-11-301-1/+1
|/ | | | Change-Id: I97128108b3bd75c61069517c3f8ce68ecc7bf285
* Merge "Add utilities to read header values."Jean Chalard2012-11-291-0/+68
|\
| * Add utilities to read header values.Jean Chalard2012-11-291-0/+68
| | | | | | | | | | Bug: 7540132 Change-Id: I19d85481135e79d8782f711da5cbb3a5a7bc06f8
* | Prep for GCC 4.7Ken Wakasa2012-11-271-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Tidy up visibility of members of BinaryFormat.Ken Wakasa2012-11-051-26/+27
| | | | Change-Id: I38a00076b82de8e1a19209c67954fe01585f7943
* Adjust compiler warning options with the offdevice MakefileKen Wakasa2012-11-051-15/+17
| | | | | | Make use of AK_FORCE_INLINE for -Winline and better performance Change-Id: If0016e2ef61c1fe007c83bb1a5133a6b6bde568e
* Use 32-bit code points for suggestions outputKen Wakasa2012-11-011-18/+17
| | | | | | | This is a multi-project commit with Ic43dd666 bug: 6526418 Change-Id: I39c1acb4e91d04cd8a4ec5a943c8cf575da75ebc
* Fix one-off bugs reported by ValgrindJean Chalard2012-09-061-2/+2
| | | | | Bug: 7108990 Change-Id: I40ba30f50a26b65bcac905fc005ad6bb9cb034cc
* Cosmetic fixes and a bug fix in ↵Ken Wakasa2012-09-041-21/+21
| | | | | | | | UnigramDictionary::testCharGroupForContinuedLikeness(). This change has actually been extracted from a change work in progress I4fe423834b8131fb122251892c98228a6e08ba25 Change-Id: I52568fa09da2ea22be7f8bfe9676b7cd73c31fa4
* Reinstate the shortcut-only attributeJean Chalard2012-08-311-0/+4
| | | | | | | | Also add the blacklist attribute Bug: 7005742 Bug: 2704000 Change-Id: Icbe60bdf25bfb098d9e3f20870be30d6aef07c9d
* Small cleanupsKen Wakasa2012-08-171-8/+7
| | | | Change-Id: Ib66507b8934bc8019a762d24d5311411e044ec84
* Tag the whitelisted entries in native code.Jean Chalard2012-08-131-0/+7
| | | | | | | | | | 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
* Header cleanup. Moved a couple of functions from .h to .cpp.Ken Wakasa2012-08-021-2/+2
| | | | Change-Id: Ifd12a7632f75395bd0ef5e394d5c2abd6cbe28c6
* Move flags belonging to BinaryFormat to the right place.Jean Chalard2012-08-011-33/+65
| | | | | | | | | | 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
* Cosmetic fixes and style fixesKen Wakasa2012-07-251-39/+37
| | | | Change-Id: I69c42ff945cdf0d5205c6ca61d6861a0479492dc
* Search bigrams for the lower case version of the word (A46)Jean Chalard2012-07-041-3/+4
| | | | | | | ...if there aren't any for the exact case version. Bug: 6752830 Change-Id: I2737148b01ba04a64febe009ceb2ef53c265d224
* Move correction state to stack memorysatok2012-06-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | *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
* Compute the correct frequency for bigram predictionJean Chalard2012-05-291-2/+4
| | | | Change-Id: I3196f48a0ca2ed5e94f430254d58e65d341398c8
* Fix a bug where the bigram freq would be underevaluatedJean Chalard2012-05-291-1/+1
| | | | | | The difference in score is not large, but it's still a bug Change-Id: Ie22c2b6e1206e829c1c8af096469df05af14d47b
* Split a method to reconstruct freq from uni/bi freqJean Chalard2012-05-291-7/+12
| | | | | | This has no impact at all on the logic. Change-Id: I3788c8335cc193433ad9a7512b211a49bb2ffb02
* Fix two small possible bugs.Jean Chalard2012-05-291-1/+1
| | | | | | | None of these had any real impact, but they were potential liabilities for the future Change-Id: I2de581f8b638e423d47a6d99b1a3c96af4c6150d
* Return the bigram frequency if available.Jean Chalard2012-05-161-9/+23
| | | | | | | | This concludes the work on bug#6313806. Don't submit it before the dictionaries are suitably amended. Bug: 6313806 Change-Id: Icfea45bd52bb9d8cc68ba2266f80640e3942bb7f
* Perform the actual bigram frequency lookup.Jean Chalard2012-05-101-7/+13
| | | | | | | | | 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
* Replace the bigram list position with the map and filterJean Chalard2012-05-071-4/+7
| | | | | | | | | 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
* Add methods to inverse compute the probability.Jean Chalard2012-04-241-0/+9
| | | | | | | | | 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
* Pass words as int[] to the native code.Jean Chalard2012-04-231-3/+3
| | | | | | | | | | 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
* Add a method to get the flags from a binary dictionary.Jean Chalard2012-04-061-0/+19
| | | | | | This method is not used yet Change-Id: Ic15d3d423aff2c83c712bc0aa56571d30755e663
* Remove write-only stuffJean Chalard2012-04-061-1/+1
| | | | Change-Id: I5ac8ab64c77a298502b3d063ea70db9b4da41716
* Read shortcuts as strings in the dictionary.Jean Chalard2012-04-061-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move the "src" directory as a preparation for Ib4a47342 and I66f6c5b9Ken Wakasa2012-03-301-0/+481
Change-Id: I3ab65059f6e356530484bfd0bba26a634a4cba65