Going through the NLTK book, it\'s not clear how to generate a dependency tree from a given sentence.
The relevant section of the book: sub-chapter on dependency gra
If you need better performance, then spacy (https://spacy.io/) is the best choice. Usage is very simple:
import spacy
nlp = spacy.load('en')
sents = nlp(u'A woman is walking through the door.')
You'll get a dependency tree as output, and you can dig out very easily every information you need. You can also define your own custom pipelines. See more on their website.
https://spacy.io/docs/usage/