aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/bigram_dictionary.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move bigram_dictionarySatoshi Kataoka2013-06-031-235/+0
| | | | Change-Id: I2c243ac75bc02b912f6b0fabedd372148adf8076
* Create "src/utils" directoryKen Wakasa2013-06-031-1/+1
| | | | Change-Id: I0b7c51d181edc4786e343f7a953367b040ee6b66
* Merge "Use BinaryDictonaryInfo instead of raw pointers."Keisuke Kuroyanagi2013-06-031-5/+7
|\
| * Use BinaryDictonaryInfo instead of raw pointers.Keisuke Kuroyanagi2013-06-021-5/+7
| | | | | | | | | | | | Bug: 6669677 Change-Id: I9792a872f1609de7c1ba0fc08d916047d6724c0b
* | Move dictionary format independent probability calculation methods to ↵Keisuke Kuroyanagi2013-06-011-1/+2
|/ | | | | | | ProbabilityUtils. Bug: 6669677 Change-Id: Idc09a2fbb04e4d843e11313011178022177616aa
* Move char_utils to the dictionary directoryKen Wakasa2013-05-311-4/+4
| | | | Change-Id: Id397485407fe63600c9bb5c80d223042942b4d8a
* Move some dictionary related implementations to the dictionary directoryKen Wakasa2013-05-311-3/+4
| | | | Change-Id: I6fe71a540ad91ca46755be234abc8894242e2413
* Just cosmetic cleanupsKen Wakasa2013-04-261-1/+1
| | | | Change-Id: I3dc8a4bb3f89f4a18cfffd5f13a71503738452e6
* Suppress bigram native logSatoshi Kataoka2013-04-081-3/+3
| | | | Change-Id: I0b3900e0a205b6925ab9a2be55d375f6b14c803c
* Refactor parameters by naming conventionSatoshi Kataoka2013-03-181-22/+23
| | | | Change-Id: I8bda8075b33f656ecbec08320afcd864b620fe77
* Remove a duplicated methodKen Wakasa2013-01-291-1/+2
| | | | Change-Id: I41bd0612bf42d549d1acf0d733b689fce68aa8a1
* Remove MAX_WORD_LENGTH_INTERNALKen Wakasa2013-01-151-16/+15
| | | | Change-Id: Ie11ff000675601acff5fbb00e9e9f48eb32c5071
* Remove BinaryDictionary.MAX_PREDICTION and MAX_SPACES, and rename MAX_WORDS ↵Ken Wakasa2013-01-111-29/+27
| | | | | | to MAX_RESULTS Change-Id: Iab2a422b367e7521f346481c7fe5e2575f2e9de3
* Clean up int types in the Dictionary classKen Wakasa2012-12-031-4/+4
| | | | Change-Id: I49821c00186ce2a282bb23f369eb140b47d6c455
* Use 32-bit code points for suggestions outputKen Wakasa2012-11-011-15/+16
| | | | | | | This is a multi-project commit with Ic43dd666 bug: 6526418 Change-Id: I39c1acb4e91d04cd8a4ec5a943c8cf575da75ebc
* Fix variable typeKen Wakasa2012-09-041-4/+4
| | | | Change-Id: Ifbee00119ff9801d480ca97bf2aedbb25be25bf4
* Cosmetic fixes and a bug fix in ↵Ken Wakasa2012-09-041-1/+1
| | | | | | | | UnigramDictionary::testCharGroupForContinuedLikeness(). This change has actually been extracted from a change work in progress I4fe423834b8131fb122251892c98228a6e08ba25 Change-Id: I52568fa09da2ea22be7f8bfe9676b7cd73c31fa4
* Cleanup casts.Ken Wakasa2012-08-141-7/+6
| | | | Change-Id: I3bf33ca407cc3bee9f5c4c6f929cdb1421b92c50
* Clean up constructorsKen Wakasa2012-08-131-6/+7
| | | | | | | | | | | 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
* Move flags belonging to BinaryFormat to the right place.Jean Chalard2012-08-011-7/+7
| | | | | | | | | | 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
* Cleanup headersKen Wakasa2012-07-311-1/+1
| | | | Change-Id: I9124366b2000cad54966fb6936bb4691bbf115a3
* Misc cleanupsKen Wakasa2012-07-301-2/+1
| | | | Change-Id: I28308f12c3064299acefc346b72279036c3726a7
* Cosmetic fixes and style fixesKen Wakasa2012-07-251-19/+19
| | | | Change-Id: I69c42ff945cdf0d5205c6ca61d6861a0479492dc
* Add values for suggestion types (A120)Jean Chalard2012-07-121-3/+4
| | | | | | Also, use it in getBigrams. Change-Id: Ia0be9b57d1b7effcd8a936e01e957d1195b39c68
* Pass an array to output suggestion types (A119a)Jean Chalard2012-07-121-3/+2
| | | | | | | | This needs the matching A119b change to not break the build. The array is passed, but not used yet. Bug: 6166228 Change-Id: Ia91d658461d989ee8c94e9b31bb06f4a36f4c5b6
* Remove a useless parameter (A106)Jean Chalard2012-07-121-2/+1
| | | | Change-Id: Ic0ecea22212fd1a098a3a168da460374e446f4a3
* Remove a constant parameter (A105)Jean Chalard2012-07-121-7/+7
| | | | Change-Id: I8a09fa2f0649880c943364699a07652e47dede22
* Make a constant really constant (A104)Jean Chalard2012-07-121-2/+2
| | | | Change-Id: Ied1f9f96a574b1e6a8ee0a71bfb1604d9c962e1c
* Search bigrams for the lower case version of the word (A46)Jean Chalard2012-07-041-6/+21
| | | | | | | ...if there aren't any for the exact case version. Bug: 6752830 Change-Id: I2737148b01ba04a64febe009ceb2ef53c265d224
* Make native bigram dictionary constsatok2012-06-141-33/+29
| | | | Change-Id: Id883f2d69483c9234877ad42446a582258e1cf91
* Remove a compiler warning.Jean Chalard2012-05-301-1/+1
| | | | Change-Id: Id2c949d03a2e38787cbf3c8f99313bcfe8610a1f
* Add a comment on a caveat for future reference.Jean Chalard2012-05-291-0/+5
| | | | Change-Id: I328a0cd4346275aac960e1369bf370688a004e11
* Compute the correct frequency for bigram predictionJean Chalard2012-05-291-2/+5
| | | | Change-Id: I3196f48a0ca2ed5e94f430254d58e65d341398c8
* 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
* Add missing includes.Ken Wakasa2012-05-161-0/+1
| | | | Change-Id: Ic7199045d0cffb208871f52cc167194013351d32
* Contacts dictionary rebuilds only when contact names have changed.Tom Ouyang2012-05-111-1/+21
| | | | | Bug: 6396600 Change-Id: Iad693ec4bab6351793d624e5c5b0a9f5c12a60e3
* Perform the actual bigram frequency lookup.Jean Chalard2012-05-101-11/+2
| | | | | | | | | 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-0/+5
| | | | | | | | | 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
* Fill in the bloom filter for bigram lookup.Jean Chalard2012-05-071-2/+9
| | | | | Bug: 6313806 Change-Id: Ib79e14f6f8b241f053da6069c15f19c71084317e
* Fill up a map of bigram addresses for lookup.Jean Chalard2012-05-021-0/+17
| | | | | | | | | | | | 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
* Fetch and pass the bigram position on suggestions.Jean Chalard2012-04-261-4/+5
| | | | | | | This is a cherry-pick of change I2d81742f Bug: 6313806 Change-Id: Ic1190b7980d032bc11b57841bca040d980889b6b
* Pass words as int[] to the native code.Jean Chalard2012-04-231-2/+2
| | | | | | | | | | 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
* Fix debug compilation + small cleanupJean Chalard2012-04-171-1/+0
| | | | Change-Id: Ia89d84f62ba38dee05d25fbc94698e889cf27d2c
* Fix a native crashJean Chalard2012-04-171-0/+4
| | | | | | | This was introduced by Ieb2e306a which failed to keep the return behavior in case the word doesn't have a bigram. Change-Id: I6d2f0b79d41c4335e94696690c8331e314961133
* Preparatory refactoringJean Chalard2012-04-171-13/+19
| | | | | | | Split out getting the pointer to the bigrams to a separate function. This is a preparative change to bug#6313806 Change-Id: Ieb2e306a1151cd95dc1a16793c8dc2f7fed8b654
* Remove write-only stuffJean Chalard2012-04-061-4/+1
| | | | Change-Id: I5ac8ab64c77a298502b3d063ea70db9b4da41716
* Read shortcuts as strings in the dictionary.Jean Chalard2012-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+165
Change-Id: I3ab65059f6e356530484bfd0bba26a634a4cba65