gucorpling / midas-loop

2 stars 1 forks source link

Multiple Annotation Types from a Single Service? #5

Open mr-martian opened 2 years ago

mr-martian commented 2 years ago

I would like to make a service for integrating Apertium morphological analyzers, which provide tokenization, lemmatization, XPOS, UPOS, and FEATS in a single operation. While I certainly can split this into 5 services, it strikes me a bit wasteful, when each one is essentially doing the same thing as all the others and just discarding a different piece of the output. Thus, I was wondering if there could be a mechanism added to allow a service to return multiple things.

For instance, by returning a JSON blob with keys like "probabilities/xpos" and "probabilities/head" rather than just a single "probabilities" (where a service with only one value listed for :anno-type in the config file would have the "probabilities" and "probabilities/xpos" (or whatever type it was) be treated the same).

lgessler commented 2 years ago

This would be a good feature I agree, one of many improvements that would help with the efficiency of the way NLP services work with the Midas Loop core system.