iepy icon indicating copy to clipboard operation
iepy copied to clipboard

Is it possible use IEPY as a service?

Open himarora opened this issue 8 years ago • 1 comments

IEPY is good for bulk operations, but my requirement is to get the answer as soon as possible on per request basis which can be simultaneous as well. One approach is:

  1. Get the document id and text from the HTTP request.
  2. Create a temporary csv file with a unique name.
  3. Import that file into iepy using csv_to_iepy.py.
  4. Run preprocess.py.
  5. Predict the output using an already trained pickle model file.
  6. Get the candidate_relation_id from the output csv.
  7. Get further details, such as alias from the db.
  8. Clear the temporary files and db tables.

Now the clearing part is not allowing it to be a concurrent system. If I don't clear the db, it checks if all the steps have been done for previous documents as well.

himarora avatar Feb 07 '17 12:02 himarora

Hi!

I think that what you are wanting to do is very related with this other ticket: https://github.com/machinalis/iepy/issues/62

So, the short answer is "no, cannot be done out of the box", but if you follow a bit the discussion on that thread, should be possible to do the needed changes. Want to make a try?

jmansilla avatar Feb 13 '17 18:02 jmansilla