static public void main(String[] argv) 
    {
        try {
	    Blocker blocker = (Blocker)Class.forName(BLOCKER_PACKAGE+argv[0]).newInstance();
	    StringDistanceLearner learner = DistanceLearnerFactory.build( argv[1] );
	    MatchData data = new MatchData(argv[2]);
	    MatchExpt expt = new MatchExpt(data,learner,blocker);
            for (int i=3; i<argv.length; ) {
                String c = argv[i++];
                if (c.equals("-display")) {
                    expt.displayResults(true,System.out);
                } else if (c.equals("-dump")) {
                    expt.dumpResultsAsStrings(System.out);
                } else if (c.equals("-dumpIds")) {
                    expt.dumpResultsAsIds(System.out);
                } else if (c.equals("-shortDisplay")) {
                    expt.displayResults(false,System.out);
                } else if (c.equals("-graph")) {
                    expt.graphPrecisionRecall(System.out);
                } else if (c.equals("-summarize")) {
                    System.out.println("maxF1:\t" + expt.maxF1());
                    System.out.println("avgPrec:\t" + expt.averagePrecision());
                } else {
                    throw new RuntimeException("illegal command "+c);
                }
            }
        } catch (Exception e) {
		    e.printStackTrace();
		    System.err.println("\nusage: <blocker> <distanceClass> <matchDataFile> [commands]\n");
		    System.err.println("\nAvailable commands: \n");
		    for (String s : "display dump dumpIds shortDisplay graph summarize".split(" ")) {
		    		System.err.println("\t"+s);
		    }
        }
    }