History log of /packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
866a6ced571a24f0f1b927aeccad7a1969da23b7 26-Apr-2013 Ken Wakasa <kwakasa@google.com> Just cosmetic cleanups

Change-Id: I3dc8a4bb3f89f4a18cfffd5f13a71503738452e6
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
e320789a62e2e1161673657241b664e9cbf31f7f 08-Apr-2013 Satoshi Kataoka <satok@google.com> Suppress bigram native log

Change-Id: I0b3900e0a205b6925ab9a2be55d375f6b14c803c
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
e0e67373735918c78eaeaf24f127e1d28816aa29 18-Mar-2013 Satoshi Kataoka <satok@google.com> Refactor parameters by naming convention

Change-Id: I8bda8075b33f656ecbec08320afcd864b620fe77
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
19e13df91f36cf131f5139c44d7b80fc1e8f6f21 29-Jan-2013 Ken Wakasa <kwakasa@google.com> Remove a duplicated method

Change-Id: I41bd0612bf42d549d1acf0d733b689fce68aa8a1
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
5db594abbad2d9e8d2cf1aa6e417aa50ffc5dfc1 11-Jan-2013 Ken Wakasa <kwakasa@google.com> Remove MAX_WORD_LENGTH_INTERNAL

Change-Id: Ie11ff000675601acff5fbb00e9e9f48eb32c5071
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
f6870cc82ddf394e94155322fcc7e4e2256bea66 11-Jan-2013 Ken Wakasa <kwakasa@google.com> Remove BinaryDictionary.MAX_PREDICTION and MAX_SPACES, and rename MAX_WORDS to MAX_RESULTS

Change-Id: Iab2a422b367e7521f346481c7fe5e2575f2e9de3
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
aa5a3e84ad330f55edda3087a9498c5ee16b9cba 03-Dec-2012 Ken Wakasa <kwakasa@google.com> Clean up int types in the Dictionary class

Change-Id: I49821c00186ce2a282bb23f369eb140b47d6c455
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
1e61493c50082264caaef862df02b1ccc84dc396 29-Oct-2012 Ken Wakasa <kwakasa@google.com> Use 32-bit code points for suggestions output

This is a multi-project commit with Ic43dd666

bug: 6526418
Change-Id: I39c1acb4e91d04cd8a4ec5a943c8cf575da75ebc
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
d86d313b312f6496018629ed197371845682deb2 04-Sep-2012 Ken Wakasa <kwakasa@google.com> Fix variable type

Change-Id: Ifbee00119ff9801d480ca97bf2aedbb25be25bf4
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
f2789819bd005b5b0581e8439601b5501306327d 03-Sep-2012 Ken Wakasa <kwakasa@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
267030dd82a6165ca56899d2988b5dc51ebea104 14-Aug-2012 Ken Wakasa <kwakasa@google.com> Cleanup casts.

Change-Id: I3bf33ca407cc3bee9f5c4c6f929cdb1421b92c50
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
bcec82de66f52655593dc233346f11468f5077a0 12-Aug-2012 Ken Wakasa <kwakasa@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
195605084ed156b58f0bae002f121d98c1ace867 31-Jul-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
f1008c550168e50f930ea1e043000b395ce0f129 31-Jul-2012 Ken Wakasa <kwakasa@google.com> Cleanup headers

Change-Id: I9124366b2000cad54966fb6936bb4691bbf115a3
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
5460ea389d83722ac98abaef8a2bb9900fb571e7 30-Jul-2012 Ken Wakasa <kwakasa@google.com> Misc cleanups

Change-Id: I28308f12c3064299acefc346b72279036c3726a7
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
0bbb917d12358e0264796e75dea888f244761b64 25-Jul-2012 Ken Wakasa <kwakasa@google.com> Cosmetic fixes and style fixes

Change-Id: I69c42ff945cdf0d5205c6ca61d6861a0479492dc
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
c7387a4fd065ad6782b0705e56f9556ac9cf127f 12-Jul-2012 Jean Chalard <jchalard@google.com> Add values for suggestion types (A120)

Also, use it in getBigrams.

Change-Id: Ia0be9b57d1b7effcd8a936e01e957d1195b39c68
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
6931df9c17aaeb04288f937cabf956c1b9eb0cc9 11-Jul-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
6a5d17cd2f55cdab01900af8933cb71b97b73a29 11-Jul-2012 Jean Chalard <jchalard@google.com> Remove a useless parameter (A106)

Change-Id: Ic0ecea22212fd1a098a3a168da460374e446f4a3
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
1a69ad5a107792cb01436d2156f8b518aaf0a4d6 11-Jul-2012 Jean Chalard <jchalard@google.com> Remove a constant parameter (A105)

Change-Id: I8a09fa2f0649880c943364699a07652e47dede22
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
b7d7c5a369cef80d4319de8e433501ab25b49615 11-Jul-2012 Jean Chalard <jchalard@google.com> Make a constant really constant (A104)

Change-Id: Ied1f9f96a574b1e6a8ee0a71bfb1604d9c962e1c
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
e9a86e2cdb58dd8d5601138294521e966d164520 28-Jun-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
b1ed1d47acb366706df0ccc77711df92eff4f51e 15-Jun-2012 satok <satok@google.com> Make native bigram dictionary const

Change-Id: Id883f2d69483c9234877ad42446a582258e1cf91
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
62cd919dca9ef85cdd045b539b3ef85e921c6e4c 30-May-2012 Jean Chalard <jchalard@google.com> Remove a compiler warning.

Change-Id: Id2c949d03a2e38787cbf3c8f99313bcfe8610a1f
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
46fe49fc05df02228222b8a8e49d4cc8e1f0ea3c 29-May-2012 Jean Chalard <jchalard@google.com> Add a comment on a caveat for future reference.

Change-Id: I328a0cd4346275aac960e1369bf370688a004e11
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
e308459531a4dd64ee80aa76e351725180ad856e 29-May-2012 Jean Chalard <jchalard@google.com> Compute the correct frequency for bigram prediction

Change-Id: I3196f48a0ca2ed5e94f430254d58e65d341398c8
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
402b0570505c7ea1389e1c153e5db0300568ce26 29-May-2012 Jean Chalard <jchalard@google.com> Fix two small possible bugs.

None of these had any real impact, but they were potential
liabilities for the future

Change-Id: I2de581f8b638e423d47a6d99b1a3c96af4c6150d
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
3b088a2f365a9ce06f58243c83cb961ea2920b7e 16-May-2012 Ken Wakasa <kwakasa@google.com> Add missing includes.

Change-Id: Ic7199045d0cffb208871f52cc167194013351d32
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
4d289d39aeae21064f63d958974816ceee3e9fde 27-Apr-2012 Tom Ouyang <ouyang@google.com> Contacts dictionary rebuilds only when contact names have changed.

Bug: 6396600
Change-Id: Iad693ec4bab6351793d624e5c5b0a9f5c12a60e3
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
49ba135fdedb3c6b33ec915e91ecad682b7655b8 07-May-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
8950ce6c44706467bb386570ae236a2b8b983666 07-May-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
f1634c872c57a5e8d0a861cda299fdbd98740e79 02-May-2012 Jean Chalard <jchalard@google.com> Fill in the bloom filter for bigram lookup.

Bug: 6313806
Change-Id: Ib79e14f6f8b241f053da6069c15f19c71084317e
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
1ff8dc47be1734555af1c0c011ea6cf72b395a43 02-May-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
351864b38a2a19a3b591efe3ed58a5998bb4c79d 24-Apr-2012 Jean Chalard <jchalard@google.com> Fetch and pass the bigram position on suggestions.

This is a cherry-pick of change I2d81742f

Bug: 6313806
Change-Id: Ic1190b7980d032bc11b57841bca040d980889b6b
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
522a04ea5b249d0af556647d2abcad57e5b99b4f 23-Apr-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
fec6837ae177ae103bd1a09bb9afb1dc799519f3 17-Apr-2012 Jean Chalard <jchalard@google.com> Fix debug compilation + small cleanup

Change-Id: Ia89d84f62ba38dee05d25fbc94698e889cf27d2c
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
ee396df162b31cff9763dd10a7da2b47aef10c01 17-Apr-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
9c2a96aa6cb6d8c1f7a559dbd7051302cfc6150b 17-Apr-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
5b0761e6a94227d6ef788f589fb6edcd44ed791f 06-Apr-2012 Jean Chalard <jchalard@google.com> Remove write-only stuff

Change-Id: I5ac8ab64c77a298502b3d063ea70db9b4da41716
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
9a933a742d2a3ffdfb955705ad086035bc27db60 27-Mar-2012 Jean Chalard <jchalard@google.com> 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
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp
3ef3e24a12ed72204f7a6f2e4b2df8ce7d243746 30-Mar-2012 Ken Wakasa <kwakasa@google.com> Move the "src" directory as a preparation for Ib4a47342 and I66f6c5b9

Change-Id: I3ab65059f6e356530484bfd0bba26a634a4cba65
/packages/inputmethods/LatinIME/native/jni/src/bigram_dictionary.cpp