Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUTime NIGHT constant range end time is before start time #39

Closed
rickystillwell opened this issue Dec 1, 2014 · 1 comment
Closed
Labels

Comments

@rickystillwell
Copy link

The NIGHT constant in SUTime.java currently has the range between hour (19:00 - 5:00) giving it a duration of -14 hours

REPRODUCE:
http://nlp.stanford.edu:8080/sutime/process
Input: "tomorrow night"
Output: tomorrow night

image

BUG LOCATION:
edu.stanford.nlp.time.SUTime.java:724
public static final Time NIGHT = createTemporal(StandardTemporalType.TIME_OF_DAY, "NI", new InexactTime(new Range(new InexactTime(new Partial(DateTimeFieldType.hourOfDay(), 19)), new InexactTime(new Partial(DateTimeFieldType
.hourOfDay(), 5)))));

FIX SHOULD BE SOMETING LIKE:
public static final Time NIGHT = createTemporal(StandardTemporalType.TIME_OF_DAY, "NI", new InexactTime(new Range(new InexactTime(new Partial(DateTimeFieldType.hourOfDay(), 19)), new InexactTime(new Partial(DateTimeFieldType
.hourOfDay(), 24)))));

@manning manning added the bug label Dec 24, 2014
@manning
Copy link
Member

manning commented Jan 20, 2015

A fix for this was made by @angelxuanchang in commit 0e14789 on github and will be in the next release ... soon.

@manning manning closed this as completed Jan 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants