def dismat_word(self, word_list, dist_fn=angle):

        return dismat_word(word_list, self.corpus, 
                           self.model.matrix.T, dist_fn=dist_fn)



    # # This is a quick adaptation of the isomap_docs function from
    # # ldagibbsviewer. This should be abstracted and moved to
    # # similarity.py or something equivalent.
    # def isomap_words(self, words, weights=[], thres=.8,
    #                  n_neighbors=5, scale=True, trim=20):
    #     """
    #     """
    #     from sklearn import manifold
    #     from math import ceil
    #     from vsm.ext.clustering.plotting import (
    #         gen_colors as _gen_colors_,
    #         plot_clusters as _plot_clusters_)

    #     # create a list to be plotted
    #     word_list = self.dist_word_word(words, weights=weights)

    #     # cut down the list by the threshold
    #     labels, size = zip(*[(w,s) for (w,s) in word_list if s < thres])
    #     print size
    #     # calculate coordinates
    #     dismat = self.dismat_words(labels)
    #     dismat = np.clip(dismat, 0, 2)     # cut off values outside [0, 1]
    #     imap = manifold.Isomap(n_components=2, n_neighbors=n_neighbors)
    #     pos  = imap.fit(dismat).embedding_

    #     # set graphic parameters
    #     # - scale point size
    #     if scale:
    #         size = [s+0.5 if s == 0 else s for s in size] # for given word which has 0.0
    #         # value to be visible.
    #         size = [s**2*150 for s in size] 
    #     else:
    #         size = np.ones_like(size) * 50
    #     # - trim labels
    #     if trim:
    #         labels = [lab[:trim] for lab in labels]

    #     # hack for unidecode issues in matplotlib
    #     labels = [label.decode('utf-8', 'ignore') for label in labels]
        
    #     return _plot_clusters_(pos, labels, size=size)
Calculates a distance matrix for a given list of words.
dataset/ETHPy150Open inpho/vsm/vsm/viewer/beagleviewer.py/BeagleViewer.dismat_word