Merge "Add hacks for better handling count value during migration."
This commit is contained in:
commit
ef931546a0
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