Extracting Noun Phrases from Parsed Trees 4

Following on from my previous post about NLTK Trees, here is a short Python function to extract phrases from an NLTK Tree structure.