Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NLP for extracting actions from text

I'm hoping somebody can point me in the right direction to learn about separating out actions from a bunch of text.

Suppose I have this text

Drop off the dry cleaning, and go to the corner store and pick-up a jug of milk and get a pint of strawberries.
Then, go pick up the kids from school. First, get John who is in the daycare next to the library, and then get Sam who is two blocks away. 
By the time you've got the kids, you'll need to stop by the doctors office for the perscription. Tim's flight arrives at 4pm. 
It's American Airlines flight 331 arriving from Dallas. It will be getting close to rush hour, so make sure you leave yourself enough time.

I'm trying to have it split up into

Drop off the dry cleaning,
 and go to the corner store and pick-up a jug of milk and get a pint of strawberries.
Then, go pick up the kids from school. First, get John who is in the daycare next to the library, and then get Sam who is two blocks away. 
By the time you've got the kids, you'll need to stop by the doctors office for the perscription.
 Tim's flight arrives at 4pm. 
It's American Airlines flight 331 arriving from Dallas. It will be getting close to rush hour, so make sure you leave yourself enough time.

I haven't been able to find anything in my searches that is specifically action based. It would need to be smarter than just picking out verbs, as there are multiple verbs that are sometimes associated with one action for, instance the second item has 'go','pick-up' and 'get', but that is all part of a single action. Of course, "Tim's flight" is only suggests an action with the present participle, with the verb coming toward the end of the segment.

Any suggestions on where to look to do this kind of thing? Things to watch-out for, recommended readings, etc. etc.

like image 558
pedalpete Avatar asked Nov 18 '11 14:11

pedalpete


1 Answers

Simple approach: parse the text using [your favorite parser], then select the sentences or SBAR phrases that are in the imperative mood. The Stanford Parser just so happens to have "Improved recognition of imperatives" in its very latest release.

There's probably no need for machine learning beyond what is already incorporated in standard parser programs.

like image 80
Fred Foo Avatar answered Sep 28 '22 07:09

Fred Foo