I am doing a project where I am extracting date/time entities from text. I'm using a rule-based system to extract the temporal expressions and ground them to an actual date/time.

The second part of the problem I hope to solve is label the role of each entity discovered. For example, consider the following text: "Leaving at 2pm and back at 4pm". I correctly identified 2pm and 4pm as date/time entities. However, I'm unable to say whether the entity is "start-time", "end-time", or neither.

The question is how do I do this?

I'm new to NLP and ML. Here is an idea I have please tell me if I'm going the right direction:

The plan is to train a logistic regression (or naive bayes?) classifier using the following features:

  1. The average of the word embedding for each word within a window of the date/time phrase.
  2. The POS tags for each word within a window of the date/time phrase??(Not sure how to pass this in to a logistic regression classifier but just a thought)
  3. The word shapes of the words in the temporal expression??

I'm a little confused as to where to start and would really appreciate some pointers on how to select my features and what classifier would be appropriate.

I'm also open to suggestions on learning resources. There's a lot of NER resources online but not many on how to "role classify" found entities.


You might be interested in resources built around TimeML, I think there are some corpora and specific parsers specialized in extracting the time details of events. I don't remember any specifics but I tried to google "timeml extract time" and found a few related resources, that might give you at least some inspiration about how people have dealth with similar problems.

If you don't find anything that suits your need, in general the best approach would be to train a custom NER using your own annotated dataset with "start-time", "end-time", "neither" labels.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.