Commit Graph

185 Commits (1ba6831726f2f72019a0bca2f44d9e8be7575e09)

Author SHA1 Message Date
Tim Murray dd28478f5c Use default compiler flags for dicttool.
Not using this causes the triple to not be passed to clang, breaking Darwin.

bug 16172793

Change-Id: If7484c5dbcccce7d925bec97bff0a3e4c30e9434
2014-07-23 21:44:25 -07:00
Yohei Yukawa 6b14bbf125 Fix build breakage in dicttool
This CL fixes the build breakage caused by I0dd103185dcf62fb1e2505
due to the lack of android.text.Spanned in host environment.

BUG: 16029304
Change-Id: Ic966d10e8abe2c2be8d62c09d1502574535aa8b8
2014-07-20 12:46:34 +09:00
Tadashi G. Takaoka dc25f61e23 Fix dicttool build
This is a followup CL of Ic0268fd128.

Bug: 15318007
Change-Id: I3cd78d6db4030c558b9277ceaaf8ea76b9acdc66
2014-07-16 20:16:27 -07:00
Keisuke Kuroyanagi b8a9479b57 Move phrase gesture from additional features to public.
Bug: 15758242
Change-Id: I703dc2703afdf9402c5d2ac27411b74ece993dba
2014-07-08 16:36:06 +09:00
Tadashi G. Takaoka fec4769e0b Refactor dicttool with try-with-resource
This CL must be checked in together with Idd7c744d0f.

Change-Id: Ia0ff09a054c1852b39cdce22a4377108afb254e2
2014-06-22 23:20:37 -07:00
Ken Wakasa 54360424a1 Dicttool's shared lib is now built for 64bit
Change-Id: I3a21384e8ee6b419088f8140ff56a4ee89c3b052
2014-06-16 14:48:55 +09:00
Ying Wang c49c9c52be resolved conflicts for merge of 90b948ea to master
Change-Id: Ic86260b4e49ebda2ee718eadf0109ad9626a68e6
2014-06-11 12:28:56 -07:00
Ying Wang fb57fe263c Use LOCAL_MULTILIB to build host lib as 64-bit
Also we should use LOCAL_REQUIRED_MODULES instead of
LOCAL_ADDITIONAL_DEPENDENCIES.

Bug: 13751317
Change-Id: I742ff14b3de168e14e646749cf4f6bc9c9e7bc62
2014-06-09 12:16:30 -07:00
Jean Chalard 99ac090738 Fix the build.
Change-Id: Ie1cdc5642d8b6f63dbf71603b993f36b5c5f923c
2014-05-29 21:51:49 +09:00
Tadashi G. Takaoka 99258cb0b2 Warn that dicttool_aosp isn't supported on Darwin
Change-Id: I56def43213e94e5b1267e8e900c2192f4b0c2cb5
2014-05-24 03:08:57 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Jean Chalard 7086d88d3e Have dicttool test tidy up after itself.
Bug: 13776363
Change-Id: Icb1d3fc0efe71e0339b434928e8aed507f2fb590
2014-05-23 19:56:57 +09:00
Keisuke Kuroyanagi 83c40a2301 Use PrevWordsInfo instead of String in Java side.
Bug: 14119293
Bug: 14425059

Change-Id: I3d5da84881a49a04550180dd9aac2c37da2ed762
2014-05-19 13:55:40 +09:00
Jean Chalard 5ce39dfa78 Fix a bug where changing languages kills the composition.
Bug: 14926896
Change-Id: Id2a06c68a51f833db4d8bbc858a232c2696afb6e
2014-05-14 20:34:32 +09:00
Jean Chalard be99616afa Create the path for specifying combining rules in the subtype
Also add the skeleton of the combining rules for Myanmar
reordering as a pilot.

Bug: 13945569
Change-Id: Iabeb6838f45f1efff482143595ce5b48543e0c43
2014-05-12 15:58:51 +09:00
Ken Wakasa 694114feca Remove redundant LOCAL_IS_HOST_MODULE assignments
Also, remove irrelevant LOCAL_NDK_STL_VARIANT for host modules.

Change-Id: I45e916c11f7c1f9b13956f01274a82ee7de1f558
2014-04-04 22:32:45 +09:00
Ken Wakasa 3ccbf7ef08 32-bit dicttool
As we can't easily turn on -m64 for only one module, the JNI library for
a host tool should be 32-bit, at least for now.

Change-Id: I1f001ccca1ad968a2241c0494bb70391fb11a59f
2014-04-04 20:10:04 +09:00
Yohei Yukawa c73b46f40a Do not call exit 1 when loaded with source command
BUG: 13754552
Change-Id: I3d5e4c0786547521325405100c175dd1b21754df
2014-04-02 19:47:08 +09:00
Ken Wakasa 96092ebd78 Use Clang for dicttool
Fix the wrong shared lib name too.

Change-Id: Ib98c55dfd1aee4a762dc96b12df3a463bef2ac80
2014-03-27 19:14:37 +09:00
Keisuke Kuroyanagi 93cda5bb39 Move code only used for dicttool and tests under tests.
Bug: 13035567
Change-Id: I13c6df013ef2b67c9bf67455d9c32d283bf9ea2e
2014-03-27 15:30:32 +09:00
Jean Chalard cbed462d19 [CB12] Reset the combining state when resetting the composer
Bug: 13406701
Change-Id: I490574b7ca4b953f67dd2c0ef97401297fade0a4
2014-03-24 17:44:31 +09:00
Jean Chalard 835965a75e [CB11] Get the result of the combination
Change-Id: I165ec4a24f5b1334d55c14948e4d942ec40eb33b
2014-03-20 23:33:12 +09:00
Jean Chalard f2bb15b0ab [CB09] Pass events through the combiner chain
Bug: 13406701
Change-Id: I4696f145478afdd132314b7d3c148c3a9ca11c9c
2014-03-20 16:59:29 +09:00
Jean Chalard 7ede642df4 [CB08] Create a combiner chain in the word composer.
Bug: 13406701
Change-Id: I3b9f75de9283f76366d1bef7e14a8f22f2186669
2014-03-20 14:27:55 +09:00
Jean Chalard f8accd8839 [CB04] Add an event array to WordComposer.
Bug: 13406701
Change-Id: I9ecd2709c8f1c678a85b0cfaf7c5ed4f78459821
2014-03-14 12:44:49 +09:00
Keisuke Kuroyanagi f14cf3e64c Fix: dicttool build.
Change-Id: I5c3bcbe9f3054bdd1a760398fe11344e0e05ac6a
2014-03-07 13:01:48 +00:00
Keisuke Kuroyanagi 32326a9d7a Merge "Move DictionaryOptions from FusionDictionary to FormatSpec." 2014-03-07 10:42:18 +00:00
Keisuke Kuroyanagi a103e29d00 Merge "Separate WeightedString from FusionDictionary." 2014-03-07 09:07:26 +00:00
Ken Wakasa 344742b0d1 Recover the dicttool build except for Mac
With a hack: Temporarily disable host tool build on Mac until the
build system is ready for C++11.

Change-Id: Ib412ba0d7fecc968cc09b4d8fde4e838bdc0618a
2014-03-07 15:04:27 +09:00
Ken Wakasa ca0a0da864 Switch to C++11
Change-Id: Ib2970327c36422d7b11103d52ba7e9e52db5554f
2014-03-06 20:32:20 +09:00
Keisuke Kuroyanagi 3ad4af2354 Move DictionaryOptions from FusionDictionary to FormatSpec.
Bug: 8187060
Bug:13035567

Change-Id: Id4f45e589521ae98c926a4c0607be10ce1a983f2
2014-03-06 18:53:09 +09:00
Keisuke Kuroyanagi 516f86815d Separate WeightedString from FusionDictionary.
Bug: 8187060

Change-Id: I40c1dafca3eb52244c64fdb4c1db30a56385d678
2014-03-06 18:53:06 +09:00
Keisuke Kuroyanagi e784148ae6 Separate utility methods from BinaryDictionary.
Bug: 8187060
Change-Id: Ice2984e332b7bd3bb17174aefc80b5635b72fc50
2014-03-05 18:19:34 +09:00
Keisuke Kuroyanagi 36305d4207 Fix: dicttool build.
Change-Id: I592b14eba895786d0981586a01ef545e003396c8
2014-02-28 19:04:49 +09:00
Jean Chalard 890b44e537 Correctly read the header of APK-embedded dicts
Bug: 13164518
Change-Id: I8768ad887af8b89ad9f29637f606c3c68629c7ca
2014-02-24 22:54:01 +09:00
Keisuke Kuroyanagi 0fc93fe445 Implement PatriciaTriePolicy::getNextWordAndNextToken().
Bug: 12810574
Change-Id: Id1d44f90de9455d9cbe7b6e0a161cae91d6d422c
2014-02-15 17:39:20 +09:00
Keisuke Kuroyanagi 8e3a1d0f89 Remove unused argument from readDictionaryBinary.
Bug: 12810574
Change-Id: Ice415ebd8d11162facca3fe8927ef8a616b11424
2014-02-14 19:02:15 +09:00
Keisuke Kuroyanagi 69ccac6e51 Remove unused code.
Bug: 12810574
Change-Id: If0ef02a984469a3b6e0c00b1c3c8d98d0d2b5466
2014-02-10 15:05:11 +09:00
Keisuke Kuroyanagi 8ffc631826 Make PtNode have ProbabilityInfo instead of raw value.
Bug: 11281877
Bug: 12810574
Change-Id: Id1cda0afc74c4e30633c735729143491b2274a7b
2014-02-10 15:05:08 +09:00
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
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