Commit df20defd authored by Raphael Boidol's avatar Raphael Boidol
Browse files

filter out one letter words

parent e8259492
...@@ -6,4 +6,3 @@ ...@@ -6,4 +6,3 @@
* long functions? * long functions?
* redo examples * redo examples
* examples * examples
* filter one-letter words
...@@ -350,7 +350,7 @@ class WordCloud(object): ...@@ -350,7 +350,7 @@ class WordCloud(object):
d = {} d = {}
flags = (re.UNICODE if sys.version < '3' and type(text) is unicode flags = (re.UNICODE if sys.version < '3' and type(text) is unicode
else 0) else 0)
for word in re.findall(r"\w[\w']*", text, flags=flags): for word in re.findall(r"\w[\w']+", text, flags=flags):
if word.isdigit(): if word.isdigit():
continue continue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment