Closed aendra-rininsland closed 6 years ago
Thanks for making this change! One small suggestion: would you mind making hostname also an argument to annotate_corenlp
, and reading the env variables in the calling function and passing them on? I'd prefer for the annotate function to be callable with different ports and stuff without changing the environment (example: if you have multiple CoreNLP servers, and distribute your requests among them for speed up).
Apologies for the delay! Have moved hostname to a kwarg of annotate_corenlp.
Currently the codebase assumes that CoreNLP will be situated on localhost, however, in a microservice architecture this probably isn't true.
This PR populates the hostname and port fields based on environment variables
CORENLP_HOSTNAME
andCORENLP_PORT
. In their absence, it falls back to defaultslocalhost
and9000
, respectively.