Class EvalE

java.lang.Object
  extended by EvalE

public class EvalE
extends java.lang.Object

Standalone class for evaluation for XML-formatted event files. This class is meant to be invoked from the command line with two parameters: the gold file path and the test file path. If needed, it could also be instanciated as a Java object, but is primarily not written for this usage. The test files are a file with distilled events from EvEx. The syntax format for GOLD and TEST is equal. Distilled events are defined between and , one per line, in the format: Events in this format is evaluated in a "stupid" fashion, e.g. no action is taken to make sure matching events are compared.

See Also:
EvEx, Anto, Syno

Nested Class Summary
 class EvalE.EvalEvent
          Conatiner class to hold parsed events
 class EvalE.EvalTHandler
          Internal class to parse the distilled xml event file.
 
Field Summary
 Anto anto
           
 java.io.File genfile
           
 EvalE.EvalTHandler genhandler
           
 Syno syno
           
 java.io.File tqlfile
           
 EvalE.EvalTHandler tqlhandler
           
 
Constructor Summary
EvalE(java.lang.String genfile_name, java.lang.String tqlfile_name)
          The constructor of EvalE enables it to be invoked from another class if needed.
 
Method Summary
 void eval()
          The method for performing evaluation of events.
 int intDiv(int x, int y)
           
 boolean intervention(java.lang.String ge, java.lang.String te)
          Intervention is a method for comparing two strings.
static void main(java.lang.String[] args)
          Static method allowing invocation of this class from command line.
 void makeParser()
          Method to invoke parsing of the xml event files.
 java.lang.String perc(int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

genfile

public java.io.File genfile

tqlfile

public java.io.File tqlfile

genhandler

public EvalE.EvalTHandler genhandler

tqlhandler

public EvalE.EvalTHandler tqlhandler

syno

public Syno syno

anto

public Anto anto
Constructor Detail

EvalE

public EvalE(java.lang.String genfile_name,
             java.lang.String tqlfile_name)
The constructor of EvalE enables it to be invoked from another class if needed. Normally, it is invoked from command line.

Parameters:
genfile_name - the path to gold-file in distilled format
tqlfile_name - the path to test-file in distilled format
Method Detail

main

public static void main(java.lang.String[] args)
Static method allowing invocation of this class from command line.


eval

public void eval()
The method for performing evaluation of events. The events are loaded sequentially, and a warning is printed if their number differ. There should be an equal number of events. If this is not the case, manual curation of event files are required.


intervention

public boolean intervention(java.lang.String ge,
                            java.lang.String te)
Intervention is a method for comparing two strings. It employs Syno and Anto to determine (in)equality beyond lexical comparision. If no specific similarity is found, the user is requested to evaluate the event manually.

Parameters:
ge - the gold word
te - the test word
Returns:
result of the comparision

makeParser

public void makeParser()
Method to invoke parsing of the xml event files.


intDiv

public int intDiv(int x,
                  int y)

perc

public java.lang.String perc(int x,
                             int y)