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
I think you could use a corpus-based dependency parser instead of the grammar-based one NLTK provides.
Doing corpus-based dependency parsing on a even a small amount of text in Python is not ideal performance-wise. So in NLTK they do provide a wrapper to MaltParser, a corpus based dependency parser.
You might find this other question about RDF representation of sentences relevant.