public List<PredictedTopic> getPredictedTopics(String segment, int maxTopics) {
        List<PredictedTopic> predictedTopics = new LinkedList<>();

        int segIdx = getSegmentIndex(segment);
        int[][] topicArr = getTopicArray(segIdx, maxTopics);
        for (int[] ints : topicArr) {
            int weight = ints[1];
            String[] topicInfo = getTopicInfo(ints[0]);
            String topic = topicInfo[0];
            String vector = topicInfo[1];
            PredictedTopic pt = new PredictedTopic(topic, weight, vector);
            predictedTopics.add(pt);
        }

        return predictedTopics;
    }
Returns a list of PredictedTopic objects, one for each topic
the segment maps to. The returned list length is cut off at
'maxTopics' entries, maxTopics=0 returns all topics.
@param segment   The segment string to find topics for.
@param maxTopics The max number of topics to return, 0 for all topics
@return (Linked)List of PredictedTopic objects.
fsa/src/main/java/com/yahoo/fsa/topicpredictor/TopicPredictor.java