From 9a6d5e1b49b06e8b5122e3dce7f3e799af94d745 Mon Sep 17 00:00:00 2001 From: Jay-763 <120452926+Jay-763@users.noreply.github.com> Date: Sun, 16 Apr 2023 16:02:23 +0800 Subject: [PATCH] Update textPro.py --- TextRank/textPro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TextRank/textPro.py b/TextRank/textPro.py index 58ec53d..04c3c07 100644 --- a/TextRank/textPro.py +++ b/TextRank/textPro.py @@ -45,7 +45,7 @@ def _get_words(self, sents, use_property, no_stopwords): cut_s = self._clean_words(cut_s) if no_stopwords: - cut_s = [w.strip() for w in cut_s if w.strip() not in STOPWORDS] + cut_s = [w for w in cut_s if w not in STOPWORDS] words.append(cut_s) return words