1

I have this parsed text in this format, I got it by using Standford nlp.

   (ROOT
  (S
    (NP (DT A) (NN passenger) (NN plane))
    (VP (VBZ has)
      (VP (VBD crashed)
        (ADVP (RB shortly))
        (PP (IN after)
          (NP
            (NP (NN take-off))
            (PP (IN from)
              (NP (NNP Kyrgyzstan) (`` `) (NNP scapital) (, ,) (NNP Bishkek)))))
        (, ,)
        (VP (VBG killing)
          (NP
            (NP (DT a) (JJ large) (NN number))
            (PP (IN of)
              (NP
                (NP (DT those))
                (PP (IN on)
                  (NP (NN board)))))))))
    (. .)))

det(plane-3, A-1)
nn(plane-3, passenger-2)
nsubj(crashed-5, plane-3)
aux(crashed-5, has-4)
root(ROOT-0, crashed-5)
advmod(crashed-5, shortly-6)
prep_after(crashed-5, take-off-8)
nn(Bishkek-14, Kyrgyzstan-10)
nn(Bishkek-14, scapital-12)
prep_from(take-off-8, Bishkek-14)
dep(crashed-5, killing-16)
det(number-19, a-17)
amod(number-19, large-18)
dobj(killing-16, number-19)
prep_of(number-19, those-21)
prep_on(those-21, board-23) 

I am trying to construct an RDF graph and I need a tool or a library to extract triplet (subject,object,predicate) from it.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Amal
  • 21
  • 4
  • 1
    Please note that "Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." Asking for a library to do this is off-topic here. However, turning a tree structure into a RDF-based representation isn't too difficult. If you've written some code to start this process, asking about it would be on topic. – Joshua Taylor Apr 03 '14 at 13:54
  • 1
    Thanks Mr Joshua for the clarification I will try – Amal Apr 04 '14 at 16:07

2 Answers2

2

You can use CoreNLP's OpenIE module to extract triplets visit here :

https://nlp.stanford.edu/software/openie.html

to know more. You can further use those relationship triplets to create RDF graph.

Rishi Kesh
  • 71
  • 5
1

If you have annotated data, you can train your triple extraction model via TDEER.

Sean Lee
  • 63
  • 1
  • 5