I'm looking for a way to computationally find any actionable clauses within a body of text. Ideally there is a library I could use that I just give a body of text and it spits out the actions that it finds. Next best, would be if there is an algorithm described somewhere that does this which I could try to implement. I don't know much about NLP, but here is what I've found/thought/tried so far.
Most actions occur in imperative sentences, so detecting whether a sentence is imperative or not could help. I'm not sure how best to detect this, but one idea that was given to me was to use the Stanford parser and look for any instances of nsubj
. If none are found, then this would be considered an action. Just from some testing I did with some sample sentences, I found that some sentences that I consider actions contain instances of nsubj
. Are there more rules I could possibly add to this to improve the precision? I also have no clue how this will fare in terms of recall rate either. Are there any other completely different approaches you could recommend?
Some example sentences that I would like to detect as actions:
Please pass on the enclosed instructions to your teams who are interested.
In the above example, it finds nsubj(interested-12, who-10)
.
Can you prepare a Powerpoint presentation for 3pm today?
In the above example, it finds nsubj(prepare-3, you-2)
.
Remember to pick up some milk at the store.
This doesn't contain nsubj
.