If you have a look at my lidtk repository, especially the classifiers, you can see that the following files are almost identical (current version in case this is fixed in future):
- cld2_mod.py
- langdetect_mod.py
- langid_mod.py
- text_cat.py
They all inherit from lidtk.LIDClassifier and they all have the commands
Usage: lidtk <<module name>> [OPTIONS] COMMAND [ARGS]...
Use the <<module name>> language classifier.
Options:
--help Show this message and exit.
Commands:
get_languages
predict
print_languages
wili
wili_k
wili_unk
Is it possible to de-duplicate the click-code? I would like to use inheritance to de-duplicate the code.