public static void main(String[] args) { String filename = null; boolean p = true; try { filename = args[0]; if (args.length == 2) p = Boolean.parseBoolean(args[1]); if (args.length > 2) throw new Exception(); } catch (Exception e) { System.out .println("usage: java edu.illinois.cs.cogcomp.lbjava.learn.Lexicon <lex file> [<package names = true>]"); System.exit(1); } Lexicon lexicon = readLexicon(filename); lexicon.printCountTable(p); if (lexicon.lexiconChildren != null) { System.out.println("\nChildren:"); lexicon.lexiconChildren.printCountTable(p); } }