Class MemoryIndex


  • public class MemoryIndex
    extends AIndex
    Implements the memory index class that computes, stores and loads the hypernym paths of every synset in wordnet.
    Version:
    1.0
    Author:
    Kleanthi Georgala (georgala@informatik.uni-leipzig.de)
    • Constructor Detail

      • MemoryIndex

        public MemoryIndex()
    • Method Detail

      • init

        public void init​(boolean f)
        Initiliazes the Index instance
        Specified by:
        init in class AIndex
      • close

        public void close()
        Closes the Index instance
        Specified by:
        close in class AIndex
      • preIndex

        public void preIndex()
        Stores all necessary information into memory
        Specified by:
        preIndex in class AIndex
      • preIndexPaths

        public void preIndexPaths()
        Stores in memory all possible hypernym paths of a wordnet's synset from the root(s).
      • getHypernymPaths

        public ArrayList<ArrayList<edu.mit.jwi.item.ISynsetID>> getHypernymPaths​(edu.mit.jwi.item.ISynset synset)
        Retrieves all hypernym paths of a synset from memory
        Specified by:
        getHypernymPaths in class AIndex
        Parameters:
        synset - , the input synset
        Returns:
        a list of all hypernym paths