aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 482a59a7..91f61d72 100755
--- a/utils.py
+++ b/utils.py
@@ -81,8 +81,8 @@ def clear_string(data):
"""
p = re.compile(r'<[^<]*?/?>')
q = re.compile(r'&#[0-9]+;')
- r = re.compile(r's+')
- return p.sub('', q.sub('', r.sub('', data)))
+ r = re.compile(r'\s')
+ return p.sub('', q.sub('', r.sub(' ', data)))
def top_words(dic_articles, n=10, size=5):
"""
bgstack15