com.wcohen.ss.expt
Class MatchExptScript

java.lang.Object
  extended by com.wcohen.ss.expt.MatchExptScript

public class MatchExptScript
extends java.lang.Object

Perform a series of match experiments, specified by a script in an input file.

The input file can contain these commands:

  1. echo on, echo off

  2. blocker CLASS, distance CLASS, dataset FILE
  3. clear blockers, clear learners, clear datasets
  4. show blockers, show learners, show datasets

  5. compute: compute pairwise learners for using all declared blockers, learners, datasets
  6. table maxF1, table averagePrecision, table time, table blockerRecall: show summary performance tables
  7. precisionRecall: show precision-recall curves (11-pt interpolated, plus non-interpolated average precision.)

  8. save FILE, restore FILE: save previously 'compute'-d results
  9. runScript FILE: execute a sub-script


Field Summary
static java.lang.String BLOCKER_PACKAGE
           
static java.lang.String DISTANCE_PACKAGE
           
 
Constructor Summary
MatchExptScript()
           
 
Method Summary
 void blocker(java.lang.String blockerClass)
          Load a blocker.
 void blocker(java.lang.String blockerClass, java.lang.String param, java.lang.String value)
          Load a blocker, with optional boolean value
 void clear(java.lang.String what)
          Clear datasets, blockers, or learners.
 void compute()
          Compute learners.
 void dataset(java.lang.String dataFile)
          Load a dataset.
 void distance(java.lang.String distanceClass)
          Load a distance learner.
 void echo(java.lang.String onOrOff)
          Turn echoing of commands on/off.
 void learner(java.lang.String learnerClass)
          Load a learner.
static void main(java.lang.String[] argv)
           
 void precisionRecall()
          Show interpolated 11-pt precision curves for each blocker/distance/dataset
 void restore(java.lang.String file)
          Restore experimental data previously 'saved' toa file.
 void runScript(java.lang.String configFileName)
          Load commands from a file and execute them.
 void save(java.lang.String file)
          Save current experimental data to a file
 void show(java.lang.String what)
          Show datasets, blockers, or learners.
 void table(java.lang.String what)
          Show a table of some expt-wide numeric measurement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCKER_PACKAGE

public static final java.lang.String BLOCKER_PACKAGE
See Also:
Constant Field Values

DISTANCE_PACKAGE

public static final java.lang.String DISTANCE_PACKAGE
See Also:
Constant Field Values
Constructor Detail

MatchExptScript

public MatchExptScript()
Method Detail

clear

public void clear(java.lang.String what)
Clear datasets, blockers, or learners.


show

public void show(java.lang.String what)
Show datasets, blockers, or learners.


echo

public void echo(java.lang.String onOrOff)
Turn echoing of commands on/off.


dataset

public void dataset(java.lang.String dataFile)
             throws MatchData.InputFormatException
Load a dataset.

Throws:
MatchData.InputFormatException

learner

public void learner(java.lang.String learnerClass)
Load a learner.


distance

public void distance(java.lang.String distanceClass)
Load a distance learner. Same as 'learner', provided for backward compatibility, and because sometimes it's more reasonable to think of a distance functions rather than learners for them.


blocker

public void blocker(java.lang.String blockerClass)
             throws java.lang.ClassNotFoundException,
                    java.lang.InstantiationException,
                    java.lang.IllegalAccessException
Load a blocker.

Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

blocker

public void blocker(java.lang.String blockerClass,
                    java.lang.String param,
                    java.lang.String value)
             throws java.lang.ClassNotFoundException,
                    java.lang.InstantiationException,
                    java.lang.IllegalAccessException,
                    java.lang.reflect.InvocationTargetException,
                    java.lang.NoSuchMethodException
Load a blocker, with optional boolean value

Throws:
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

compute

public void compute()
Compute learners.


table

public void table(java.lang.String what)
           throws java.lang.NoSuchMethodException,
                  java.lang.IllegalAccessException,
                  java.lang.reflect.InvocationTargetException
Show a table of some expt-wide numeric measurement.

Throws:
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

precisionRecall

public void precisionRecall()
Show interpolated 11-pt precision curves for each blocker/distance/dataset


save

public void save(java.lang.String file)
          throws java.io.IOException,
                 java.io.FileNotFoundException
Save current experimental data to a file

Throws:
java.io.IOException
java.io.FileNotFoundException

restore

public void restore(java.lang.String file)
             throws java.io.IOException,
                    java.io.FileNotFoundException,
                    java.lang.ClassNotFoundException
Restore experimental data previously 'saved' toa file. It will be possible to analyze this data with 'table' commands and etc, but not to perform additional experiments.

Throws:
java.io.IOException
java.io.FileNotFoundException
java.lang.ClassNotFoundException

runScript

public void runScript(java.lang.String configFileName)
Load commands from a file and execute them.


main

public static void main(java.lang.String[] argv)