The algorithm can be run with input SSF format of Hindi-urdu Dependency Treebank. It will generate Phrase structure trees for the corresponding dependency trees. Please see this paper for more details.
I have given a sample file of dependency trees that can be used as an input.
conversion.py is the main module which takes dependency tree as input (in the format given in sample_input file) and prints output PS trees (in form of bracketted notation).