class documentation
class BabelSynsetGlossComparator:
Comparator for BabelSynset.
It does the following:
- sorts Babel synsets using their glosses 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 langage to use |
Instance Variable | _word |
the word to use for the comparation. |
def compare(self, b1, b2):
Compare two BabelSynsets
Parameters | |
b1:BabelSynset | First BabelSynset. |
b2:BabelSynset | Second BabelSynset. |
Returns | |
int | Compare result. |
Raises | |
NotImplemented | If b1 xor b2 are not instance of BabelSynset |
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. |