12

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.

smci
  • 32,567
  • 20
  • 113
  • 146
pedalpete
  • 21,076
  • 45
  • 128
  • 239
  • Are you sure this is the correct site for asking this question? – Alexander Galkin Nov 18 '11 at 14:23
  • Would you recommend another site? Is there an NLP community? Or is it the way the question is posed, rather than the content that has you wondering @alexander? – pedalpete Nov 18 '11 at 14:33
  • Possible duplicate of [Extracting 'useful' information out of sentences?](http://stackoverflow.com/questions/6482152/extracting-useful-information-out-of-sentences), which asks about Python NLTK. – smci Oct 12 '16 at 20:16
  • Another complication is you're also dealing with implied request: ***"Pick Tim up from the airport"***. There's nothing explicitly saying that in *"Tim's flight arrives at 4pm. It's American Airlines flight 331 arriving from Dallas... make sure you leave yourself enough time."* (That could also be construed to mean e.g. *"You don't need to pick him up, but make sure you leave yourself enough time to make dinner before Tim gets a rideshare from the airport and arrives at your place"*). – smci Jun 01 '22 at 21:57

2 Answers2

5

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.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836
  • How to understand which sentences are in imperative mood ? Will you please write some code to get the info extracted as asked in question. – Soumya Boral Aug 26 '19 at 19:31
1

This domain is called Information Extraction.

The general approach to sentence understanding is either:

  • extract a Part-Of-Speech tagged parse-tree (Python spaCy.io, nltk, CoreNLP etc.)
  • extract a word-vector (e.g. word2vec)
smci
  • 32,567
  • 20
  • 113
  • 146