class documentation

class BabelSynsetIDRelationComparator:

View In Hierarchy

Comparator for BabelSynsetRelations.

It does the following:

  • puts manual relations first
  • sorts relations using their relation type (HYPERNYM, HYPONYM and MERONYM)
  • sorts lexicographically using their relation name
  • sorts lexicographically using their id target
Static Method compare Compare two BabelSynstRelations
@staticmethod
def compare(rel1, rel2):

Compare two BabelSynstRelations

Parameters
rel1:BabelSynsetRelationFirst BabelSynsetRelation.
rel2:BabelSynsetRelationSecond BabelSynsetRelation.
Returns
intCompare result.
Raises
NotImplementedIf b1 xor b2 are not instance of BabelSynset