code: public void decimate(Writer trainW, Writer devW, Writer testW) throws IOException {
      PrintWriter trainPW = new PrintWriter(trainW, true);
      PrintWriter devPW = new PrintWriter(devW, true);
      PrintWriter testPW = new PrintWriter(testW, true);
      int i = 0;
      for (Tree t : this) {
        if (i == 8) {
          t.pennPrint(devPW);
        } else if (i == 9) {
          t.pennPrint(testPW);
        } else {
          t.pennPrint(trainPW);
        }
        i = (i+1) % 10;
      }
    }
docs: Divide a Treebank into 3, by taking every 9th sentence for the dev
  set and every 10th for the test set.  Penn people do this.