public class AsymmetricRelationship extends Relationship
For example, in finding a hypernym relationship between dog and cat, the relationship is dog -> canine -> carnivore -> feline -> cat. The ancestry of "dog" and the ancestry of "cat" diverge at "carnivore," so the common parent index is thus 2.
Constructor and Description |
---|
AsymmetricRelationship(PointerType type,
PointerTargetNodeList nodes,
int commonParentIndex,
Synset sourceSynset,
Synset targetSynset) |
Modifier and Type | Method and Description |
---|---|
int |
getCommonParentIndex() |
int |
getRelativeTargetDepth()
Returns the depth of the target, from the commonParentIndex, relative to the depth of the source.
|
Relationship |
reverse() |
equals, getDepth, getNodeList, getSize, getSourcePointerTarget, getSourceSynset, getTargetPointerTarget, getTargetSynset, getType, hashCode, toString
public AsymmetricRelationship(PointerType type, PointerTargetNodeList nodes, int commonParentIndex, Synset sourceSynset, Synset targetSynset)
public int getCommonParentIndex()
public int getRelativeTargetDepth()
public Relationship reverse() throws java.lang.CloneNotSupportedException
reverse
in class Relationship
java.lang.CloneNotSupportedException