From 19719be6d27bec457f2ab64b5612d8024151a95e Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Mon, 20 Jul 2026 17:31:05 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Bolt:=20=EC=A0=95=EA=B7=9C=20?= =?UTF-8?q?=ED=91=9C=ED=98=84=EC=8B=9D=20=EC=98=A4=EB=B2=84=ED=97=A4?= =?UTF-8?q?=EB=93=9C=20=EC=B5=9C=EC=A0=81=ED=99=94=20(=EB=8B=A8=EC=96=B4?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC=20=EC=86=8D=EB=8F=84=20=ED=96=A5=EC=83=81?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- summarize.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/summarize.py b/summarize.py index a5b56fe..d8c3a4c 100644 --- a/summarize.py +++ b/summarize.py @@ -94,7 +94,11 @@ def _content_words(sentence): """ words = [] for raw in sentence.split(): - token = _TOKEN_STRIP_RE.sub("", raw).lower() + # Optimization: bypass the heavy regex for strictly alphanumeric words + if raw.isalnum(): + token = raw.lower() + else: + token = _TOKEN_STRIP_RE.sub("", raw).lower() if token and token not in _STOPWORDS: words.append(token) return words