code: public static List<IntDependency> treeToDependencyList(Tree tree, Index<String> wordIndex, Index<String> tagIndex) {
      List<IntDependency> depList = new ArrayList<IntDependency>();
      treeToDependencyHelper(tree, depList, 0, wordIndex, tagIndex);
      if (DEBUG) {
        System.out.println("----------------------------");
        tree.pennPrint();
        System.out.println(depList);
      }
      return depList;
    }
docs: Returns the List of dependencies for a binarized Tree.
  In this tree, one of the two children always equals the head.
  The dependencies are in terms of
  the original tag set not the reduced (projected) tag set.
  
  @param tree A tree to be analyzed as dependencies
  @return The list of dependencies in the tree (int format)