diff options
author | 2013-01-11 14:17:17 -0800 | |
---|---|---|
committer | 2013-01-17 14:05:02 -0800 | |
commit | 345ef6762700cdb0fca25aa54b22ef83aaaac0ab (patch) | |
tree | a8f423f80dd6686bd0f56855d92bff98553635ea /java/src/com/android/inputmethod/research/Statistics.java | |
parent | e6a9655a0362bebccdf0d51ebc3579573617c95a (diff) | |
download | latinime-345ef6762700cdb0fca25aa54b22ef83aaaac0ab.tar.gz latinime-345ef6762700cdb0fca25aa54b22ef83aaaac0ab.tar.xz latinime-345ef6762700cdb0fca25aa54b22ef83aaaac0ab.zip |
[Rlog78a] Annotate logUnits with corrections
If the user makes a correction to a word, this is now explicitly indicated
in the logUnit.
Change-Id: I8638aadd7b8c8e32bbc9c4b020548d786513d887
Diffstat (limited to 'java/src/com/android/inputmethod/research/Statistics.java')
-rw-r--r-- | java/src/com/android/inputmethod/research/Statistics.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/research/Statistics.java b/java/src/com/android/inputmethod/research/Statistics.java index a9202651e..f0cb1578c 100644 --- a/java/src/com/android/inputmethod/research/Statistics.java +++ b/java/src/com/android/inputmethod/research/Statistics.java @@ -25,6 +25,7 @@ public class Statistics { private static final String TAG = Statistics.class.getSimpleName(); private static final boolean DEBUG = false && ProductionFlag.IS_EXPERIMENTAL_DEBUG; + // TODO: Cleanup comments to only including those giving meaningful information. // Number of characters entered during a typing session int mCharCount; // Number of letter characters entered during a typing session @@ -41,6 +42,8 @@ public class Statistics { int mDictionaryWordCount; // Number of words split and spaces automatically entered. int mSplitWordsCount; + // Number of words entered during a session. + int mCorrectedWordsCount; // Number of gestures that were input. int mGesturesInputCount; // Number of gestures that were deleted. @@ -49,6 +52,8 @@ public class Statistics { int mGesturesCharsCount; // Number of manual suggestions chosen. int mManualSuggestionsCount; + // Number of times that autocorrection was invoked. + int mAutoCorrectionsCount; // Number of times a commit was reverted in this session. int mRevertCommitsCount; // Whether the text field was empty upon editing @@ -113,10 +118,12 @@ public class Statistics { mWordCount = 0; mDictionaryWordCount = 0; mSplitWordsCount = 0; + mCorrectedWordsCount = 0; mGesturesInputCount = 0; mGesturesDeletedCount = 0; mManualSuggestionsCount = 0; mRevertCommitsCount = 0; + mAutoCorrectionsCount = 0; mIsEmptyUponStarting = true; mIsEmptinessStateKnown = false; mKeyCounter.reset(); @@ -152,11 +159,15 @@ public class Statistics { } } - public void recordWordEntered(final boolean isDictionaryWord) { + public void recordWordEntered(final boolean isDictionaryWord, + final boolean containsCorrection) { mWordCount++; if (isDictionaryWord) { mDictionaryWordCount++; } + if (containsCorrection) { + mCorrectedWordsCount++; + } } public void recordSplitWords() { @@ -184,6 +195,11 @@ public class Statistics { recordUserAction(time, false /* isDeletion */); } + public void recordAutoCorrection(final long time) { + mAutoCorrectionsCount++; + recordUserAction(time, false /* isDeletion */); + } + public void recordRevertCommit(final long time) { mRevertCommitsCount++; recordUserAction(time, true /* isDeletion */); |