Commit Graph

96 Commits (32ca47a547df5a45bf1f481f998cb61c8219ea59)

Author SHA1 Message Date
Keisuke Kuroyanagi b24de426fc Use CombinedFormatUtils to convert dict elements to strings.
Bug: 11281877
Bug: 12810574
Change-Id: Ib631f75eab73abc9877a7698171c45e8f2fc7600
2014-02-06 16:09:25 +09:00
Keisuke Kuroyanagi 5f5feeba13 Consolidate WordProperty and Word.
Bug: 11281877
Bug: 12810574
Change-Id: I9dc99188f80f25a8780c1860dab46e4aa80a23e5
2014-02-06 15:13:33 +09:00
Keisuke Kuroyanagi df1d3e733e Make WeightedString have ProbabilityInfo.
Bug: 11281877
Bug: 12810574
Change-Id: I265e3d8654c75766cd0e0d09d67ef62b4566298a
2014-02-05 21:44:55 +09:00
Keisuke Kuroyanagi aaf864db7b Merge "Separate header class from FormatSpec." 2014-02-04 12:42:44 +00:00
Keisuke Kuroyanagi b986f78ba8 Separate header class from FormatSpec.
Bug: 12810574
Change-Id: Iacf1cd05a268bf690ab864b5e32a18a4b0ccc693
2014-02-04 21:36:04 +09:00
Keisuke Kuroyanagi 33fd13bf3c Check timestamp for each pointer.
Bug: 11325631
Change-Id: I4e296cdeccf21323c5732754e86c3a4075ccf82a
2014-02-04 14:04:26 +09:00
Jean Chalard 4e6f72cb80 Merge "[HD03] Straighten out attribute key names in Java." 2014-01-31 08:40:25 +00:00
Keisuke Kuroyanagi faa9cd1fbd Fix dicttool_aosp build.
Change-Id: I52918fea02425b628045443d63d178e289ac4fb7
2014-01-31 17:16:47 +09:00
Jean Chalard 79b2e4d86c [HD03] Straighten out attribute key names in Java.
Bug: 11281748
Change-Id: I1d813bdacd45bcfd9c4cc73ac1d67c5c89854e86
2014-01-31 14:46:07 +09:00
Jean Chalard d1f463eacf [IL69] Oust Keyboard from WordComposer#setComposingWord
Bug: 8636060
Change-Id: I624a45500603dfad355ee3b8b794b2d895219c0b
2014-01-23 15:32:59 +09:00
Tadashi G. Takaoka 47f04e2e35 Fix checkbuild breakage on dicttool
This CL fix the checkbuild build, though I'm not sure it can create
working dicttool or not.

Change-Id: I5aec34a0f72441c75ac48184c0550b8e0fc40634
2014-01-17 00:25:11 +09:00
Jean Chalard 84a3047e80 Fix build.
Change-Id: I6d0b572190080e58e95f72856ad39e72a49537b7
2014-01-10 12:18:26 +09:00
Keisuke Kuroyanagi c2fd53ee0e Remove ver4 dict updater.
Change-Id: I468994c98d091be621b9fb3fbe6405c67fc6a465
2013-12-17 18:17:51 +09:00
Jean Chalard 5590e9d040 Merge "Make the bad header a checked exception and fix dicttool test" 2013-12-16 07:18:44 +00:00
Jean Chalard 3df617323e Make the bad header a checked exception and fix dicttool test
Change-Id: If780a2a1cb722aee83d910904c0a6315add9552d
2013-12-16 15:40:45 +09:00
Jean Chalard b868375763 Fix failing tests
- Version 3 is not supported
- Now passing the right string to open v4 dicts. Fix the tests for this.

Change-Id: I7829330c3568a715b96396ba4e4e69c6e17775ab
2013-12-16 14:32:19 +09:00
Jean Chalard a245d15da5 Have dicttool use the native library to generate v4 dicts.
Yay !

Change-Id: Iea8ced9e81031b9ab7eff05ad9ef7215be248de9
2013-12-13 18:18:20 +09:00
Jean Chalard 7b55cd3e2b Remove flags from Java side.
This simplifies the code quite a bit.
- GERMAN_UMLAUTS are now handled through a key-value attribute.
  The dictionary generator does not need to know about it any more.
- FRENCH_LIGATURES are deprecated as we handle them with shortcuts now.
- CONTAINS_BIGRAMS is deprecated. Bigram processing is always applied
  regardless of this flag.

Bug: 11281748
Change-Id: If567e52e245a9342adc7f3104a0f7d8d782df8c1
2013-12-13 18:15:05 +09:00
Ken Wakasa 2fa3693c26 Reset to 9bd6dac470
The bulk merge from -bayo to klp-dev should not have been merged to master.

Change-Id: I527a03a76f5247e4939a672f27c314dc11cbb854
2013-12-13 17:13:32 +09:00
Yuichiro Hanada 73665510ca Show more messages when reading a compressed combined format file.
Change-Id: I51a1b9454fcfe656e0fcf762dcfd9ecbadde86c3
2013-10-08 17:05:39 +09:00
Yuichiro Hanada 48e01ec111 Make dicttool read the compressed combined format.
Change-Id: Ib39fa110402895a655f4e705caae53397ace9259
2013-09-30 14:59:19 +09:00
Yuichiro Hanada 51a590b2fe Fix getDictionary.
Change-Id: I6bc3ec8dd4397a9aaf9dca2f16ce8a1929a47e9e
2013-09-26 15:26:31 +09:00
Yuichiro Hanada fa68e2cdf5 Add a new option for version 4 to dicttool.
Change-Id: I18fd48c1f6921758d30330fbc77f4a917c33f1c8
2013-09-19 11:59:42 +09:00
Yuichiro Hanada 0e40cd0c40 Add getDictDecoder.
Bug: 9618601
Change-Id: I173100ac704c03f7d5d0d53477e83cab5d1110d4
2013-09-12 20:14:09 +09:00
Yuichiro Hanada 95bc256f41 Add a flag to readDictioanryBinary in DictDecoder.
Change-Id: I356adb72047ebc43c924fbff1ff45e7460508a31
2013-09-11 18:20:56 +09:00
Yuichiro Hanada 576f625ee1 Rename CharGroup to PtNode.
Bug: 10233675
Change-Id: I7b0eb07d195cd386cd0d9e97cd59bf48fcf24107
2013-08-26 15:58:30 +09:00
Yuichiro Hanada e9a10ff0f0 Add DictDecoder.readDictionaryBinary.
Bug: 10434720
Change-Id: I14690a6e0f922ed1bab3a4b6c9a457ae84d4c1a4
2013-08-23 20:29:25 +09:00
Yuichiro Hanada c922c8a504 Add DictEncoder.
Change-Id: I41049b9118b58838e5dedf8e5618d939ca70c5ef
2013-08-22 11:53:41 +09:00
Yuichiro Hanada a306e08753 Rename BinaryDictEncoder to BinaryDictEncoderUtils.
Change-Id: I4dabf17da7003b1d8204a83dbd10e5be6e8fd805
2013-08-21 18:54:34 +09:00
Yuichiro Hanada 112257e40f Rename BinaryDictDecoder to Ver3DictDecoder.
Change-Id: Ibf9b95b658df6e2c2218bdb62e2380f326a03832
2013-08-20 17:11:51 +09:00
Yuichiro Hanada 77bce05e6f [Refactor] Rename BinaryDictReader and BinaryDictDecoder.
BinaryDictReader -> BinaryDictDecoder.
BinaryDictDecoder -> BianryDictDecoderUtils.

Change-Id: Iadf2153b379b760538ecda488dda4f17225e5f37
2013-08-19 19:36:31 +09:00
Jean Chalard af30cbf0ee Rename Node to PtNodeArray
Bug: 10247660
Change-Id: I1a0ac19f58f96adb5efac5fd35c6404831618c99
2013-08-16 16:24:54 +09:00
Yuichiro Hanada a94eb97413 Remove unused imports.
Change-Id: Ib46da6efeaa8f83a9cda24c947fc2e667a1468e8
2013-08-16 11:19:53 +09:00
Yuichiro Hanada 35f41a9f18 Fix build.
Change-Id: I80d177f3c9bff1fb90029edeafa4a62d0b99e09e
2013-08-15 20:47:42 +09:00
Yuichiro Hanada 94460eba11 [Refactor] Divide BinaryDictInputOutput into BinaryDictEncoder and BinaryDictDecoder.
Change-Id: I7c3269d77e3e3b567e459dcaa1bc029903941744
2013-08-15 20:23:07 +09:00
Jean Chalard e7870a2c0d Add an initial JNI interface to dicttool.
Bug: 10100269
Change-Id: I883992c2033e7d9e7c754c0bf653767728b221b6
2013-08-15 17:58:55 +09:00
Ken Wakasa 117f18e844 Revert "[Refactor] Divide BinaryDictInputOutput into BinaryDictInputUtils and BinaryDictOutputUtils."
This reverts commit 4c63d0614e.

Change-Id: I1fa277d720bab4d895259df7d6d82eebfa5eb6c5
2013-08-15 08:54:29 +00:00
Yuichiro Hanada 4c63d0614e [Refactor] Divide BinaryDictInputOutput into BinaryDictInputUtils and BinaryDictOutputUtils.
Change-Id: I0d476abe763c11ba9005152f928e8dccf15ac9de
2013-08-15 15:46:58 +09:00
Yuichiro Hanada 3feacba1eb Add BinaryDictReader.
Bug: 9618601

Change-Id: Ief07fa0c3c4f7f5999a3fafcef4e47b6b6fd8143
2013-08-13 19:55:05 +09:00
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 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
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
Ken Wakasa 02996dc56a Clean up dependency for dicttool
bug: 7635215
Change-Id: Ie50297ab592261390885c593341b6c46161b2e63
2012-11-29 19:09:01 +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