From e60dbaa6427a8bf8fb08e770aeec1b1900c420c1 Mon Sep 17 00:00:00 2001 From: Ahn Jiwan Date: Sat, 18 Nov 2023 00:24:08 +0900 Subject: [PATCH] =?UTF-8?q?:recycle:=20refactor:=20fuzzywuzzy=20=EC=A0=95?= =?UTF-8?q?=ED=99=95=EB=8F=84=20=EC=9E=84=EA=B3=84=EA=B0=92=20=ED=95=98?= =?UTF-8?q?=ED=96=A5=20(#24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/nutrition_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/nutrition_parser.py b/utils/nutrition_parser.py index ee3e104..0193485 100644 --- a/utils/nutrition_parser.py +++ b/utils/nutrition_parser.py @@ -5,7 +5,7 @@ def correct_ocr_text(text): target_words = ["kcal", "탄수화물", "단백질", "지방"] corrected_text = text for word in target_words: - extracted_words = process.extractBests(word, text.split(), score_cutoff=75, limit=10) + extracted_words = process.extractBests(word, text.split(), score_cutoff=60, limit=10) for extracted_word, score in extracted_words: if abs(len(extracted_word) - len(word)) <= 1: corrected_text = corrected_text.replace(extracted_word, word)