python - nltk.cluster using a sparse representation -


i quite new in python.

i trying use nltk.cluster package apply simple kmeans word-document matrix. while works when matrix list of numpy array-like objects, wasn't able make work sparse matrix representation (such csc_matrix, csr_matrix or lil_matrix).

all information found was:

note vectors must use numpy array-like objects. nltk_contrib.unimelb.tacohn.sparsearrays may used efficiency when required

i not understand means. can me in matter?

thanks in advance!

it means when pass in input vector, can either pass in numpy.array() or nltk_contrib.unimelb.tacohn.sparsearrays.

i suggest @ package nltk_contrib.unimelb.tacohn find sparsearrays class. try create data class before passing nltk.cluster


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -