fix: (판) 접두어 제품 매칭 수정
This commit is contained in:
parent
dfbc6e4761
commit
d612563580
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user