Commit Graph

143 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Keisuke Kuroyanagi 4eb220269b Remove ContextualDictionary.haveContentsChanged().
Change-Id: I7023ba4d9515dcad90e0a226f70936550c5241f4
2014-05-12 13:50:08 +09:00
Keisuke Kuroyanagi 47c76f0a45 Merge "Add contextual dictionary to the dictionary facilitator." 2014-05-12 04:42:33 +00:00
Keisuke Kuroyanagi 28ebe2db23 Merge "Check whether contacts have changed using hashCode()." 2014-05-09 03:48:19 +00:00
Keisuke Kuroyanagi 89eaa6701f Periodic GC for personalization dict.
Change-Id: I1ef922684cbf1de10c45c66eb119c2343d194da3
2014-05-08 17:20:43 +09:00
Keisuke Kuroyanagi 9898ee6267 Check whether contacts have changed using hashCode().
Bug: 13755213
Change-Id: Ie2f7b7f9dc8bd3fce395618877d9f234287dcb21
2014-05-08 12:25:32 +09:00
Keisuke Kuroyanagi fb87c250cb Add contextual dictionary to the dictionary facilitator.
Bug: 14161647
Change-Id: I0e706b2abd0cb9f351e28681e275cd7f2fdbfd9c
2014-05-01 18:45:01 +09:00
Keisuke Kuroyanagi 99f2664871 Use dictType to class map to create sub dicts.
Bug: 13755213
Change-Id: I4dcd5684bc65f13361bf9c4f9d50b07b1e33c62d
2014-05-01 18:44:57 +09:00
Keisuke Kuroyanagi 98e358a936 Create factory methods for sub dicts.
Bug: 13755213
Change-Id: I046af54b4860d2839328f2089ea785d81d04cf43
2014-05-01 17:22:23 +09:00
Keisuke Kuroyanagi 1ab6bfdc60 Simplify DictionaryFacilitatorForSuggest.
Bug: 13755213
Change-Id: I9663d1d60fccd8deb1a22683fb06fe64dee06b45
2014-05-01 15:51:03 +09:00
Xiaojun Bi 516c884b11 Merge "Prepare to implement distracter filter" 2014-04-25 17:15:53 +00:00
Xiaojun Bi 281dd99346 Prepare to implement distracter filter
It was implemented according to the Plan B in the
design doc:
http://go/ime-misspelling-filter

This CL is to create a DistracterFilter instance
and pass it to PersonalizationDictionarySessionRegistrar.

This patch should be checked in together with
Id633b4fd45693

Bug: 13142176
Change-Id: Ia4957e64218c9619fcf9bb91795a187617c72a2e
2014-04-25 09:13:22 -07:00
Keisuke Kuroyanagi 56e4848ead Handle personalization dictionary as an ExpandableBinaryDictionary.
Bug: 13755213
Change-Id: I26e070e89e09b37e9dcc200d597c74c591467a66
2014-04-24 21:37:49 -07:00
Keisuke Kuroyanagi 67c0ed8f8c Handle user history dictionary as an ExpandableBinaryDictionary.
Bug: 13755213
Change-Id: I1ea8a6df007af7153852f2d32bf5e8ec669c432b
2014-04-24 14:48:01 -07:00
Keisuke Kuroyanagi 2dcb5c1b4d Remove clearAndFlushDictionary() and use clear().
clearAndFlushDictionary() was needed when dictionaries are constructed
in java side. All expandable dictionaries now use native code; thus,
this method is same to clear() and no longer needed.

Bug: 13755213
Change-Id: Ifd836e64f8ff807930f7cd2319b103b65e8fce70
2014-04-24 11:25:47 -07:00
Keisuke Kuroyanagi fdd2db576d Always close binary dicts for personalized dicts.
Bug: 10923130
Bug: 13664080
Change-Id: Ib247c775194a03462387994cd832b1650bfd1915
2014-04-03 18:08:23 +09:00
Keisuke Kuroyanagi c17311cefe Remove unused method.
Change-Id: Iefb75136080e73c357511df045816f18cec767a6
2014-03-27 17:46:38 +09:00
Keisuke Kuroyanagi 58a536e41a Merge "Use dynamic operations to construct all ver4 dicts." 2014-02-28 09:37:23 +00:00
Keisuke Kuroyanagi d302b98ce6 Added a method and run GC for testing.
Bug: 13231889
Change-Id: If64b7422967c3e4107c845072b64a7bb26a35f7e
2014-02-28 18:17:09 +09:00
Keisuke Kuroyanagi ea89cb40b7 Use dynamic operations to construct all ver4 dicts.
Bug: 8187060
Bug: 13127350
Change-Id: I081ee904c41898128efa8ba7a1bf3fa0a46c6231
2014-02-27 23:21:09 +09:00
Keisuke Kuroyanagi 18f91cf617 Add a method to create dict with additional attributes.
Bug: 13197276
Change-Id: I80311a51d9e98bfeb8c0dd9cd4adde93af366d54
2014-02-26 19:03:27 +09:00
Keisuke Kuroyanagi 2b72aa07a9 Disconnect app data search client after fetching all data.
Bug: 13138201
Change-Id: Ibaa3c2c22a4fe44ea23e92ce8576141bbad09b12
2014-02-24 14:47:54 +09:00
Keisuke Kuroyanagi d102eb80da Remove personalization dicts for multilingual users.
Bug: 13067743
Change-Id: I1f50cb137b6054dc9442237586b70fc0aa2bf427
2014-02-19 21:00:27 +09:00
Tadashi G. Takaoka 0cda0e8a9c Fix UserHistoryDictionaryTests
Change-Id: I5f2f555f9c3f471545921ef80e4cf528976be837
2014-02-13 16:16:44 +09:00
Tadashi G. Takaoka 870d89b1a8 Refactor dictionary constructor
This change must be checked in together with I3923d5af2a.

Bug: 12994268
Change-Id: I19de6efbdfa3b6c6c69a20a836e53962fd5737de
2014-02-13 13:23:55 +09:00
Jean Chalard 5095fabdd0 Stop considering personalization dicts outputs as words
Bug: 12800726
Bug: 12798403
Change-Id: I6d60f9ad39761757f8a64533f40d6441f3a36410
2014-02-05 21:57:37 +09:00
Keisuke Kuroyanagi b986f78ba8 Separate header class from FormatSpec.
Bug: 12810574
Change-Id: Iacf1cd05a268bf690ab864b5e32a18a4b0ccc693
2014-02-04 21:36:04 +09:00
Keisuke Kuroyanagi d79fd29f61 Make dumpAllWordsForDebug() use getNextWordProperty().
Bug: 11736680
Bug: 12810574
Change-Id: I32a388e23ee7da5d7291e88a46c90b61d2f25dee
2014-02-04 13:51:49 +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
Keisuke Kuroyanagi ed95d79cc4 Make contacts dict and user dict version 4.
Bug: 12515251
Change-Id: I0b332e03b9102957bffaea56d4de17b9ee3cef23
2014-01-17 10:30:16 -08:00
Keisuke Kuroyanagi 12474634c5 Update personalization dict via dictionary facilitator.
Change-Id: I512c41e12d8d31f03b5df6ad03bf7711611c80f5
2014-01-15 17:54:17 -08:00
Tadashi G. Takaoka 7b9b095090 Move LanguageModelParams class to utility package
This change must be checked in together with Ic82d951237.

Change-Id: I2ab451330f85a0147563b805682f26edecb71a29
2014-01-15 16:14:53 +09:00
Keisuke Kuroyanagi eb28bac542 Check corpus handles during startup for personalization.
Bug: 12479792
Change-Id: I62fd75d4bebd28afebd9631e865f5d59385511e7
2014-01-10 20:28:30 +09:00
Keisuke Kuroyanagi c09fd175c3 Prepare using dictionaryFacilitator for amanatto updates.
Bug: 11736529
Change-Id: I0d9d9b1c1108b11064163df7c2089f53e92cd7ad
2014-01-07 18:11:23 +09:00
Keisuke Kuroyanagi 55713e3695 Update personalized dict only when single subtype is used.
Bug: 12424891
Change-Id: If041d1ab45988dbf9b878ae3367fee0fbc8a8988
2014-01-07 18:10:27 +09:00
Keisuke Kuroyanagi f1457e7a22 Remove personalized dicts when the option is turned off.
Bug: 11757851

Change-Id: I94f32859d862fe41e39845ab2bfc2d396c6aea0f
2013-12-25 11:44:16 +09:00
Keisuke Kuroyanagi 8732f9c5f9 Enable Personalized dictionaries based on the setting.
Bug: 11757851
Change-Id: I83e484195f036e35cbae21fe63148bc9c22bfad7
2013-12-17 19:36:19 +09:00
Keisuke Kuroyanagi c837767819 Make required binary dictionary version use FormatSpec.*
Change-Id: Ifb17d6551bc5071553e32a5640dd166c39374461
2013-12-16 16:50:28 +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
Keisuke Kuroyanagi 6bc5acaa79 Fix: Suggested words from user history are invalid.
- Suggestions form user history can contain invalid words.
- isValidWord always returns false.

Bug: 11139426
Change-Id: I6075b275603332ddb00f4a9284afcaa82d824270
2013-10-22 05:23:48 -07:00
Jean Chalard f3204eebb1 Set the shortcut frequency correctly.
14 is the right value.

Bug: 11076722
Change-Id: I95d404b540f7fbe4932d1f8498cde23f1df0314f
2013-10-07 18:55:42 +09:00
Keisuke Kuroyanagi 11f7cae094 Fix UserHistoryDictionaryTests.
Bug: 6669677
Bug: 10667710

Change-Id: I6cdc6a6c9cacc7f276fda3a26ec31e3eb928471c
2013-10-03 20:55:34 +09:00
Keisuke Kuroyanagi f36a97ab3a Try decaying user history at hourly intervals.
Bug: 6669677

Change-Id: Ib465fa7e1a7f289a07843535ba89d0dd5259e803
2013-10-02 18:06:08 +09:00
Keisuke Kuroyanagi fd02b2d6ee Implement simple dictionary decay.
Groundwork and implement simple decay.
Increment probability when typed and decrement probability
at GC.

Bug: 6669677

Change-Id: Ib12caead0cbeef4ce7808fe8ac0b00ee331523fe
2013-09-30 20:53:35 +09:00
Keisuke Kuroyanagi 1cf4789ba6 Merge "Set header attributes for ExpandableBinaryDictionary." 2013-09-29 05:14:22 +00:00
Keisuke Kuroyanagi 5ed30a7660 Set header attributes for ExpandableBinaryDictionary.
Bug: 6669677

Change-Id: I2462777eaa07600f1c774226adfc4f351882f523
2013-09-28 12:50:09 +09:00
Yuichiro Hanada a328f538c3 Fix PrioritizedSerialExecutor.
It was possible that fetchNextTasks() would be called by multiple
threads concurrently.
If it happens, some tasks in the task queues might be ignored.

Change-Id: Idc81c43c45e382da3850cc55b9a42c281548d2a8
2013-09-27 16:46:34 +09:00
Keisuke Kuroyanagi 5ef6209656 Create empty dictionary file in native code.
Bug: 6669677
Change-Id: I46d23deee1fd091678f4593561cb8687eb815212
2013-09-26 12:59:02 +09:00
Keisuke Kuroyanagi 2e58670da9 Quit using ExpandableDictionary.
Bug: 6669677
Change-Id: Ie90417fa9b726454fe729a665fcd549efabb9e94
2013-09-24 22:57:15 +09:00
Satoshi Kataoka 97485273d7 Low memory mode in UserHistory
Bug: 8967766
Change-Id: Id40f54f4d9f43d1f796377983a5fc0ca3417e133
2013-09-24 20:36:31 +09:00
Yuichiro Hanada 0e40cd0c40 Add getDictDecoder.
Bug: 9618601
Change-Id: I173100ac704c03f7d5d0d53477e83cab5d1110d4
2013-09-12 20:14:09 +09:00
Yuichiro Hanada ef073f4024 Use PrioritizedSerialExecutor instead of ReentrantReadWriteLock.
Change-Id: I003b769e408ebd692085a7e17fed6d9396876202
2013-09-10 19:05:41 +09:00
Satoshi Kataoka e5a35711b8 Check contents in user history dictionary tests
Bug: 10667710

Change-Id: I45ebb08cb4ef9a9f6d2da31e2c50e740f88209c2
2013-09-09 15:28:50 +09:00
Keisuke Kuroyanagi fe87f5f417 Pass additionalFeaturesOptions for getSuggestions().
This fixes null pointer exceptions that are caused when
getSuggestion() is called from spell checker.

Change-Id: Ifc9e7abb900e1a4646e33c91022effde439673e4
2013-08-28 19:24:28 +09:00
Keisuke Kuroyanagi f0c4575cf4 Fix: Wrong file name for dynamic prediction dictionary.
Bug: 6669677
Change-Id: Id6f06a7423600d3f0604fab43d855826c20d0545
2013-08-28 14:41:32 +09:00
Keisuke Kuroyanagi 6e04d65932 Make DynamicPred...Base extend ExpandableBinaryDictionary.
Bug: 6669677
Change-Id: I06afad35d3eb73510c34d10cd4116f5bcf934f7c
2013-08-26 18:50:22 +09:00
Keisuke Kuroyanagi 87a72f50c2 Introduce DynamicDictionaryWriter for dynamic dictionary.
Bug: 6669677
Change-Id: Ifcbeb88b908f2301ac062b411a95c8b38d24b90e
2013-08-23 22:04:27 +09:00
Yuichiro Hanada e9a10ff0f0 Add DictDecoder.readDictionaryBinary.
Bug: 10434720
Change-Id: I14690a6e0f922ed1bab3a4b6c9a457ae84d4c1a4
2013-08-23 20:29:25 +09:00
Satoshi Kataoka d4528b88e1 Refactor personalization dictionary
Bug: 9429906
Change-Id: I1fa4b045b21687e96de101a97e9593b0884d626f
2013-08-23 18:40:28 +09:00
Satoshi Kataoka 366c0c5198 Register personalization dictionary
Bug: 9429906
Change-Id: Ic754dd8da67446dfb1ebf44aa3d5ab0804298ca0
2013-08-22 18:06:59 +09:00
Yuichiro Hanada e301085a70 Move findWordByBinaryDictReader to BinaryDictIOUtilsTests.
Change-Id: I443238fd816dea9650dcbbeb3ea757f9674fa52f
2013-08-22 14:49:49 +09:00
Satoshi Kataoka 17cc396972 Merge "Fix build" 2013-08-21 10:56:18 +00:00
Satoshi Kataoka b1552723ee Fix build
Change-Id: I0c0be463552a37cecfb9a403e0723b1799fb8120
2013-08-21 19:55:07 +09:00
Satoshi Kataoka f739807a3f Merge "Add onDestroy to PersonalizationDictionarySessionRegister" 2013-08-21 10:54:08 +00:00
Satoshi Kataoka 3c8f22880f Add onDestroy to PersonalizationDictionarySessionRegister
Bug: 9429906
Change-Id: Ibf8efd7302da2c27ac59e62b0393f1eec03dc136
2013-08-21 17:24:12 +09:00
Yuichiro Hanada 112257e40f Rename BinaryDictDecoder to Ver3DictDecoder.
Change-Id: Ibf9b95b658df6e2c2218bdb62e2380f326a03832
2013-08-20 17:11:51 +09:00
Satoshi Kataoka 22f01a42fc Add a functionality to clear and flush prediction dictionary
Bug: 9429906
Change-Id: I84ec444e9d46a0080dc3450b8ab32bfb99407cfe
2013-08-20 12:28:05 +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
Satoshi Kataoka 6484a4f886 Consolidate onDictionaryClosed
Bug: 9429906
Change-Id: I51eef4c321cc268eac1c8dfd6561ab6e716a1fb0
2013-08-19 17:45:20 +09:00
Satoshi Kataoka 0e6fcf2bf6 Rename Personalization dictionary register functions
Bug: 9429906
Change-Id: Ibdce8db61ab6cc5922765e7ed8b7f2c718759de8
2013-08-19 16:53:21 +09:00
Keisuke Kuroyanagi c8ac8da4e4 Merge "Prepare ExpandableBinaryDictionary to make it updatable" 2013-08-19 07:20:16 +00:00
Yuichiro Hanada 8aaae56cf6 Fix unit test.
Change-Id: Ib104d5de71c2ab1a07921b407c74c21b0409d9af
2013-08-19 11:10:28 +09:00
Keisuke Kuroyanagi c8db6f21e9 Prepare ExpandableBinaryDictionary to make it updatable
Bug: 6669677

Change-Id: Iaa6100f58de78d104e19c7a3c41d67e7826264f9
2013-08-16 20:16:31 +09:00
Yuichiro Hanada 0d70bcc821 Limit the number of waiting UpdateBinaryTask to at most 1.
Change-Id: Ia588d8f29ab58983ea5321ff8c63ad273c33eab3
2013-08-16 19:44:47 +09:00
Satoshi Kataoka 283cf9cfc9 Add hex string utils
Bug: 9429906
Change-Id: I3267d1d86122ab471c3e63008c73e9f9b758fc8e
2013-08-16 16:17:48 +09:00
Satoshi Kataoka 1aae34873c tiny refactor
Change-Id: I776432b6c41cf8dee71fbd1565a6f3da9d762f9e
2013-08-15 13:38:05 +09:00
Satoshi Kataoka 4ee953125a Add a method to import one bigram and string utilities
Bug: 9429906
Change-Id: I73bbf65985196d62470552c576bb076a7cb95008
2013-08-14 18:56:12 +09:00
Yuichiro Hanada 3feacba1eb Add BinaryDictReader.
Bug: 9618601

Change-Id: Ief07fa0c3c4f7f5999a3fafcef4e47b6b6fd8143
2013-08-13 19:55:05 +09:00
Satoshi Kataoka 310f8a0f06 Call onDictionaryReady
Bug: 9429906

Change-Id: Ifc538b38b7d37469aecccd32a7e3f95a90558be7
2013-08-13 11:41:48 +09:00
Satoshi Kataoka 8c4fcb108f Add PersionalizationDictionaryRegister
Bug: 9429906
Change-Id: Ibd4d5cedb371c0b4ee1342a3e6d221c9e34c2402
2013-08-12 14:48:45 +09:00
Yuichiro Hanada 71ffcc6332 Fix to follow the field naming conventions.
Change-Id: I9b41b5f34e93a3f291a352cd85c5ac257beaa9ab
2013-08-08 12:03:36 +09:00
Satoshi Kataoka 80aa7197b4 Add a session for the personalization dictionary
Bug: 9429906
Bug: 4192129

Change-Id: I361ab380edeee5a8a8b364df3f9f4ab202b79105
2013-08-07 16:44:30 +09:00
Satoshi Kataoka 60586b57cf Connect the personalization dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I9c9f3ed7699f74339ad92be6dcddb8a52c377545
2013-08-01 16:33:20 +09:00
Satoshi Kataoka 567e7f05c1 Add the personalization prediction dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I0663de025405b2c92eebd528339b82baec97e2ce
2013-07-31 21:37:33 +09:00
Satoshi Kataoka 853d0fd122 Refactor the personalization dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I9f094bc5a6ce4652e310e090f1536e43f1f24ad1
2013-07-31 21:15:13 +09:00
Satoshi Kataoka 1439130442 Refactor the user history dictionary
Bug: 9429906
Bug: 4192129

Change-Id: If53bc3220627802d82ab7c396d0aabdb658573fa
2013-07-31 19:22:11 +09:00
Satoshi Kataoka 87d06afc66 Refactor on the user history dictionary
Bug: 9429906
Bug: 4192129
Change-Id: I1a2bfe96e18119d30a72290aa48746f77a021018
2013-07-31 16:48:55 +09:00
Jean Chalard 93445b4821 Fix some warnings
Change-Id: I7290cd1fb675a1b85b9b6ac2d464c932b5bca1dd
2013-07-31 16:17:01 +09:00
Satoshi Kataoka d45e4b6e5b Add personalization dictionary helper
Bug: 9429906
Bug: 4192129

Change-Id: Ic618b0b09a54ed46b20633bd4c1c570d4ac775af
2013-07-29 12:37:27 +09:00
Satoshi Kataoka 5c15b8f442 Add a place holder of the personalization dictionary
Bug: 9429906
Bug: 4192129

Change-Id: Ieacd0559e0bf286c5933e9dba716289303f533d6
2013-07-26 16:03:04 +09:00
Satoshi Kataoka ffcbbaf127 Refactor on UserHistoryDictionary
Bug: 9429906
Change-Id: I576a91643bdaf5017cc826ac2e07a74a9a275d60
2013-07-26 13:00:19 +09:00
Keisuke Kuroyanagi 1b100610b3 Adding additional feature settings.
Change-Id: I9fec0c03b7da9ce0305b494193f4cfe3fca144f3
2013-05-28 00:27:48 -07:00
Satoshi Kataoka 5648054667 Add account e-mail addresses to the user dictionary
Bug: 8683365
Change-Id: Id72540c515e61c3dd854892599645dd6d22b496d
2013-05-08 17:58:21 +09:00