4

I want to extract subordinate clause,main clause,relative clause,restrictive relative clause,non-restrictive relative clause from sentences but I don't know how doing this work. for example:

"I first saw her in Paris, where I lived in the early nineties."
[main clause][relative clause]

"She held out the hand that was hurt."
[main clause][restrictive relative clause]

please help me to do this work?

SahelSoft
  • 615
  • 2
  • 9
  • 22

1 Answers1

4

You should be able to extract this information (to a reasonable accuracy) with a constituency parse. There are a number of implementations listed here. To that list, I'd add my own, available for download here. t's faster than any other high-accuracy parser available, and documented reasonably well (for research code).

AaronD
  • 1,701
  • 13
  • 12
  • 1
    Thanks for your answer. I read the document of Stanford parser, but I don't know how to write a program to get the main clause, ... from the sentence. please get me a guide how to get main clause,... of sentence in Java with your parser or others. – SahelSoft Apr 17 '13 at 08:15
  • 1
    In the Penn Treebank annotation style, clauses are usually labeled 'S'. The 'S' node at the top of the tree would generally be the main clause, and any contained 'S' nodes are subsidiary. Of course, that's confounded by fragments (FRAG), and other related labels (SBAR, SBARQ, etc.). You'll want to look over the Penn Treebank Annotation Guidelines and create your own heuristic for what labels you consider 'main' and 'subsidiary' for your application. – AaronD Apr 17 '13 at 16:23