diff options
author | Kenneth Heafield <github@kheafield.com> | 2012-09-11 14:23:39 +0100 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2012-09-11 14:27:52 +0100 |
commit | 8882e9ebe158aef382bb5544559ef7f2a553db62 (patch) | |
tree | f0ed595a45df16ddd1ca7ba61bc4ac0ee22d2dfb /klm/lm/search_hashed.hh | |
parent | 104e23dd0b0795abab4565228537438481dc5a5b (diff) |
Update kenlm and build system
Diffstat (limited to 'klm/lm/search_hashed.hh')
-rw-r--r-- | klm/lm/search_hashed.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/klm/lm/search_hashed.hh b/klm/lm/search_hashed.hh index 7e8c1220..3bcde921 100644 --- a/klm/lm/search_hashed.hh +++ b/klm/lm/search_hashed.hh @@ -74,8 +74,8 @@ template <class Value> class HashedSearch { // TODO: move probing_multiplier here with next binary file format update. static void UpdateConfigFromBinary(int, const std::vector<uint64_t> &, Config &) {} - static std::size_t Size(const std::vector<uint64_t> &counts, const Config &config) { - std::size_t ret = Unigram::Size(counts[0]); + static uint64_t Size(const std::vector<uint64_t> &counts, const Config &config) { + uint64_t ret = Unigram::Size(counts[0]); for (unsigned char n = 1; n < counts.size() - 1; ++n) { ret += Middle::Size(counts[n], config.probing_multiplier); } @@ -160,7 +160,7 @@ template <class Value> class HashedSearch { #endif {} - static std::size_t Size(uint64_t count) { + static uint64_t Size(uint64_t count) { return (count + 1) * sizeof(ProbBackoff); // +1 for hallucinate <unk> } |