topic [item for item in topic if item[ print(topicprint([('fox' )('quick' )('dog' )('brown' )('lazy' )('jumps' )('blue' )[('sky' )('beautiful' )('blue' )('love' )('today' )the preceding output represents each of the two topics as collection of terms and their importance is depicted by the corresponding weight it is definitely interesting to see that the two topics are quite distinguishable from each other by looking at the terms the first topic shows terms relevant to animals and the second topic shows terms relevant to weather this is reinforced by applying our unsupervised -means clustering algorithm on our document-topic feature matrix (dt_matrixusing the following code snippet in [ ]km kmeans(n_clusters= km fit_transform(featurescluster_labels km labels_ cluster_labels pd dataframe(cluster_labelscolumns=['clusterlabel']pd concat([corpus_dfcluster_labels]axis= out[ ]document category clusterlabel the sky is blue and beautiful weather love this blue and beautiful skyweather the quick brown fox jumps over the lazy dog animals the brown fox is quick and the blue dog is lazyanimals the sky is very blue and the sky is very beaut weather the dog is lazy but the brown fox is quickanimals this clearly makes sense and we can see that by just using two topic-model based featureswe are still able to cluster our documents efficientlyword embeddings there are several advanced word vectorization models that have recently gained lot of prominence almost all of them deal with the concept of word embeddings basicallyword embeddings can be used for feature extraction and language modeling this representation tries to map each word or phrase into complete numeric vector such that semantically similar words or terms tend to occur closer to each other and these can be quantified using these embeddings the word vec model is perhaps one of the most popular neural network based probabilistic language models and can be used to learn distributed representational vectors for words word embeddings produced by word vec involve taking in corpus of text documentsrepresenting words in large high dimensional vector space such that each word has corresponding vector in that space and similar words (even semanticallyare located close to one anotheranalogous to what we observed in document similarity earlier the word vec model was released by google in and uses neural network based implementation with architectures like continuous bag of words and skip-grams to learn the distributed vector representations of words in corpus we will be using the gensim framework to implement the same model on our corpus to extract features some of the important parameters in the model are explained briefly as follows