System.out.println("\nHead-finding instructions:");
System.err.println("\nHead-finding instructions:");
  public static void main(String[] args) {    Class thisClass = danbikel.parser.english.HeadFinder.class;    String encoding = Language.encoding();    String headTableFilename = null;    String inputFilename = null;    if (args.length == 2) {      headTableFilename = args[0];      inputFilename = args[1];    }    else if (args.length == 1) {      headTableFilename = Settings.get(Settings.headTablePrefix +				       Language.getLanguage());      inputFilename = args[0];    }    else {      System.out.println("usage: [head table] <input file>");      System.exit(1);    }    try {      InputStream is = Settings.getFileOrResourceAsStream(thisClass,							  headTableFilename);      int bufSize = Constants.defaultFileBufsize;      SexpTokenizer headTableTok =	new SexpTokenizer(is, Language.encoding(), bufSize);      Sexp headTable = Sexp.read(headTableTok);      HeadFinder hf = new HeadFinder(headTable);      System.out.println("\nHead-finding instructions:");      Iterator it = hf.headFindInstructions.keySet().iterator();      while (it.hasNext()) {	Symbol head = (Symbol)it.next();	System.out.print("(" + head + " ");	HeadFindInstruction[] instructions =	  (HeadFindInstruction[])hf.headFindInstructions.get(head);	for (int i = 0; i < instructions.length; i++) {	  System.out.print(" ");	  System.out.print(instructions[i]);	}	System.out.println(")");      }      System.out.println("\n\n\nFile " + inputFilename + " with head nodes:\n");      FileInputStream inputFile = new FileInputStream(inputFilename);      BufferedReader inputReader =	new BufferedReader(new InputStreamReader(inputFile,						 encoding));      SexpTokenizer inputTok = new SexpTokenizer(inputReader);      Sexp tree = null;      while ((tree = Sexp.read(inputTok)) != null)	System.out.println(hf.addHeadInformation(tree));    }    catch (FileNotFoundException fnfe) {      System.err.println(fnfe);    }    catch (IOException ioe) {      System.err.println(ioe);    }  }