code: public static Collection<Constituent> parsevalObjectify(Tree t, TreeTransformer collinizer, boolean labelConstituents) {
      Collection<Constituent> spans = new ArrayList<Constituent>();
      Tree t1 = collinizer.transformTree(t);
      if (t1 == null) {
        return spans;
      }
      for (Tree node : t1) {
        if (node.isLeaf() || node.isPreTerminal() || (node != t1 && node.parent(t1) == null)) {
          continue;
        }
        int leftEdge = t1.leftCharEdge(node);
        int rightEdge = t1.rightCharEdge(node);
        if(labelConstituents)
          spans.add(new LabeledConstituent(leftEdge, rightEdge, node.label()));
        else
          spans.add(new SimpleConstituent(leftEdge, rightEdge));
      }
      return spans;
    }
docs: Takes a Tree and a collinizer and returns a Collection of {@link Constituent}s for
  PARSEVAL evaluation.  Some notes on this particular parseval:
  <ul>
  <li> It is character-based, which allows it to be used on segmentation/parsing combination evaluation.
  <li> whether it gives you labeled or unlabeled bracketings depends on the value of the <code>labelConstituents</code>
  parameter
  </ul>
  
  (Note that I haven't checked this rigorously yet with the PARSEVAL definition
  -- Roger.)