From 417a4f3d126b48817e3aed000341f0fc4189be36 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Sun, 19 May 2013 10:02:45 -0400 Subject: KenLM 10ddf7d92335 Comment some asserts, update uusage --- klm/lm/search_trie.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'klm/lm') diff --git a/klm/lm/search_trie.hh b/klm/lm/search_trie.hh index 1264baf5..60be416b 100644 --- a/klm/lm/search_trie.hh +++ b/klm/lm/search_trie.hh @@ -41,7 +41,8 @@ template class TrieSearch { static void UpdateConfigFromBinary(int fd, const std::vector &counts, Config &config) { Quant::UpdateConfigFromBinary(fd, counts, config); util::AdvanceOrThrow(fd, Quant::Size(counts.size(), config) + Unigram::Size(counts[0])); - Bhiksha::UpdateConfigFromBinary(fd, config); + // Currently the unigram pointers are not compresssed, so there will only be a header for order > 2. + if (counts.size() > 2) Bhiksha::UpdateConfigFromBinary(fd, config); } static uint64_t Size(const std::vector &counts, const Config &config) { -- cgit v1.2.3