Hi guys,
since days I try to figure this out. Ich googled a lot, posted on stackoverflow, but can't get an answer. Now I found you guys, hope someone is able to help me. I would be very happy :)
So here my problem. I have a sentence/question: "How much could you rent a Volkswagen bug for in 1966?"
I want to get the relations between the words, like in this picture

I tried this:
text = nltk.word_tokenize("How much could you rent a Volkswagen bug for in 1966?")
posTagged = nltk.pos_tag(text)
n = nltk.chunk.ne_chunk(posTagged)
n.draw()
But I get only a flat tree. So how am I able to do get the relation between "How much" and "rent"? I am using python 3 and nltk 3.
With best regards, Oliver