From 6710df2e39b7f523d9880e0e4dcbd0a9813b6620 Mon Sep 17 00:00:00 2001 From: Benjamin Freist Date: Sun, 16 Jul 2023 13:30:59 +0200 Subject: [PATCH] fix count of last n-grams --- lm/builder/adjust_counts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lm/builder/adjust_counts.cc b/lm/builder/adjust_counts.cc index b3ae1192..e4ad668e 100644 --- a/lm/builder/adjust_counts.cc +++ b/lm/builder/adjust_counts.cc @@ -335,7 +335,7 @@ void AdjustCounts::Run(const util::stream::ChainPositions &positions) { } } - stats.Add(s - streams.begin(), lower_count, (*s)->Value().IsMarked()); + stats.Add(s - streams.begin(), (*s)->Value().UnmarkedCount(), (*s)->Value().IsMarked()); ++*s; } // Poison everyone! Except the N-grams which were already poisoned by the input.