class documentation
class BabelWordSenseComparator(BabelSenseComparator):
BabelSenseComparator for BabelSenses with precedence given to a certain word.
| Method | __init__ |
init method |
| Instance Variable | word |
The word whose sense numbers are used to sort the BabelSense. |
| Method | _sort |
Sort two BabelSenses by parenthesis (senses without parenthesis first). |
Inherited from BabelSenseComparator:
| Method | compare |
Compare two BabelSense(s) |
| Method | _sort |
Sort wordnet senses |
def _sort_by_parentheses(self, b1, b2):
Sort two BabelSenses by parenthesis (senses without parenthesis first).
| Parameters | |
b1:BabelSense | First BabelSense. |
b2:BabelSense | Second BabelSense. |
| Returns | |
int | Compare result. |