class documentation
class BabelSynsetRelationComparator:
Comparator for BabelSynsets.
It does the following:
- sorts Babel synsets using theirs relations number
- sorts using BabelSynsetComparator
| Method | __init__ |
init method |
| Method | compare |
Compare two BabelSynsets |
| Static Method | _compare |
A comparator function that first compares two synset using the gloss and then using the main sense |
| Instance Variable | _language |
The language used to sort senses (default Language.EN). |
| Instance Variable | _word |
The word whose sense numbers are used to sort the BabelSynsets corresponding to WordNet synsets. |
def compare(self, b1, b2):
Compare two BabelSynsets
| Parameters | |
b1:BabelSynset | First BabelSynset. |
b2:BabelSynset | Second BabelSynset. |
| Returns | |
int | Compare result. |
A comparator function that first compares two synset using the gloss and then using the main sense
| Parameters | |
b1:BabelSynset | First BabelSynset. |
b2:BabelSynset | Second BabelSynset. |
| Returns | |
int | Compare result. |