Fix historical info of bigrams reading.

Bug: 12809791
Change-Id: I879279a0d0e1007a7c6cb87a627bf046340dda98
main
Keisuke Kuroyanagi 2014-01-30 16:19:22 +09:00
parent 0c186c31d2
commit 971bbcf562
1 changed files with 6 additions and 5 deletions

View File

@ -215,11 +215,12 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
if (options.mHasTimestamp) { if (options.mHasTimestamp) {
probability = buffer.readUnsignedByte(); probability = buffer.readUnsignedByte();
final int pos = buffer.position(); // Skip timestamp
// Skip historical info. buffer.readInt();
buffer.position(pos + FormatSpec.BIGRAM_TIMESTAMP_SIZE // Skip level
+ FormatSpec.BIGRAM_LEVEL_SIZE buffer.readUnsignedByte();
+ FormatSpec.BIGRAM_COUNTER_SIZE); // Skip count
buffer.readUnsignedByte();
} else { } else {
probability = bigramFlags probability = bigramFlags
& FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY; & FormatSpec.FLAG_BIGRAM_SHORTCUT_ATTR_FREQUENCY;