module documentation
A BabelNet utility module. Mainly for internal use.
Class |
|
Exception raised when is used a feature unavailable in the online API |
Function | cmp |
Old school comparator function. |
Function | comparator |
Decorator that turns a class in a Java style comparator, in order to use inheritance and custom arguments for sorting. The class needs to declare a compare(obj1, obj2) method that returns an int. |
Function | flatten |
Transliterate input string to ascii. |
Function | flatten |
Transliterate input string to ascii using unicodedata. |
Function | java |
A version of the split that behaves like the java one. |
Function | lemma |
Cleans up a full lemma. It filters the input by removing the annotations inside the parenthesis at the end of the lemma (if present) |
Function | normalized |
Normalizes a full lemma. It filters the input by removing the annotations inside the parenthesis at the end of the lemma (if present) and converts it to lowercase. |
def cmp(a, b):
Old school comparator function.
Parameters | |
a | the first object to compare |
b | the second object to compare |
def comparator(cls):
Decorator that turns a class in a Java style comparator, in order to use inheritance and custom arguments for sorting. The class needs to declare a compare(obj1, obj2) method that returns an int.