def clean_text(text: str) -> str: """HTML 엔티티 및 불필요한 태그 제거""" reps = { ' ': ' ', '‘': "'", '’': "'", '“': '"', '”': '"', '&': '&', '<': '<', '>': '>', ''': "'", '"': "'", '·': "'" } for key, val in reps.items(): text = text.replace(key, val) return re.sub(r'<[^>]+>', '', text).strip()