def dist_word_top(self, word_or_words, weights=[], filter_nan=True,
                      show_topics=True, print_len=10, as_strings=True, 
                      compact_view=True, dist_fn=JS_dist, order='i',
                      topic_labels=None):
        Q = self.model.word_top / self.model.word_top.sum(0)

        distances = dist_word_top(word_or_words, self.corpus, Q,  
                                  weights=weights, print_len=print_len, 
                                  filter_nan=filter_nan,
                                  dist_fn=dist_fn, order=order)

        if show_topics:
            if isstr(word_or_words):
                word_or_words = [word_or_words]

            # Filter based on topic assignments to words (Z values) 
            topic_indices = sum([self.word_topics(w)['value'].tolist() 
                           for w in word_or_words], [])
            topic_indices = [i for i in xrange(distances.size) if distances[i][0] in topic_indices]
            distances = distances[topic_indices]
            topic_indices = distances[distances.dtype.names[0]]

            k_arr = self.topics(topic_indices=topic_indices, print_len=print_len,
                                as_strings=as_strings, compact_view=compact_view,
                                topic_labels=topic_labels)

            # Retrieve topics
            if compact_view:
                k_arr.table_header = 'Sorted by Topic Distance'
                return k_arr

            # Relabel results
            k_arr.table_header = 'Sorted by Topic Distance'
            for i in xrange(distances.size):
                k_arr[i].col_header += ' ({0:.5f})'.format(distances[i][1])

            return k_arr

        return distances
Iteratively yield tokens as unicode strings, optionally also lowercasing them
dataset/ETHPy150Open inpho/vsm/vsm/viewer/ldacgsviewer.py/LdaCgsViewer.dist_word_top--crossover with--dataset/ETHPy150Open summanlp/textrank/summa/preprocessing/textcleaner.py/tokenize