-
Epic
-
Resolution: Done
-
Medium
-
None
-
Tech Debt: Refactor classifiers
The classifier package in core contains a _init_.py file which defines basic methods for converting subject classifications into Simplified genres: Classifier, GenreData, and so on. That package also contains modules for specific classifiers: bisac.py for BISAC, overdrive.py for Overdrive genres, and so on. Each module defines a classifier, and then at the end adds the classifier to the global registry in Classifier.classifiers.
However, a lot of the specific classifiers are in _init_.py rather than in their own modules: Axis360AudienceClassifier, AgeOrGradeClassifier, DeweyDecimalClassifier, LCCClassifier, KeywordBasedClassifier and its subclasses, GutenbergBookshelfClassifier, FreeformAudienceClassifier, BICClassifier, and so on.
These specific classifiers should be moved into specific modules. The code and the tests will be easier to read. _init_.py will still need to import each module at the end, to make sure the Classifier.classifiers object is populated correctly.