Question

What is the best turnkey (ready to use, industrial-strength) relation detection library?

I have been playing around with NLTK and the results I get are not very satisfactory.

Ideally, I would like a library that can take sentences like:

"Sarah killed a wolf that was eating a child"

and turn it into a data structure that means something like:

killed(Sarah, wolf) AND eating(wolf,child)

I know that this is the subject of a large body of research and that it is not an easy task. That said, is anyone aware of a reasonably robust ready-to-use library for detecting relations?

Was it helpful?

Solution

Update: Extractiv is no longer available.

Extractiv's On-Demand REST service: http://rest.extractiv.com/extractiv/?url=https://stackoverflow.com/questions/4732686/best-turnkey-relation-detection-library&output_format=html_viewer will process this page, extract and display the two semantic triples you desire in the bottom left corner under "GENERIC". (It throws away some of the text from the page in the html viewer, but this text is not thrown away if you utilize json or rdf output).

This is assuming you're open to a commercial, industrial strength solution, though limited free usage is allowed. It's a web service but open source libraries can be used to access it or could be purchased from Language Computer Corporation.

OTHER TIPS

These relations can be read fairly easily out of the output of dependency notations. For instance, put into the Stanford Parser online, you can see both of the two subject-verb-object triples in your example in the typed dependencies collapsed representation as:

nsubj(killed-2, Sarah-1)
dobj(killed-2, wolf-4)

nsubj(eating-7, wolf-4)
dobj(eating-7, child-9)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top