In [115]:
import re
from wordcloud import WordCloud
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [20]:
with open('software-list.txt','r') as f:
    data = f.read()

In [50]:
match = re.compile(r'\n([^\t^\n.]+)(\t|\s\–|\s\—)')

In [92]:
words = [ w[0].replace(' ','_') for w in match.findall(data)[1:] ]

In [123]:
words = dict([ (w[0],1) for w in match.findall(data)[1:] ])
words['GLPK'] = 50
words['CPLEX'] = 30
words['Gurobi'] =20
words['']

In [124]:
wordcloud = WordCloud(max_font_size=80, height=400, width=800, max_words=100).generate_from_frequencies(words)
figure(figsize=(16,9))
imshow(wordcloud, interpolation="bilinear")
axis("off")
show()



In [ ]: