clamsproject / mmif-summarizer

Apache License 2.0
0 stars 0 forks source link

Move server.py code to clams #11

Open marcverhagen opened 1 year ago

marcverhagen commented 1 year ago

The classes in the server module (ClamsConsumer and others) are probably better at home in clams.app. The current classes were informed by an older version of clams.app so some updates are probably needed.

marcverhagen commented 1 year ago

Looking at the current clams-python code I now think that subclassing from ABC is not the right way to do it. Experiment with subclassing ClamsApp and override annotate() and add a consume() method, also use existing Restifier and ClamsHTTPApi classes.

marcverhagen commented 1 year ago

The new way of implementing behavior for comsumers is at

https://github.com/clamsproject/mmif-summarizer/blob/855f49d4bcb45f584c86674c8ad34eca4e34fff7/code/app.py#L26-L43

That code may be relevant to the visualizer, in which case we could add it to https://github.com/clamsproject/clams-python, but for now leaving it here.