|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.AnnotationDiffer
Nested Class Summary | |
static interface |
AnnotationDiffer.Pairing
|
class |
AnnotationDiffer.PairingImpl
Represents a pairing of a key annotation with a response annotation and the associated score for that pairing. |
static class |
AnnotationDiffer.PairingOffsetComparator
|
protected static class |
AnnotationDiffer.PairingScoreComparator
|
Field Summary | |
static int |
CORRECT
|
static int |
CORRECT_TYPE
A correct type when all annotation are correct represented by Green color |
HashSet |
correctAnnotations
|
protected int |
correctMatches
|
protected List |
finalChoices
A list with the choices selected for the best result. |
protected List |
keyChoices
A list of lists representing all possible choices for each key |
protected List |
keyList
A list with all the key annotations |
protected int |
missing
|
static int |
MISSING_TYPE
A missing type when annotations in key were not present in response Represented by Yellow color |
HashSet |
missingAnnotations
|
static int |
PARTIALLY_CORRECT
|
static int |
PARTIALLY_CORRECT_TYPE
A partially correct type when all annotation are corect represented by Blue color |
HashSet |
partiallyCorrectAnnotations
|
protected int |
partiallyCorrectMatches
|
protected List |
possibleChoices
All the posible choices are added to this list for easy iteration. |
protected List |
responseChoices
A list of lists representing all possible choices for each response |
protected List |
responseList
A list with all the response annotations |
private Set |
significantFeaturesSet
|
protected int |
spurious
|
static int |
SPURIOUS_TYPE
A spurious type when annotations in response were not present in key. |
HashSet |
spuriousAnnotations
|
static int |
WRONG
|
Constructor Summary | |
AnnotationDiffer()
|
Method Summary | |
protected void |
addPairing(AnnotationDiffer.PairingImpl pairing,
int index,
List listOfPairings)
|
List |
calculateDiff(Collection key,
Collection response)
Computes a diff between two collections of annotations. |
Set |
getAnnotationsOfType(int type)
A method that returns specific type of annotations |
int |
getCorrectMatches()
|
int |
getFalsePositivesLenient()
|
int |
getFalsePositivesStrict()
|
double |
getFMeasureAverage(double beta)
|
double |
getFMeasureLenient(double beta)
|
double |
getFMeasureStrict(double beta)
|
int |
getMissing()
|
int |
getPartiallyCorrectMatches()
|
double |
getPrecisionAverage()
|
double |
getPrecisionLenient()
|
double |
getPrecisionStrict()
|
double |
getRecallAverage()
|
double |
getRecallLenient()
|
double |
getRecallStrict()
|
Set |
getSignificantFeaturesSet()
|
int |
getSpurious()
|
void |
printMissmatches()
|
(package private) void |
sanityCheck()
Performs some basic checks over the internal data structures from the last run. |
void |
setSignificantFeaturesSet(Set significantFeaturesSet)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public HashSet correctAnnotations
public HashSet partiallyCorrectAnnotations
public HashSet missingAnnotations
public HashSet spuriousAnnotations
public static final int CORRECT_TYPE
public static final int PARTIALLY_CORRECT_TYPE
public static final int SPURIOUS_TYPE
public static final int MISSING_TYPE
public static final int CORRECT
public static final int PARTIALLY_CORRECT
public static final int WRONG
private Set significantFeaturesSet
protected int correctMatches
protected int partiallyCorrectMatches
protected int missing
protected int spurious
protected List keyList
protected List responseList
protected List keyChoices
protected List responseChoices
protected List possibleChoices
protected List finalChoices
Constructor Detail |
public AnnotationDiffer()
Method Detail |
public List calculateDiff(Collection key, Collection response)
key
- response
-
AnnotationDiffer.Pairing
objects representing the pairing set
that results in the best score.public double getPrecisionStrict()
public double getRecallStrict()
public double getPrecisionLenient()
public double getPrecisionAverage()
public double getRecallLenient()
public double getRecallAverage()
public double getFMeasureStrict(double beta)
public double getFMeasureLenient(double beta)
public double getFMeasureAverage(double beta)
public int getCorrectMatches()
public int getPartiallyCorrectMatches()
public int getMissing()
public int getSpurious()
public int getFalsePositivesStrict()
public int getFalsePositivesLenient()
public void printMissmatches()
void sanityCheck() throws Exception
Exception
protected void addPairing(AnnotationDiffer.PairingImpl pairing, int index, List listOfPairings)
pairing
- the pairing to be addedindex
- the index in the list of pairingslistOfPairings
- the list of AnnotationDiffer.Pairing
s where the
pairing should be addedpublic Set getSignificantFeaturesSet()
public void setSignificantFeaturesSet(Set significantFeaturesSet)
public Set getAnnotationsOfType(int type)
type
-
Set
of AnnotationDiffer.Pairing
s.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |