Prob1DMap map = new Prob1DMap();
CTReader reader = new CTReader();
reader.open(UTInput.createBufferedFileReader(args[0]));
CTTree tree;
while ((tree = reader.nextTree()) != null)
traverse(tree.getRoot(), map, args[2]);
PrintStream ugram = UTOutput.createPrintBufferedFileStream(args[1]+".1gram");
PrintStream ngram = UTOutput.createPrintBufferedFileStream(args[1]+".ngram");
String s;