Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

algorithm to detect time, date and place from invitation text [closed]

I am researching some Natural Language Processing algorithms to read a piece of text, and if the text seems to be trying to suggest a meeting request, it sets up that meeting for you automatically.

For example, if an email text reads:

Let's meet tomorrow someplace in Downtown at 7pm".

The algorithm should be able to detect the Time, date and place of the event.

Does someone know of some already existing NLP algorithms that I could use for this purpose? I have been researching some NLP resources (like NLTK and some tools in R), but did not have much success.

Thanks

like image 909
Darth.Vader Avatar asked Mar 23 '23 06:03

Darth.Vader


1 Answers

This is an application of information extraction, and can be solved more specifically with sequence segmentation algorithms like hidden Markov models (HMMs) or conditional random fields (CRFs).

For a software implementation, you might want to start with the MALLET toolkit from UMass-Amherst, it's a popular library that implements CRFs for information extraction.

You would treat each token in a sentence as something to be labeled with the fields you are interested in (or 'x' for none of the above), as a function of word features (like part of speech, capitalization, dictionary membership, etc.)... something like this:

token       label       features
-----------------------------------
Let         x           POS=NNP, capitalized
's          x           POS=POS
meet        x           POS=VBP
tomorrow    DATE        POS=NN, inDateDictionary
someplace   x           POS=NN
in          x           POS=IN
Downtown    LOCATION    POS=NN, capitalized
at          x           POS=IN
7pm         TIME        POS=CD, matchesTimeRegex
.           x           POS=.

You will need to provide some hand-labeled training data first, though.

like image 97
burr Avatar answered Apr 25 '23 14:04

burr