Add hacks for better handling count value during migration.
Bug: 14425059 Change-Id: Ib050574aa7c4babd4285322a11c3af9be9fbab1e
This commit is contained in:
parent
2383575d2d
commit
c611989929
2 changed files with 4 additions and 1 deletions
|
@ -65,6 +65,8 @@ const BigramEntry BigramDictContent::getBigramEntryAndAdvancePosition(
|
|||
(encodedTargetTerminalId == Ver4DictConstants::INVALID_BIGRAM_TARGET_TERMINAL_ID) ?
|
||||
Ver4DictConstants::NOT_A_TERMINAL_ID : encodedTargetTerminalId;
|
||||
if (mHasHistoricalInfo) {
|
||||
// Hack for better migration.
|
||||
count += level;
|
||||
const HistoricalInfo historicalInfo(timestamp, level, count);
|
||||
return BigramEntry(hasNext, probability, &historicalInfo, targetTerminalId);
|
||||
} else {
|
||||
|
|
|
@ -50,7 +50,8 @@ const ProbabilityEntry ProbabilityDictContent::getProbabilityEntry(const int ter
|
|||
Ver4DictConstants::WORD_LEVEL_FIELD_SIZE, &entryPos);
|
||||
const int count = buffer->readUintAndAdvancePosition(
|
||||
Ver4DictConstants::WORD_COUNT_FIELD_SIZE, &entryPos);
|
||||
const HistoricalInfo historicalInfo(timestamp, level, count);
|
||||
// Hack for better migration.
|
||||
const HistoricalInfo historicalInfo(timestamp, level, count + level);
|
||||
return ProbabilityEntry(flags, probability, &historicalInfo);
|
||||
} else {
|
||||
return ProbabilityEntry(flags, probability);
|
||||
|
|
Loading…
Reference in a new issue