|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.text.SpanDifference
public class SpanDifference
Compares two sets of spans.
Nested Class Summary | |
---|---|
static class |
SpanDifference.Invoker
|
static class |
SpanDifference.Looper
A Span.Looper which also passes out two additional types of information about each returned span s: if s is a FALSE_POS, FALSE_NEG, or TRUE_POS, relative to the original spans. |
Field Summary | |
---|---|
static int |
FALSE_NEG
Indicates a false negative span. |
static int |
FALSE_POS
Indicates a false positive span. |
static org.apache.log4j.Logger |
log
|
static int |
MAX_STATUS
Max value of an status indicator, eg FALSE_POS, FALSE_NEG, etc |
static int |
TRUE_POS
Indicates a true positive negative span. |
static int |
UNKNOWN_POS
Indicates something inside a guess span which may or may not be inside a truth span. |
Constructor Summary | |
---|---|
SpanDifference(java.util.Iterator<Span> guess,
java.util.Iterator<Span> truth)
Create machinery to analyze the differences between the two sets of spans. |
|
SpanDifference(java.util.Iterator<Span> guess,
java.util.Iterator<Span> truth,
java.util.Iterator<Span> closures)
Create machinery to analyze the differences between the two sets of spans. |
|
SpanDifference(SpanDifference[] spanDifferences)
Create an aggregation of the results in several SpanDifference's. |
Method Summary | |
---|---|
SpanDifference.Looper |
differenceIterator()
|
static void |
main(java.lang.String[] args)
|
double |
spanPrecision()
Return the percentage of 'guess' spans that are also 'truth' spans, ignoring non-truth spans that are not inside closure spans. |
double |
spanRecall()
Return the percentage of 'truth' spans that are also 'guess' spans |
double |
tokenPrecision()
Return the percentage of tokens in 'guess' spans that are true positives (ignoring tokens that are UNKNOWN_POS). |
double |
tokenRecall()
Return the percentage of tokens in true positive spans that are in guess spans (ignoring tokens that are UNKNOWN_POS). |
java.lang.String |
toString()
|
java.lang.String |
toSummary()
Return a string containing all the summary statistics printed moderately neatly on two lines. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static org.apache.log4j.Logger log
public static final int MAX_STATUS
public static final int FALSE_POS
public static final int FALSE_NEG
public static final int TRUE_POS
public static final int UNKNOWN_POS
Constructor Detail |
---|
public SpanDifference(SpanDifference[] spanDifferences)
public SpanDifference(java.util.Iterator<Span> guess, java.util.Iterator<Span> truth)
public SpanDifference(java.util.Iterator<Span> guess, java.util.Iterator<Span> truth, java.util.Iterator<Span> closures)
Method Detail |
---|
public SpanDifference.Looper differenceIterator()
public double tokenPrecision()
public double tokenRecall()
public double spanPrecision()
public double spanRecall()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toSummary()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |