From 165da914c963d57a354a7f6d5cfe3a035e3263a1 Mon Sep 17 00:00:00 2001 From: waterdrw Date: Tue, 21 Jan 2025 14:06:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=ED=83=88=EC=9E=90=20=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=EC=8B=9C=20=ED=8A=B9=EC=A0=95=20=ED=98=95=EC=8B=9D?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0(1.,=202.,=20-=20=EB=93=B1=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- score5.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/score5.py b/score5.py index 5063b73..8411eaf 100644 --- a/score5.py +++ b/score5.py @@ -295,6 +295,11 @@ class XMLScorer: input_text = [text.replace(' ', '') for text in input_text] input_text_origin = [text.replace(' ', '') for text in input_text_origin] + + # 숫자와 특정 형식 제거 (예: 1., 2., 3., -) + input_text = [re.sub(r'\d+\.\s*|-', '', text) for text in input_text] + input_text_origin = [re.sub(r'\d+\.\s*|-', '', text) for text in input_text_origin] + # 리스트를 하나의 문자열로 변경 input_text_str = ''.join(input_text)