Class RelationshipFinder


  • public class RelationshipFinder
    extends Object
    • Method Detail

      • getImmediateRelationship

        public int getImmediateRelationship​(IndexWord sourceWord,
                                            IndexWord targetWord)
                                     throws JWNLException
        Looks at whether the target word is one of the words in one of the synsets of the source word.
        Returns:
        int the sense of the source word that contains the target word
        Throws:
        JWNLException
      • findRelationships

        public RelationshipList findRelationships​(Synset sourceSynset,
                                                  Synset targetSynset,
                                                  PointerType type)
                                           throws JWNLException
        Find all relationships of type type between sourceSynset and targetSynset. This method creates a symmetric or asymmetric relationship based on whether type is symmetric.
        Throws:
        JWNLException
      • findRelationships

        public RelationshipList findRelationships​(Synset sourceSynset,
                                                  Synset targetSynset,
                                                  PointerType type,
                                                  int depth)
                                           throws JWNLException
        Find all relationships of type type between sourceSynset and targetSynset to depth depth. This method creates a symmetric or asymmetric relationship based on whether type is symmetric.
        Throws:
        JWNLException