I came across this paper http://swrc.kaist.ac.kr/paper/171.pdf, which describes a method to extract triplets from a dependency tree. This result is exactly I want. However the paper only mentioned it is a "post order tree traversal". Is there any open source implementation to extract triplets? For example, "VRLA is held at Los Angeles in 2016." should generate "VRLA, is held at, Los Angeles" and "VRLA, is held, in 2016"
Asked
Active
Viewed 1,118 times
1 Answers
2
You can try taking a look at the Stanford OpenIE system (part of CoreNLP):
new Sentence("VRLA is held at Los Angeles in 2016").openieTriples();
This should generate triples for (VRLA; be held at; Los Angeles) and (VRLA; be held in; 2016). More documentation on usage can be found on the OpenIE Annotator page. More generally, there are a number of OpenIE systems you can take a look at. Ollie is perhaps the most prominent, from the University of Washington.

Gabor Angeli
- 5,729
- 1
- 18
- 29
-
OpenIE seems extremely limited. I'm trying to do a very similar thing to the OP - basically extract triples from text, but also retain all other information like adverbs, adjectives and add them as modifiers to a word. But Stanford's OpenIE really doesn't work well. "I ran fast." doesn't turn up any relations. Are there any other commercial licenseable information extractors that are more robust than Stanford's? Ollie looks great - but not commercial licenseable. – abagshaw Mar 23 '16 at 18:08
-
1I think what you're describing is a dependency parse. OpenIE will extract subject / verb / object triples, and keep the dependency structure of the arguments (from which you can extract adverbs and adjectives). The step above this is something like AMR or a dependency parse. Incidentally, "I ran fast" is not supposed to extract any triples: "fast" is a modifier and not the object of the relation "ran." – Gabor Angeli Mar 23 '16 at 18:17
-
True, my mistake. I suppose it wouldn't be able to return a double per-se I-ran with the modifier fast on ran. But doesn't matter. Another more complex example. "My classmates were interested in the presentation." returns lots of triples and works great with OpenIE - but when I change it to "My classmates were not interested in the presentation." simply adding in not - OpenIE falls apart and returns nothing. So I agree something like AMR I think is what I'm looking for. Do you know of any open source libraries for AMR for Java? – abagshaw Mar 23 '16 at 18:24
-
Just realized maybe OpenIE can't resolve negative relations? Odd. – abagshaw Mar 23 '16 at 18:26
-
Yeah; negative relations are a known shortcoming of Stanford OpenIE. It's smart enough to detect a negation and not extract the positive version, and by design it doesn't like negated relations like "not interested in", but it never made it to properly detecting and scoping negation. – Gabor Angeli Mar 23 '16 at 19:34
-
Too bad. Going back to my previous question though: Do you know of any open source libraries for AMR for Java? – abagshaw Mar 23 '16 at 19:35
-
1Last one I saw was JAMR (https://github.com/jflanigan/jamr) -- but it's a year old now and there may be something better. If you can find the code for the paper "Broad-coverage CCG Semantic Parsing with AMR" I believe they have the state-of-the-art result now. – Gabor Angeli Mar 23 '16 at 19:38