Class HypernymPathsFinder


  • public class HypernymPathsFinder
    extends Object
    Computes all the paths from a synset (concept) to the root(s) of the tree hierarchy. These paths are called hypernym paths.
    Version:
    1.0
    Author:
    Kleanthi Georgala (georgala@informatik.uni-leipzig.de), Michael Roeder (michael.roeder@uni-paderborn.de)
    • Field Detail

      • useInstanceHypernyms

        public static boolean useInstanceHypernyms
      • useHypernyms

        public static boolean useHypernyms
    • Constructor Detail

      • HypernymPathsFinder

        public HypernymPathsFinder()
    • Method Detail

      • getHypernymPaths

        public static ArrayList<ArrayList<edu.mit.jwi.item.ISynsetID>> getHypernymPaths​(SemanticDictionary dictionary,
                                                                                        edu.mit.jwi.item.ISynset synset)
        Retrieves all hypernym paths in a tree hierarchy for a synset (concept) .
        Parameters:
        dictionary - , a semantic dictionary that represents the tree hierarchy
        synset - , the input synset
        Returns:
        all hypernym paths of synset
      • getHypernymPaths

        public static ArrayList<ArrayList<edu.mit.jwi.item.ISynsetID>> getHypernymPaths​(SemanticDictionary dictionary,
                                                                                        edu.mit.jwi.item.ISynset synset,
                                                                                        Set<edu.mit.jwi.item.ISynsetID> history)
        Recursive function that computes all hypernym paths in a tree hierarchy for a synset (concept), by traversing the graph in a BFS manner.
        Parameters:
        dictionary - , a semantic dictionary that represents the tree hierarchy
        synset - , the input synset
        history - , auxiliary set that stores the traversed paths
        Returns:
        all hypernym paths of synset