Hi, recently i was working with the java wordnet library
and needed to given an indexword get the unique
beginner for that word. I tried many attemps in different
ways to do this but i failed.
My last attempt was to use this logic:
//Create one indexword for each entity:
IndexWord entity = wnet.lookupIndexWord
//Create the target hyperym tree of this relation
PointerTargetTree hyp_entity =
//Get the node that i wanted to compare with
//the hypernyn tree that i wanted.
PointerTargetTreeNode pttn_entity =
//Get the tree of the word im intereted in.
PointerTargetTree hyp = PointerUtils.getHypernymTree
//And then verify if the given node (Entity) was the
//in that tree.
PointerTargetTreeNode x = hyp.findFirst(pttn_entity);
However this is returning null everytime, when it was
supposed to return null only when the node im trying to
find did not exist right? I tried it with words like dog and
cat and still have this problem. Do you have any idea
why this happen?
Log in to post a comment.