From 98aca4b06e19a96d59119f662bebf0810ca49a86 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Aug 2022 20:49:37 -0700 Subject: [PATCH 1/2] Create pain points before running associator to resolve #3892 --- src/wordrec/segsearch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wordrec/segsearch.cpp b/src/wordrec/segsearch.cpp index 4e5ac6ecfd..5d77bc6d96 100644 --- a/src/wordrec/segsearch.cpp +++ b/src/wordrec/segsearch.cpp @@ -52,6 +52,8 @@ void Wordrec::SegSearch(WERD_RES *word_res, BestChoiceBundle *best_choice_bundle if (blamer_bundle != nullptr && !blamer_bundle->ChoiceIsCorrect(word_res->best_choice)) { blamer_bundle->SetChopperBlame(word_res, wordrec_debug_blamer); } + + InitialSegSearch(word_res, &pain_points, &pending, best_choice_bundle, blamer_bundle); } // Keep trying to find a better path by fixing the "pain points". From 1146c3a08fe03ab65daae815122fd49f480fd0f6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 5 Aug 2022 21:00:58 -0700 Subject: [PATCH 2/2] Minor change --- src/wordrec/segsearch.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wordrec/segsearch.cpp b/src/wordrec/segsearch.cpp index 5d77bc6d96..9a0b8dcffa 100644 --- a/src/wordrec/segsearch.cpp +++ b/src/wordrec/segsearch.cpp @@ -44,6 +44,7 @@ void Wordrec::SegSearch(WERD_RES *word_res, BestChoiceBundle *best_choice_bundle if (chop_enable && word_res->chopped_word != nullptr) { improve_by_chopping(rating_cert_scale, word_res, best_choice_bundle, blamer_bundle, &pain_points, &pending); + InitialSegSearch(word_res, &pain_points, &pending, best_choice_bundle, blamer_bundle); } if (chop_debug) { SEAM::PrintSeams("Final seam list:", word_res->seam_array); @@ -52,8 +53,6 @@ void Wordrec::SegSearch(WERD_RES *word_res, BestChoiceBundle *best_choice_bundle if (blamer_bundle != nullptr && !blamer_bundle->ChoiceIsCorrect(word_res->best_choice)) { blamer_bundle->SetChopperBlame(word_res, wordrec_debug_blamer); } - - InitialSegSearch(word_res, &pain_points, &pending, best_choice_bundle, blamer_bundle); } // Keep trying to find a better path by fixing the "pain points".