diff options
author | 2014-02-05 21:31:35 +0900 | |
---|---|---|
committer | 2014-02-05 21:31:35 +0900 | |
commit | 75a3df30f6282e4ff93a5c71c7d55fbbcf462d0a (patch) | |
tree | ea02c14843440814cf11f2d3ebb304640a036ea0 /java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java | |
parent | bb476be4e62b3bed7848d37df42f8fa7363b58d1 (diff) | |
download | latinime-75a3df30f6282e4ff93a5c71c7d55fbbcf462d0a.tar.gz latinime-75a3df30f6282e4ff93a5c71c7d55fbbcf462d0a.tar.xz latinime-75a3df30f6282e4ff93a5c71c7d55fbbcf462d0a.zip |
Separate ProbabilityInfo form WordProperty.
Bug: 11281877
Bug: 12810574
Change-Id: I0c77d976c915bdf2a2cddabd0cbedc2fb6691c7b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java b/java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java new file mode 100644 index 000000000..c1a43cedf --- /dev/null +++ b/java/src/com/android/inputmethod/latin/makedict/ProbabilityInfo.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.latin.makedict; + +import com.android.inputmethod.latin.BinaryDictionary; + +public final class ProbabilityInfo { + public final int mProbability; + // mTimestamp, mLevel and mCount are historical info. These values are depend on the + // implementation in native code; thus, we must not use them and have any assumptions about + // them except for tests. + public final int mTimestamp; + public final int mLevel; + public final int mCount; + + public ProbabilityInfo(final int probability) { + this(probability, BinaryDictionary.NOT_A_VALID_TIMESTAMP, 0, 0); + } + + public ProbabilityInfo(final int probability, final int timestamp, final int level, + final int count) { + mProbability = probability; + mTimestamp = timestamp; + mLevel = level; + mCount = count; + } + + @Override + public String toString() { + return mTimestamp + ":" + mLevel + ":" + mCount; + } +}
\ No newline at end of file |