1

I am trying to get sutime annotations using the Stanford CoreNLP server and it seems that the reference time cannot be set using any properties on the server.

Is there a way to do this?

For example, given the text "I need a desk for tomorrow from 2pm to 3pm", I need to provide the reference date as datetime.now() in my Python client for the server in order for SUTime to resolve the word 'tomorrow' to the correct date.

devavratrk
  • 11
  • 2

1 Answers1

2

There is, at least in Stanford CoreNLP 3.9.1. Send your text to the following URL:

[stanford_server_url]/?properties={"ner.providedDocDate": "yyyy-mm-dd"}

I'd wondered about this myself for quite a while. Had to read the source code to find it, though.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Sam Bayer
  • 415
  • 3
  • 10