tpoulain - 2007-05-25

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
        at java.util.ArrayList.RangeCheck(
        at java.util.ArrayList.get(
        at net.didion.jwnl.util.TypeCheckingList.get(

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();

any clue?