-
Notifications
You must be signed in to change notification settings - Fork 11
SUTime functionality #16
Comments
This is not currently supported in the wrapper, but I could add it. Will keep you updated on this thread. |
Hey, Install pynlp==0.4.2
To get all the timex objects: doc = nlp(text)
timexs = {entity.timex for entity in doc.entities if entity.timex} For representations print(timexs) For text and other attributes for timex in timex:
print(timex, timex.tid) # for example Note that i used python Any questions or bugs, please let me know. |
Edit: Original comment down below. I solved that problem; I just didn't start the server properly with java.se.ee modulesRight now, some timex objects don't have anything stored in
Is there somewhere I'm supposed to pass in a "current" time, or any way I'm to let coreNLP know what time to base it's relative time calculations off of? Thanks Original commentThanks for adding this! Sorry this has taken so long; I've been messing around with timex but all the timex values I'm getting are blank. Following your code above exactly and with the text "In 1985, Reagan was in office.", "1985" has a non-null timex. However, when I print the
I'm thinking it has to do with the fact I set |
Could you show me the same excerpt but with |
Here is the
I went through some of your source code here on GitHub and found an
compared to a year timex:
However, running Furthermore, running |
According to Stanford's website, SUTime is provided automatically in corenlp. Is it included in this wrapper as well? If so, is there any documentation or can anyone provide an example as to how to use it (specifically to go from tagged entities to storing/printing a TIMEX3 object)?
The text was updated successfully, but these errors were encountered: