Fixes bug where empty previous ngram context not at the
beginning of a sentence incorrectly returned the
beginning-of-sentence marker.
Bug: 19612336
Change-Id: I5ddf3408e20dcedf70487b85c983cd3fc12550e7
- Show the opt-in text
- Show the account picker if user presses 'enable sync'. Previously
we disabled the sync pref which was confusing.
- Remove the debug tags from some prefs; and improve messaging overall
General rules;
- sync is turned ON : user checks 'enable sync' pref AND
accepts the opt-in AND chooses an account
- sync is turned OFF: when user signs out
Demo link
https://drive.google.com/a/google.com/file/d/0B9tNQOWdRuiWSUdVVE5rVDJudlk/view?usp=sharing
Change-Id: I2e7933796b15e47005ba9970a8c1294416ef31a0
Currently, the Delight3DictionaryFacilitator sets a boolean flag when the top
suggestion score exceeds the auto-correction threshold. This flag is used to
trigger auto-correction of the typed word. Also, the existing logic assumes
that if allowsToBeAutoCorrected then the word is invalid, which is no longer
true after we stopped using whitelists.
Bug 19518376.
Change-Id: Ifa7f6a09c07d25ac68c6cf3aec91f358bd88689f
There should be 1 executor each for static and dynamic language models.
This prevents too many dynamic LM updates from running in parallel,
competing for resources.
Change-Id: I8ec439e0ea2d92fba275bc20a0b8c9193346a0c1
When committing a span after a revert, the offset logic was such that it
split a surrogate unicode pair used to express an emoji.
Checking the last character of the span lets us avoid this problem.
Fix for bug 19255233.
Change-Id: I07d18d9002b5075f7925319dd05962011656c311
implementation DictionaryFacilitatorImpl.java and add a java-overridable
factory DictionaryFacilitatorProvider.java used to create a
DictionaryFacilitator.
Change-Id: Id4a58ae31feaa4d12a048a772c8d76ff82fdee45
Bug 17743363: Preliminary subtypes should be removed from F-release
This reverts commit 45c917e238.
Change-Id: I5e91a7fd0efdc16e140a91fab6300bd8ba9cd6c7
Attempt to use dictionary facilitor without invoking
preference manager. Instead use account from settings only when
things are being reset/changed. Discussion forked from ag/591663
Overall, the idea here is to maintain an account information
inside dictionary groups. Reset the dictionary groups if
account changes (the way we do for locale). Since only user
history dictionary is currently affected, the check to reset user
history dictionary also includes the check to verify the account.
For other things remain the same.
SettingsValues holds the current account (and is updated if prefs change
due to change in account settings). The updated settings are then
propagated to dictionary facilitator via LatinIME#loadSettings.
Bug:18104749,18469539
Change-Id: I553e776e7ea125d0fb7a1fe70a4c7eb0b2277fb8
Add API to ExpandableBinaryDictionary to dump content
from a given dictionary. We use this for dumping data
for sync process.
Refactored UserHistoryDictionaryTests to scrap out the util
methods for testing. These utility methods would be used
for testing sync + user dictionary code in LatinIMEGoogleTests
Bug:18106539
Change-Id: I357f9192ea1bd69a526d0b620c25616a2e8e9d5b
Once the translation strings are updated, the uni test starts
failing. Then this CL should be reverted.
Change-Id: I884663feaa53998a98dd0e488ae8e3e6d0ad4ffd
UserHistoryDictionary currently uses locale to determine the
UserHistoryDictionary on the filesystem. With this change we
use the account name as well. Thus each UserHistoryDictionary
would following the following spec:
UserHistoryDictionary.<locale>.<account>.dict.
In case no account is selected, we default to the existing
spec:
UserHistoryDictionary.<locale>.dict
Example
UserHistoryDictionary.en_US.testaccount@example.com.dict
Bug: 18104749
Change-Id: Iab031e166b55cf2ded68275a7e9be22475737b37
This will allow to greatly improve the performance of the
metadata-generating files, as they won't have to wait for
the info command to read the entire dictionary when the
header is all we need.
Also add tests, and while we're at it, use the seed as
intended to enable reproducible tests.
Change-Id: I0ba79ef62f0292b23e63aed57ff565bb102281a2
It's still unused as of this change but the next change will use it
As a reference point, generating the metadata for Bayo takes
3'02" on my machine with the info command; it's down to 16" if
made to use this instead. The gains increases with the number
of dictionaries obviously.
Change-Id: I0eeea2d8f81bb74b0d1570af658e91b56f7c2b79
Without personalization:
Total words: 1134774, Success Num: 899230, Success Percentage: 79.243%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1871, Bad Failure Percentage: 0.165%
Failures, with auto-correction (F-C): 29084, F-C Percentage: 2.563%
Max Keystrokes: 6072959, Min Keystrokes: 4436090, Keystroke Saving Percentage:26.953%
Before:
Total words: 1134646, Success Num: 925194, Success Percentage: 81.540%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1316, Bad Failure Percentage: 0.116%
Failures, with auto-correction (F-C): 28288, F-C Percentage: 2.493%
Max Keystrokes: 6072831, Min Keystrokes: 3946188, Keystroke Saving Percentage:35.019%
After
Total words: 1134659, Success Num: 944746, Success Percentage: 83.263%
Bad Failures, with auto-correction (typed word == expected word, output word != expected word): 1258, Bad Failure Percentage: 0.111%
Failures, with auto-correction (F-C): 28016, F-C Percentage: 2.469%
Max Keystrokes: 6072844, Min Keystrokes: 3387333, Keystroke Saving Percentage:44.222%
Change-Id: I3af42ec37a11847c0429c28616e726f6a339247f
(This is a cherrypick of http://ag/576739)
Also, modify the IllegalArgumentException to capture the
values passed for start, end, and array.length to make
debugging easier in the unlikely event that it is thrown.
Add corresponding tests for the exceptions.
Tested:
tapas LatinImeGoogle LatinImeGoogleTests userdebug
make -j30 && \
adb install -r \
out/target/product/generic/data/app/LatinImeGoogleTests/LatinImeGoogleTests.apk && \
adb install -r \
out/target/product/generic/system/app/LatinImeGoogle/LatinImeGoogle.apk && \
adb shell am instrument -w -e class \
com.android.inputmethod.latin.utils.CollectionUtilsTests \
com.google.android.inputmethod.latin.tests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I0c579ca4f4f2a9b2575aa6f8fa75e3ee4a21cf8a
If a word is once deleted, the word never gets into the
personalized dictionaries due to this bug.
Change-Id: Ife4e3fe1ba0615b4135e6291d2151b0db7d3f940
java.lang.IllegalAccessError: Class ref in pre-verified class resolved
to unexpected implementation because of latinime-common reference added
two times.
Change-Id: I4ce1185c10b9a217022e830b02aec4f1ea50f2eb
This CL fixes the following compiler warnings.
- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations
Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7