private ArrayList<Tuple> countParse(ParseTree tree, int depth) {
        ArrayList<Tuple> counts = new ArrayList<Tuple>();

        if (tree.childIsTerminal()) {
            String pos = getPOS(tree.getLabel());
            Tuple tup = new Tuple(pos, tree.getLabel(), 1);
            counts.add(tup);
            return counts;
        }
        else if (depth == MAXDEPTH) {  // we've reached the depth we're willing to go
            if (tree.getLabel().equals("S") == false) { // if it's not a sentence
                for (ParseTree subtree : tree.getChildren()) {
                    String label = subtree.getLabel();
                    int subtreeTerminalNum = subtree.getTerminalNum();
                    String pos = getPOS(label);
                    Tuple tup = new Tuple(pos, label, subtreeTerminalNum);
                    counts.add(tup);
                }
                return counts;
            } else { // if it is a sentence, continue parsing
                return countParse(tree, 0);

            }
        }
        else { // we still need to traverse nodes
            for (ParseTree subtree : tree.getChildren()) {
                ArrayList<Tuple> subtreeTuples = countParse(subtree, depth + 1);
                counts.addAll(subtreeTuples);
            }

            return counts;
        }
    }