arr = set(text1)
arr = list(arr)
mat = lil_matrix((len(arr), len(arr)))
markov(arr)
f = open('spmatrix.pkl', 'wb')
cPickle.dump(mat, f, -1)
f.close()
Python: how do you store a sparse matrix using python?