Hi Tim. Thanks for offering up this code! That's great. :)
My first thought is to put it into it's own module. One of the main considerations for having so many modules in ClearTK is to isolate dependencies as much as possible. This has been really important to me for being able to use ClearTK in a commercial/industry setting. The first thing lawyers ask for when you want to use an open source library is a list of all the dependencies. The shorter the list, the better. So, when you isolate the dependencies, it makes it easier to selectively choose the modules you need and trim that list. A secondary consideration, is that a large stack of dependencies can cause problems when you integrate into other systems/frameworks that have their own dependencies which may conflict. This isn't such a big deal because you can always shade the dependencies.
That said, it occurs to me that perhaps you won't actually be adding any dependencies per se for this code you have written. In which case, a cleartk-ml-python module might make more sense. That way, to the extent that other wrappers can reuse the code you have put together for keras - the code is in one module and they can all be together. This assumes the other wrappers don't add dependencies either.
Question: Did you write an implementation of Classifier that actually performs the neural net classification in Java? That is, can you train a neural net in keras and then use the resulting model in a ClearTK annotator without a call out to python code? I think this might inform the discussion of whether or not we are introducing a "dependency" or not. I'm inclined to think that if at runtime (i.e. classification time) you call out to keras/python, then we should probably put this in it's own cleartk-ml-python-keras module (or something like that.)
Thanks,
Philip