i can't seem to find a simple way to get the depth of a given concept. assymetric relations tend to crash when i try to use them with an 'entity' concept, which was the solution i thought about when being unable to get a simple depth to root.
btw, the crash says:
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
in the following function:
IndexWord start = Dictionary.getInstance().getIndexWord(POS.NOUN, "entity");
IndexWord end = Dictionary.getInstance().lookupIndexWord(POS.NOUN, "physical_entity");
RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.HYPERNYM);
int dist_to_ancestor = ((AsymmetricRelationship) list.get(0)).getCommonParentIndex();
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.