Class CoherenceEvaluation.StaticCorpusAdapter

    • Field Detail

      • histogram

        protected int[][] histogram
      • wordSet

        protected String[] wordSet
      • docLengths

        protected com.carrotsearch.hppc.IntIntOpenHashMap docLengths
      • wordPositions

        protected com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> wordPositions
    • Constructor Detail

      • StaticCorpusAdapter

        public StaticCorpusAdapter​(int[][] histogram,
                                   String[] wordSet,
                                   com.carrotsearch.hppc.IntIntOpenHashMap docLengths,
                                   com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> wordPositions)
    • Method Detail

      • requestWordPositionsInDocuments

        public com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> requestWordPositionsInDocuments​(String[] words,
                                                                                                                                com.carrotsearch.hppc.IntIntOpenHashMap docLengths)
        Description copied from interface: WindowSupportingAdapter
        Returns the positions of the given words inside the corpus.
        Specified by:
        requestWordPositionsInDocuments in interface WindowSupportingAdapter
        Parameters:
        words - the words for which the positions inside the documents should be determined
        docLengths - empty int int map in which the document lengths and counts are inserted
        Returns:
        the positions of the given words inside the corpus