/* (non-Javadoc)
   * @see ac.biu.nlp.nlp.instruments.dictionary.wordnet.SensedWord#getRelatedSensedWords(ac.biu.nlp.nlp.instruments.dictionary.wordnet.WordNetRelation)
   */
  public Set<SensedWord> getNeighborSensedWords(WordNetRelation relation) throws WordNetException {

    Set<SensedWord> sensedWords = new LinkedHashSet<SensedWord>();
    if (relation.isLexical()) {
      List<Pointer> pointers =
          wordObj.getPointers(ExtJwnlUtils.wordNetRelationToPointerType(relation));
      for (Pointer pointer : pointers)
        // add a new SensedWord made of the Word-cast of this pointer
        sensedWords.add(new ExtJwnlSensedWord(((Word) pointer.getTarget()), dictionary));
    }
    return sensedWords;
  }