aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix Binary dict testsJean Chalard2013-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two problems here. The first one is the tests would send an invalid unicode character. Although we could want dicttool to handle this more gracefully, it's fine for now. The second problem is much more serious. If a node has more than 128 children, then the java code will crash trying to read the dictionary back because of a bug that this change fixes. In theory, it's possible that happens when we try to load the user history dictionary back from the disk - native code is not affected so there is no other point that may cause a problem. In the practice, that means you'd need to have 129 words with a common prefix (including empty string) but all different after this. It's almost impossible with Google Keyboard since there are only so many keys on the keyboard that you can make a word out of, and then again you'd have to do it repeatedly until it actually enters the user history dictionary, wait for it to get saved on the disk. The bad news is, if you manage to get this far, the keyboard will crash every time and won't be able to get up until you clear data for the package. The good news is, the dictionary itself is not corrupted and only the reading code is wrong. So updating to a newer version would actually even recover from this situation. All in all, considering how almost-impossible this is to trigger, I don't think even a single user actually did hit this bug. Bug: 8583091 Change-Id: Iabb2a7f47cbd9ed3193d2a3487318d280753e071
* Fix two bugs in dicttoolJean Chalard2013-04-101-3/+6
| | | | | | | Both bugs only affect debug mode. One has the wrong object tested with equals, the other has the iteration failing in some cases. Change-Id: Ie9100d257a3f9e3be340cf3e38116f63417bdc1a
* Fix two nasty bugs with surrogate pairs.Jean Chalard2013-04-011-13/+13
| | | | | | | | | | | | | | | | The important bug is in findWordInTree. The problem, which is not obvious, is that we were calling codePointAt() with the code point index in the string, instead of the char index. The other bug this change fixes was harmless in the practice, because it's in the iteration which is only used for debug and pretty printing purposes. It's very similar in that it would substract a length in code point to a length in chars and truncate a StringBuilder at that length, so it would fail in a quite similar manner. This changes the meaning of the "length" attribute in Position, but it's clearer this way anyway. Bug: 8450145 Change-Id: If396f883a9e6449de39351553ba83f5be5bd30f0
* Send the dictionaries descriptions to the dict packJean Chalard2013-02-231-0/+8
| | | | | Bug: 8255795 Change-Id: I12a5922f50c2d2e3aa639457abcc1483e6a48721
* Fix a bug with the passed dictionary idJean Chalard2013-02-221-0/+6
| | | | | | | | | | We used to make the dictionary that we passed to the dictionary pack as an initial value based on the locale. This is wrong - it should be read from the dictionary. This change fixes that. Bug: 7005813 Change-Id: Ib08ed31dd9c216f6f7b9c6c3174ca514bf96e06f
* Create methods in LatinIME to make the current dict listsJean Chalard2013-01-312-3/+30
| | | | | Bug: 7005813 Change-Id: I82232af8e3071333b6fd01e4453b6b3c0a3ddb1f
* Fix Apache license commentTadashi G. Takaoka2013-01-219-72/+72
| | | | Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
* [AD3] Implement the interface to choose a local dictionaryJean Chalard2013-01-211-1/+1
| | | | | Bug: 7702011 Change-Id: Id3b9c58dbbf5097e4d6ce986d20924eae19f9690
* [AD2] Add a helper method to read an arbitrary dict headerJean Chalard2013-01-181-0/+27
| | | | | Bug: 7702011 Change-Id: Ib88f6dc222892831ae6932635b65fd2595b16b43
* Small code cleanupsKen Wakasa2013-01-072-0/+3
| | | | | | Multi-project commit with I249d5fbe Change-Id: Ia28c4e970992aa1299a30e604eaa5d096655c3a5
* Remove trailing spacesKen Wakasa2012-12-191-2/+2
| | | | Change-Id: I260b85ef9e91d17f97d6e405d2d92a65b443df44
* Remove a useless memberJean Chalard2012-12-111-2/+0
| | | | Change-Id: Id13e0aeec6ec3655d6bb0edc7f8f7821e7dc5a36
* Remove a couple Eclipse and Android Lint warningsJean Chalard2012-12-062-0/+3
| | | | Change-Id: I0c29c5d2abcbf80759b996d34b534deb083cd7d3
* Add a plumbing option to dicttool info.Jean Chalard2012-10-311-5/+9
| | | | | | | | Also align the `porcelain' option to the diff command that was used mistakenly. Bug: 7388665 Change-Id: Ic0e1b98c62ce37b2e909384a0370af4458563703
* Remove warningsJean Chalard2012-10-293-13/+8
| | | | | | Thanks Eclipse Change-Id: I88e3979ed22be5d8be5a5accdde417c6b1a8bf2d
* Implement the word-level diff (A9)Jean Chalard2012-10-291-1/+24
| | | | | Bug: 7388857 Change-Id: I4c4560d4f4b579936a44cdf409a4c27300b65610
* Finish up the "info" command in dicttool. (A6)Jean Chalard2012-10-252-2/+36
| | | | | Bug: 7388857 Change-Id: I704f12a6be76ce1644ec5e8dd3b667f112e9c04a
* Add auto detection and decoding of dictionary files. (A2)Jean Chalard2012-10-252-2/+15
| | | | | Bug: 7388852 Change-Id: I25e755fc15f5b383acc046f668e9681efa4f0c2f
* Fix a bug where a bigram would be ignoredJean Chalard2012-10-241-0/+4
| | | | | Bug: 7403386 Change-Id: I89f495d07f7059a9f1ccd97d487c2f2657a8ebd2
* Return the correct bigram frequencyJean Chalard2012-10-231-12/+21
| | | | | | | | | | | | The "correct" bigram frequency is now returned by the reading code. However, as the binary format represents the frequency in a lossy manner, the frequency is not guaranteed to be the exact same as the one in the source text format - only a close enough value. It is however the exact same value seen by the native code. Bug: 7395653 Change-Id: I49199ef18901c671189912b3550623e9643baedd
* Add @UsedForTesting and @ExternallyReferenced annotationsTadashi G. Takaoka2012-10-222-0/+8
| | | | | Bug: 7268357 Change-Id: I0b7e0c19f04af9ae30874d0a4c26ad81bc80be8c
* fix writeCharGroup.Yuichiro Hanada2012-10-051-3/+26
| | | | Change-Id: Ib841afaba0a20c3b300eb7d3e9133243f9f3ae58
* Add insertWord.Yuichiro Hanada2012-10-043-2/+304
| | | | | | bug: 6669677 Change-Id: Ide55a4931071de9cd42c1cddae63ddd531d2feba
* Add writeNode.Yuichiro Hanada2012-10-043-9/+124
| | | | Change-Id: I088bb6ea43ce0841d725e48b677d429e1155569d
* Add updateParentAddresses.Yuichiro Hanada2012-10-032-6/+72
| | | | Change-Id: Iac210131b7c003ef363e1138bf22f777a37c6a89
* Add isDeletedGroup.Yuichiro Hanada2012-10-033-10/+29
| | | | Change-Id: I83f09c068868e5e6e1b46f494a6ef957f0b466d8
* Add MAX_BIGRAMS_IN_A_GROUP.Yuichiro Hanada2012-10-032-1/+6
| | | | Change-Id: I128d5deb8e523045d7ad77d7a8fd3db944f71238
* Add makeCharGroupFlags.Yuichiro Hanada2012-10-032-44/+57
| | | | Change-Id: Id2c580f21b77f66a97c5fbdf4542fdafe6c43614
* Make writeCharGroup return a size of a new group.Yuichiro Hanada2012-10-011-9/+43
| | | | | | bug: 6669677 Change-Id: I56f6a07b04b08443f2c052927404318c2018fc9d
* Add writeCharGroup.Yuichiro Hanada2012-10-012-7/+129
| | | | | | bug: 6669677 Change-Id: I36792ba9c511a5148c963096cc93ca8c2e0ee04e
* Add updateChildrenAddress.Yuichiro Hanada2012-09-282-4/+39
| | | | Change-Id: Ic06a755d85612476e719e580469dc1cd9447286c
* Cleanup: Make some classes as finalTadashi G. Takaoka2012-09-279-20/+18
| | | | Change-Id: I6009b3c1950ba32b7f1e205a3db2307fe0cd688e
* Use BinaryDictInputOutput to save UserHistoryDictionary.Yuichiro Hanada2012-09-271-1/+4
| | | | | | bug: 6669677 Change-Id: I08193c26f76dbd48168f8ac02c1b737525bfc7b2
* Add updateParentAddress.Yuichiro Hanada2012-09-261-0/+30
| | | | | | bug: 6669677 Change-Id: I353f8ae53720cdf7a809271a28cb703709609f53
* Add moved char groups.Yuichiro Hanada2012-09-263-11/+43
| | | | | | bug: 6669677 Change-Id: I372f841044fe8e076a50a80ac10b715e5f8fd4eb
* add capacity to FusionDictionaryBufferInterface.Yuichiro Hanada2012-09-251-0/+6
| | | | | | bug: 6669677 Change-Id: I4627093811a19c46ce13fe351d1db63cbd78cf4a
* Make getTerminalPosition read linked-list nodes.Yuichiro Hanada2012-09-251-32/+48
| | | | | | bug: 6669677 Change-Id: I599d276f430efe23d402695c325e23906b7705b3
* Make children addresses and parent addresses use signed addresses.Yuichiro Hanada2012-09-252-67/+166
| | | | | | | | Signed addresses are used only in version 3 with dynamic update. bug: 6669677 Change-Id: Iadaeab199b5019d2330b4573c24da74d64f0945e
* Combine mHasParentAddress with mHasLinkedListNode into mSupportsDynamicUpdate.Yuichiro Hanada2012-09-243-44/+26
| | | | | | bug: 6669677 Change-Id: I82799af199358420f09ac34fc005091e202c5d3b
* Add deleteWord.Yuichiro Hanada2012-09-212-1/+23
| | | | | | bug: 6669677 Change-Id: I1a5b90ee05e5cffd74a5c140384a3e37c79e7e70
* Make readUnigramsAndBigramsBinary read linked-list nodes.Yuichiro Hanada2012-09-201-1/+12
| | | | Change-Id: I07ae036b0b06e71d7a18f2bf11e4692cd4213568
* Add getTerminalPosition.Yuichiro Hanada2012-09-203-3/+73
| | | | Change-Id: If04d779db23b1aea2cc12e5e9b8cecfcb35a5737
* Make BinaryDictIOUtils.Yuichiro Hanada2012-09-192-102/+132
| | | | Change-Id: I45830235ee738233e8eb2bd91d659705b698f58c
* Make readNode read linked list nodes.Yuichiro Hanada2012-09-191-32/+50
| | | | Change-Id: Ia5eaae0653179b2eb74c53b0823beaf80377a389
* add limit to FusionDictionaryBufferInterface.Yuichiro Hanada2012-09-191-0/+6
| | | | Change-Id: Ic9ff717a9751023d47b02ff3b9d1fbf3115c2501
* Add a new flag for linked list nodes.Yuichiro Hanada2012-09-182-2/+7
| | | | Change-Id: Ib2f194775cfe5ab05481ac95cd709d6e8e8dd3c6
* Make writePlacedNode write the linked-list node.Yuichiro Hanada2012-09-181-4/+19
| | | | Change-Id: I60feda815ea08cf73300fccca1ae12b97550f116
* Add a new option to FormatOptions.Yuichiro Hanada2012-09-181-2/+25
| | | | Change-Id: I8bf089bea5de46570a5e81fb1ea3ab22c07eeee1
* Merge "Fix a bug with surrogate characters" into jb-mr1-devJean Chalard2012-09-181-3/+4
|\
| * Fix a bug with surrogate charactersJean Chalard2012-09-181-3/+4
| | | | | | | | | | | | | | This is a pretty bad bug :/ Bug: 7013840 Change-Id: I12c7cfa4fa9d56b2c1fee6e6222c64fe20b88fa3