de.dfleischhacker.uni.thesis.calculator
Class Calculator

java.lang.Object
  extended by de.dfleischhacker.uni.thesis.calculator.Calculator

public class Calculator
extends java.lang.Object

This class provides methods to calculate the values of precision and recall for an alignment given a reference alignment.


Constructor Summary
Calculator(Alignment alignment, Alignment reference)
          Initializes the Calculator class with the given alignments.
 
Method Summary
 Alignment getIntersection()
          Returns the intersection calculated for computing precision and recall as an alignment.
 float getPrecision()
          Returns the value for the precision of the alignment with regard to the reference alignment given at creation of this calculator class.
 float getRecall()
          Returns the value for the recall of the alignment with regard to the reference alignment given at creation of this calculator class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Calculator

public Calculator(Alignment alignment,
                  Alignment reference)
Initializes the Calculator class with the given alignments.

Parameters:
alignment - alignment to evaluate
reference - alignment to use as reference
Method Detail

getPrecision

public float getPrecision()
Returns the value for the precision of the alignment with regard to the reference alignment given at creation of this calculator class.

Returns:
precision value

getRecall

public float getRecall()
Returns the value for the recall of the alignment with regard to the reference alignment given at creation of this calculator class

Returns:
recall value

getIntersection

public Alignment getIntersection()
Returns the intersection calculated for computing precision and recall as an alignment.

Returns:
calculated intersection of alignment and reference alignment