def top_word_indices(words_per_topic = 10)
      raise 'No vocabulary loaded.' unless @vocab

      # find the highest scoring words per topic
      topics = {}

      beta.each_with_index do |topic, topic_num|
        topics[topic_num] = topic.zip((0...@vocab.size).to_a).sort { |x| x[0] }.map { |_i, j| j }.reverse[0...words_per_topic]
      end

      topics
    end
def top_word_indices(words_per_topic = 10)
      raise 'No vocabulary loaded.' unless @vocab

      # find the highest scoring words per topic
      topics = {}

      beta.each_with_index do |topic, topic_num|
        topics[topic_num] = topic.zip((0...@vocab.size).to_a).sort { |x| x[0] }.map { |_i, j| j }.reverse[0...words_per_topic]
      end

      topics
    end
After the model has been run and a vocabulary has been loaded, return the
 +words_per_topic+ top words chosen by the model for each topic.  This is
 returned as a hash mapping the topic number to an array of top words
 (in descending order of importance).

   topic_number => [w1, w2, ..., w_n]

 See also +print_topics+.