de.dfleischhacker.uni.thesis.userinterface.textbased
Class BatchStarter

java.lang.Object
  extended by de.dfleischhacker.uni.thesis.userinterface.textbased.BatchStarter

public class BatchStarter
extends java.lang.Object

This class provides batchmodes for computing precision and recall without using the graphical user interface. Thus, it simplifies the evaluation of larger amounts of alignments by far. The batchmode is mainly "configured" by filenames found in the processed directory. There are two different modes: the general batchmode and the conference batchmode. Both are described in the following

General batchmode

This is the standard batchmode. It requires two parameters to be passed from the commandline at runtime. SEMANTIC BASEDIR The first parameter is the name of the semantic which is to simplify matters only the first part of the name and thus one of Natural, Pragmatic or Null (for classical measures). The semantic name is case-insensitive. The second argument is the base-directory whose subdirectories will be traversed by the batchmode. The format for the base-directory and its contents is as follows. basedir/ [ directory passed at commandline ] subdir1/ [ directory of first ontology set ] onto1.rdf [ first ontology ] onto2.rdf [ second ontology ] refalign.rdf [ reference alignment ] *.rdf [ alignments to be evaluated ] subdir2/ ... The base-directory may contain an arbitrary number of sub-directories which in turn may contain (besides the two ontologies and the reference alignment) an arbitrary number of alignments. These alignments are evaluated according to the given semantics and with regard to the ontologies and the reference alignment. The results are written into an XML file named results.xml which is placed in the base-directory.

Conference batchmode

As the conference test set would be very hard to evaluate using the general batchmode, we implemented a special batchmode for this test set. This mode requires three arguments prefixed by a special argument which activates the conference batchmode. --conference THRESHOLD SEMANTIC BASEDIR The argument "--conference" activates the conference mode. The next argument specifies the threshold. This is a quirk of the conference evaluation. Only correspondences with a threshold equal or greater than the specified threshold are considered during the evaluation, all other correspondences are ignored. This argument must be parseable into a float type, i.e. 0.2 , 0.5 or 0.7 . The semantic argument is the same as described for the general batchmode. The last argument determines the base-directory to work at. Different from the general mode, the conference mode does not expect subdirectories but expects the data to be directly in the provided directory. The naming conventions for these files are as follows (we use regular expressions in the following descriptions). The base directory may contain three different types of files: ontologies, reference alignments and alignments which should be evaluated. The ontologies have to be named matching the expression [a-zA-Z]*\.owl The reference alignments have names matching to FIRSTONTO-SECONDONTO\.(rdf|owl|xml) and the alignments are named MATCHER-FIRSTONTO-SECONDONTO\.(rdf|owl|xml). FIRSTONTO, SECONDONTO and MATCHER are string matching [a-zA-Z]* For each possible combinaton of ontologies the name FIRSTONTO-SECONDONTO is generated and if there exists a corresponding reference alignment each alignment with an arbitrary matcher name and the correct reference alignment name is evaluated against the ontologies and the reference alignment. The results are saved into the base directory as an XML file named results.xml


Constructor Summary
BatchStarter()
           
 
Method Summary
static void handleBatchmode(java.lang.String pathname, java.lang.String semantic)
          Actually handles the general batchmode
static void main(java.lang.String[] args)
          Calculates precision and recall for every subdirectory of the directory passed on the commandline which contains all required files and saves the generated data into the same directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchStarter

public BatchStarter()
Method Detail

main

public static void main(java.lang.String[] args)
Calculates precision and recall for every subdirectory of the directory passed on the commandline which contains all required files and saves the generated data into the same directory.

Parameters:
args - command-line arguments

handleBatchmode

public static void handleBatchmode(java.lang.String pathname,
                                   java.lang.String semantic)
Actually handles the general batchmode

Parameters:
pathname - path of basedir