Questions tagged [sutime]

SUTime is a Java library for recognizing and normalizing time expressions.

SUTime is a library for recognizing and normalizing time expressions. It is part of the library suite.

For more information, see the Stanford University homepage.

28 questions
3
votes
0 answers

PicklingError: Could not serialize object: TypeError: can't pickle _jpype._JMethod objects

I am using Google Colab and trying to use Stanford sutime library inside a function that is being called by pyspark. This function takes a row of a given RDD and then uses the sutime library to return a (sentence, frequency) pair. def…
3
votes
0 answers

Custom rules for sutime (Stanford Temporal Tagger)

I've been trying to add custom rules to SUTime and I'm stuck with one of them. I've tried various approaches and none of them seem to get the result I want. 5 - 8 years returns the following. { 'text' : '5 - 8 years', 'type' :…
Abhirath Mahipal
  • 938
  • 1
  • 10
  • 21
2
votes
3 answers

SUTime with regular date reading

i'm using SUutime / stanford nlp, and it's doing a great job, but i can't figure out how to read regular dates formats. for instance: 'we went at 27/10/1988 to the event' it returns null for expression like: 'we went at october 27th 1988 to the…
gCoh
  • 2,719
  • 1
  • 22
  • 46
1
vote
0 answers

JVM DLL not found but I can clearly see the file

I installed openjdk with Homebrew on my Mac but then I run a python library (sutime) that uses Java, I run into this error: FileNotFoundError: [Errno 2] JVM DLL not found:…
solitaria
  • 121
  • 10
1
vote
0 answers

Is Stanford NLP SUTime timezone aware?

We currently use SUTime to help find and normalize date times. However, we've noticed some oddities with relative dates like "today" or "yesterday" especially when crossing over UTC day boundaries (i.e if it is the next day in UTC time and…
1
vote
1 answer

Add custom rules for parsing quarters to SUTime

I'm following the official instructions for adding custom SUTime rules for fiscal year quarters (stuff like Q1, Q2, Q3 and Q4). I used the default defs.sutime.txt and english.sutime.txt as templates for my own rule files. After appending the…
edo
  • 1,712
  • 1
  • 18
  • 19
1
vote
2 answers

I'm getting the following Import Error when importing the sutime module - what does it mean?

I'm getting this error: ImportError: cannot import name 'SUTime' from partially initialized module 'sutime' (most likely due to a circular import) when importing the sutime module as: from sutime import SUTime as suggested in the sutime GitHub…
Hojung Kim
  • 143
  • 1
  • 2
  • 13
1
vote
2 answers

Can't run Maven commands because no pom.xml in directory, but pom.xml doesn't show up in search?

When I run mvn commands, I'm getting this error back: Goal requires a project to execute but there is no POM in this directory (/Users/hojung). Please verify you invoked Maven from the correct directory. However, I'm not finding POM in any…
Hojung Kim
  • 143
  • 1
  • 2
  • 13
1
vote
2 answers

jpype._jclass.NoClassDefFoundError: edu/stanford/nlp/python/SUTimeWrapper

I'm trying to use the sutime python wrapper to make a date normalizer, that would convert any temporal information in strings into dates in the format YYYY-MM-DD. I've created a class, with rules over the sutime outputs to convert the sutime…
1
vote
1 answer

SUTime SequenceMatchRules for "c. DATE - DATE BC"

I'm fighting with Stanford's SequenceMatchRules for recognizing the following input as two dates: Anaximander (c. 610 – c. 546 BC) was a pre-Socratic Greek philosopher who lived in Miletus, a city of Ionia (in modern-day Turkey). (taken from the…
Thurse
  • 253
  • 1
  • 3
  • 16
1
vote
1 answer

How to set reference time for SUTime via StanfordNLP server

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…
devavratrk
  • 11
  • 2
1
vote
1 answer

CoreNLP - NER and SUTime to only recognize absolute dates

I'm working with the Named Entity Recognition annotator of CoreNLP. My problem is that I would like to not recognize as entities relative dates. My goal is to connect dates with events Some interesting dates are 18 Feb 1997, the 20th of july, the…
alsora
  • 551
  • 5
  • 17
1
vote
0 answers

Python: How to parse Timex3 into datetime or equivalent

In my Python3 project, I use SUTime together with Stanford CoreNLP to retrieve normalized time expression in the Timex3 standard. I access CoreNLP using pycorenlp. How can I parse the resulting time expression in Timex3 (part of the TimeML standard)…
pedjjj
  • 958
  • 3
  • 18
  • 40
1
vote
1 answer

How can I convert SUTime objects into regular Calendar or Date objects?

When I use SUTime's API, I provide text and receive a list of CoreMap objects, each detailing the attributes of a time expression in the text. I wish to take such a CoreMap and convert it into a Date or Calendar object, for easier handling and…
Yuval
  • 7,987
  • 12
  • 40
  • 54
1
vote
2 answers

Unexpected Date / DateTime Strings cause exception in Stanford CoreNLP

According to CoreNLP's Git, the issue has been fixed in some version of CoreNLP, possibly 3.5.1 according to my guess since NER is listed as one of the changed modules in the change notes. However, 3.5.x requires the jump to Java 1.8 and we are not…
demongolem
  • 9,474
  • 36
  • 90
  • 105
1
2