The validate module#
- class LexiconValidator(lexicon)[source]#
Bases:
object
- validate()[source]#
Validate a lexicon.
Errors and warnings are left in the
errors
andwarnings
attributes, respectively.
- validate_language(lang)[source]#
Validate all lexicons in this language.
Errors and warnings are printed to stdout. If there are errors, this function returns False, otherwise True.
- validate_transform(transform, language)[source]#
Check whether the Transform has a method for every lexicon.
Returns False when method names are not defined. Prints the missing names to the console.
Prints a notice to the console when lexicons are ignored (i.e. the method name has been set to None in the Transform class) or when a transform method accepts untransformed contexts.