From d6125635803ebbdff16ad4d79531eb42fb66a255 Mon Sep 17 00:00:00 2001 From: thug0bin Date: Sat, 28 Feb 2026 11:27:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20(=ED=8C=90)=20=EC=A0=91=EB=91=90?= =?UTF-8?q?=EC=96=B4=20=EC=A0=9C=ED=92=88=20=EB=A7=A4=EC=B9=AD=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app.py b/backend/app.py index 1a12d84..1eec1fd 100644 --- a/backend/app.py +++ b/backend/app.py @@ -2879,9 +2879,13 @@ def api_animal_chat(): for drug in sorted_drugs: drug_name = drug['name'] + # (판) 같은 접두어 제거 + clean_name = drug_name + if clean_name.startswith('(판)'): + clean_name = clean_name[3:] # 제품명에서 핵심 키워드 추출 (괄호 앞부분) # 예: "다이로하트정M(12~22kg)" → "다이로하트" - base_name = drug_name.split('(')[0].split('/')[0].strip() + base_name = clean_name.split('(')[0].split('/')[0].strip() # 사이즈 제거: "다이로하트정M" → "다이로하트" for suffix in ['정', '액', 'L', 'M', 'S', 'XL', 'XS', 'SS', 'mini']: if base_name.endswith(suffix):