From daffdab52acde37e3f7751b15a7d3d0307c77e81 Mon Sep 17 00:00:00 2001 From: Jingzhao Ou Date: Thu, 27 Jul 2023 23:19:49 -0700 Subject: [PATCH] Updated hypothesis key generation to be the same as sherpa (#226) --- sherpa-onnx/csrc/hypothesis.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sherpa-onnx/csrc/hypothesis.h b/sherpa-onnx/csrc/hypothesis.h index 29a64340..659ef6d3 100644 --- a/sherpa-onnx/csrc/hypothesis.h +++ b/sherpa-onnx/csrc/hypothesis.h @@ -60,9 +60,9 @@ struct Hypothesis { std::string Key() const { // TODO(fangjun): Use a hash function? std::ostringstream os; - std::string sep = "-"; + std::string sep; for (auto i : ys) { - os << i << sep; + os << sep << i; sep = "-"; } return os.str();