From 6d6b6c57f8496597f7495e3e3a5b6a616518e368 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Thu, 21 Oct 2010 13:53:23 +0200 Subject: Improvements of the regular expression for tag clouds and search. --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 0b33b4dd..34f3423a 100755 --- a/utils.py +++ b/utils.py @@ -162,7 +162,7 @@ def top_words(dic_articles, n=10, size=5): Return the n most frequent words in a list. """ words = Counter() - wordre = re.compile(r'\b\w{%s,}\b' % size) + wordre = re.compile(r'\b\w{%s,}\b' % size, re.I) for rss_feed_id in dic_articles.keys(): for article in dic_articles[rss_feed_id]: for word in wordre.findall(clear_string(article[4].encode('utf-8'))): -- cgit