Commit Graph

157 Commits (afa978757343b4467564d059e50eccf26ef69f8a)

Author SHA1 Message Date
Ken Wakasa b03447e1af Move a couple classes to the utils package
Change-Id: Ia14a2011d79bad7cd02697b9254705f6e2099442
2013-07-19 10:46:46 +09:00
Ken Wakasa 4d5939fc0a Remove dependencies to android source in dicttool
bug: 9889653
Change-Id: I2630c56548f9146ade85b17f891932dae2082a85
2013-07-17 13:16:02 +09:00
Ying Wang cc54032b39 Fix build.
Change-Id: I51c0b7ba5641c1e7c1d63a4e5a6307b08d6f4886
2013-07-16 19:09:14 -07:00
Jean Chalard eec3067fd0 Merge "Generalize constuctors & add tests" 2013-07-04 08:53:19 +00:00
Jean Chalard b6cc4333a8 Generalize constuctors & add tests
If there is any two-args constructor with the right arg types
in a test class, use it. Also, add a test suite to dicttool test.

Also, have the return value of dicttool reflect success or
failure.

Change-Id: I51ab2a4abb93a0a483e8d6ef3c39d1ff1bce1dbd
2013-07-04 17:13:58 +09:00
Tadashi G. Takaoka fe202d6738 Add Azerbaijani keyboard
Bug: 7963448
Change-Id: I39c192b342278e82e30ac6ef12c6d150c817ae70
2013-07-04 14:47:33 +09:00
Tadashi G. Takaoka 0e007eaff6 Add Kazakh keyboard
Bug: 9697273
Change-Id: Ic9943569ed60d601f093181bf135e45a25399121
2013-07-04 13:10:38 +09:00
Tadashi G. Takaoka 28852fd658 Followup com.android.inputmethod.latin.utils change
This is a folowup of I1c5b27c8ed.

Change-Id: I12c422a26e599923cadf21c3ab24e4b901cf94cc
2013-07-03 19:05:32 +09:00
Jean Chalard 4b7acd1df6 Add args to dicttool test.
Change-Id: I0667e0a5a6f6db3964cfcca5c8f083b9ceb41a2e
2013-07-01 15:28:32 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Jean Chalard 23d4eb55ba Add tests to dicttool test.
Bug: 8526576
Change-Id: Idd6f9cd076d5915361c68f5c29afbba67dd54eba
2013-06-20 17:29:37 +09:00
Jean Chalard d055cca7d2 Add an initial test command to dicttool.
Also fix some warnings
This is a preliminary change to help track b/8526576

Bug: 8526576
Change-Id: If2ed74bb92f9b5fb7bbaf9c4851d9d0b5514b405
2013-06-19 20:08:54 +09:00
Jean Chalard a411595b16 Fix two nasty bugs with surrogate pairs.
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
2013-04-01 17:06:19 +09:00
Tadashi G. Takaoka 3a8a63c399 Remove unused import
This is a follow up of I062c076f.

Change-Id: Ic3a83d95aed1f86121ed552a6f20f0d24f9d6d83
2013-03-22 15:23:06 +09:00
Tadashi G. Takaoka 9f3774c194 Remove reference to string.english_ime_name
Bug: 6789579
Change-Id: I062c076f0ca16cc39274e20955aa83d667b7380d
2013-03-22 14:08:23 +09:00
Tadashi G. Takaoka 2bbd3065d3 Language dependent single/doule quotation more keys
The natural way of marking quoted text vary from language to
language. This change introduces the following variations.

* LEFT and RIGHT quotations (English etc.)
* LOW-9 and LEFT quotations (German etc.)
* LOW-9 and RIGHT quotations (Dutch etc.)
* RIGHT and RIGHT quotations (Swedish etc.)
* LEFT ANGLE and RIGHT ANGLE quotations (French etc.)
* RIGHT ANGLE and LEFT ANGLE quotations

Bug: 8356419
Change-Id: I75726ab7ed783d02f189b46236c9d5079737bcff
2013-03-12 14:43:34 +09:00
Tadashi G. Takaoka 8aa9963a89 Fix Apache license comment
Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
2013-01-21 22:23:37 +09:00
Tadashi G. Takaoka 722eeb144f Fix drawing Arabic diacritics
Bug: 8001868
Change-Id: I0e5aab266bbaad8c68e4a900b8d5572977a0379d
2013-01-15 11:03:15 +09:00
Tadashi G. Takaoka ac3720ce6d Fix layout switch keys' label of no language subtype keyboard
This change moves the following string from resources to
KeyboardTextsSet.
- label_to_alpha_key
- label_to_symbols_key
- label_to_symbols_with_microphone_key

Bug: 7697799
Change-Id: Icf9b8848de4c70f792e336f2ae274dab12be79ee
2012-12-13 17:44:10 +09:00
Ken Wakasa 02996dc56a Clean up dependency for dicttool
bug: 7635215
Change-Id: Ie50297ab592261390885c593341b6c46161b2e63
2012-11-29 19:09:01 +09:00
Tadashi G. Takaoka c27e899dbe Reorganize currency keys
Add Rial(ar), Indian Rupee(hi), Tugrik(mn), Baht(th), Hryvnia(uk),
Dong(vi) currency sign keys to symbol layout.

Bug: 7455289
Change-Id: I0f819631ff05c4a31d3a6868dea5e18a1797f103
2012-11-20 18:04:55 +09:00
Tadashi G. Takaoka 0d3eb7d963 Swap single and double quotation marks in Spanish tablet keyboard
Bug: 6672279
Change-Id: I120613e36ba6a690e54447fa6c9c90e131f2a155
2012-11-14 15:54:19 +09:00
Jean Chalard 5b1037fa94 Fix a bug in the diff tool
Fix reporting of removed attributes multiple times instead
of just one in some cases. Also, report the frequency of
the removed bigram in the same cases.

Change-Id: I1455fa7553fcebc3005c222bf5aa9afcf1678c31
2012-11-08 11:57:45 +09:00
Jean Chalard 271e731eb4 Add a missing report, and fix a wrong report
Deleted words would be reported, but added words wouldn't
Also, shortcuts would be reported as bigrams

Change-Id: I017653f2afa65cf16924017a0be2ee2cbd6ca10d
2012-11-01 14:25:53 +09:00
Jean Chalard 8c02f3005a Add a "no changes" message in the diff command
Also fix a bug where no locale would be interpreted as a
different locale instead of the same.

Change-Id: I296feef45e39a9e89509cb315e789676755141ab
2012-11-01 13:16:58 +09:00
Jean Chalard acafc073b9 Fix an NPE in recent code
Change-Id: I5c76edff5c3c250167d425a737b09b10e25f9f84
2012-11-01 12:48:37 +09:00
Jean Chalard 1b67a2bd8b Merge "Use spaces instead of tabs in the combined format." 2012-10-31 02:33:55 -07:00
Jean Chalard 8f18c261cd Use spaces instead of tabs in the combined format.
Change-Id: Ie8a4cdc44f87839e29bfbffc03d4853b7b5cc5f6
2012-10-31 18:32:09 +09:00
Jean Chalard 51a0ef8c59 Add a plumbing option to dicttool info.
Also align the `porcelain' option to the diff command
that was used mistakenly.

Bug: 7388665
Change-Id: Ic0e1b98c62ce37b2e909384a0370af4458563703
2012-10-31 16:35:22 +09:00
Jean Chalard a8058d169d Cleanup after dicttool
Arrange for temporary files to be deleted.
Also, add a security on stack overflows.

Change-Id: I9da2ebefb06409a71b235243ea835ce10d6a9b81
2012-10-30 19:57:02 +09:00
Jean Chalard ee0b5488b5 Implement the package command
Bug: 7388852
Change-Id: Ib6a50e02894961b4c7d3f57bc0fc70c3b3bfe4e9
2012-10-30 18:42:58 +09:00
Jean Chalard ba98b63983 Add the unpackage command
Bug: 7388852
Change-Id: I7e5376f5d646e669884ef78e4e0dee62c99d4d6b
2012-10-30 18:20:26 +09:00
Jean Chalard e44358d2eb Add an empty crypt command to aosp dicttool
This also makes the AdditionalCommandList useless,
so let's remove it

Bug: 7388852
Change-Id: I308f54ca6f778afe01c1233801a9cc22ebb3d1e9
2012-10-30 17:44:39 +09:00
Jean Chalard e5b68fb51d Accept comments in the combined file format
Change-Id: I17b745281b8b7b1922e1c2d3717986e9bb11aa0b
2012-10-29 18:08:50 +09:00
Jean Chalard f41389a74b Remove warnings
Thanks Eclipse

Change-Id: I88e3979ed22be5d8be5a5accdde417c6b1a8bf2d
2012-10-29 14:24:16 +09:00
Jean Chalard 74d66a5513 Add word arguments to the info command (A10)
With this, it's now possible to get all the information about a word from
any dictionary.

Bug: 7388857
Change-Id: Ifc9d539f52f87044a1974d95bf35d87465e84c47
2012-10-29 12:41:57 +09:00
Jean Chalard a23e333079 Implement the word-level diff (A9)
Bug: 7388857
Change-Id: I4c4560d4f4b579936a44cdf409a4c27300b65610
2012-10-29 12:31:22 +09:00
Jean Chalard 0c5b93800e Add the dicttool diff command. (A8)
This is an initial implementation, it does not
do everything just yet.

Bug: 7388857
Change-Id: I11543973a4657e122ca3475225059b06b9a3f2b9
2012-10-29 11:15:15 +09:00
Jean Chalard 6ecc50a867 Add a reporting option to the getDictionary method (A7)
This is refactoring to help future changes

Change-Id: I8c4372383a2fff5805b96cc47df5012e4b231004
2012-10-29 10:39:40 +09:00
Tadashi G. Takaoka da8f4e2616 Fix maketext template to use @UsedForTesting
This is a follow up of I0b7e0c19.

Change-Id: I8530453bfba9d4de2b134f52acc931cc9659a9d6
2012-10-26 15:29:52 +09:00
Ken Wakasa d505319a25 am 5199b8bf: am f6df37ce: Merge "LatinIME: Add accents to german keyboard"
* commit '5199b8bf1a212b93c9f37d4bb18121ba7f174bd0':
  LatinIME: Add accents to german keyboard
2012-10-25 23:13:48 -07:00
Ken Wakasa 5199b8bf1a am f6df37ce: Merge "LatinIME: Add accents to german keyboard"
* commit 'f6df37ce2dce9ada1af097e0c2fbdd84c0334c61':
  LatinIME: Add accents to german keyboard
2012-10-25 23:11:21 -07:00
Jean Chalard 47cac57e45 Finish up the "info" command in dicttool. (A6)
Bug: 7388857
Change-Id: I704f12a6be76ce1644ec5e8dd3b667f112e9c04a
2012-10-25 19:15:24 +09:00
Jean Chalard f1d35ac5dc Implement a part of the "info" command (A5)
Bug: 7388857
Change-Id: Id1bba7a33ab6195d5711bebb1df5c18c9c08925c
2012-10-25 18:19:10 +09:00
Jean Chalard 3862b9e819 Add symmetry and pre-emptively improve performance (A4)
The test for binary dictionary will soon entail decrypting and
uncompressing files if necessary to test for their headers, and will
become much slower than it is. It's better to be able to detect the
XML format too, and leave the slower test for last.

Bug: 7388852
Change-Id: I6b9a7944de80217e1571cab65dcd1cff347b3046
2012-10-25 17:20:24 +09:00
Jean Chalard 0044df6cf2 Add automatic decryption capabilities. (A3)
Bug: 7388852
Change-Id: Ie952b1ad6cfad2f83793bd968e159d3cfbf20a47
2012-10-25 16:47:32 +09:00
Jean Chalard b3c98901c5 Add auto detection and decoding of dictionary files. (A2)
Bug: 7388852
Change-Id: I25e755fc15f5b383acc046f668e9681efa4f0c2f
2012-10-25 16:40:15 +09:00
Jean Chalard 77fe603a3d Some initial refactoring in dicttool. (A1)
Bug: 7388852
Change-Id: I5ff70d12f3a8096ae6fb8cd4883a32ffe1683c9b
2012-10-25 16:40:11 +09:00
Jean Chalard 9bb4eebf48 Add reader and writer for the combined dict format.
This introduces a new textual format for the dictionary that combines
words, bigrams and shortcuts to avoid complexity. It is also extensible
to n-grams to fool-prof for the future, and easier to read than XML.

Bug: 7388540
Change-Id: I942bbad51bd0c905a5a54c278667563fd6dd66ec
2012-10-23 15:06:25 +09:00
Jean Chalard cbb3252731 Merge "Use a buffered writer for XML output" 2012-10-22 18:54:38 -07:00