<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “www.w3.org/TR/html4/loose.dtd”> <!–NewPage–> <HTML> <HEAD> <!– Generated by javadoc (build 1.6.0_65) on Tue Feb 18 19:45:41 CST 2014 –> <META http-equiv=“Content-Type” content=“text/html; charset=UTF-8”> <TITLE> AnnotationComparer </TITLE>
<META NAME=“date” CONTENT=“2014-02-18”>
<LINK REL =“stylesheet” TYPE=“text/css” HREF=“../../stylesheet.css” TITLE=“Style”>
<SCRIPT type=“text/javascript”> function windowTitle() {
if (location.href.indexOf('is-external=true') == -1) { parent.document.title="AnnotationComparer"; }
} </SCRIPT> <NOSCRIPT> </NOSCRIPT>
</HEAD>
<BODY BGCOLOR=“white” onload=“windowTitle();”> <HR>
<!– ========= START OF TOP NAVBAR ======= –> <A NAME=“navbar_top”><!– –></A> <A HREF=“#skip-navbar_top” title=“Skip navigation links”></A> <TABLE BORDER=“0” WIDTH=“100%” CELLPADDING=“1” CELLSPACING=“0” SUMMARY=“”> <TR> <TD COLSPAN=2 BGCOLOR=“#EEEEFF” CLASS=“NavBarCell1”> <A NAME=“navbar_top_firstrow”><!– –></A> <TABLE BORDER=“0” CELLPADDING=“0” CELLSPACING=“3” SUMMARY=“”>
<TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AnnotationComparer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR>
</TABLE> </TD> <TD ALIGN=“right” VALIGN=“top” ROWSPAN=3> </TD> </TR>
<TR> <TD BGCOLOR=“white” CLASS=“NavBarCell2”><FONT SIZE=“-2”> <A HREF=“../../lingscope/algorithms/AbnerTokenizer.html” title=“class in lingscope.algorithms”>PREV CLASS</A> <A HREF=“../../lingscope/algorithms/Annotator.html” title=“class in lingscope.algorithms”>NEXT CLASS</A></FONT></TD> <TD BGCOLOR=“white” CLASS=“NavBarCell2”><FONT SIZE=“-2”>
<A HREF="../../index.html?lingscope/algorithms/AnnotationComparer.html" target="_top"><B>FRAMES</B></A>
<A HREF=“AnnotationComparer.html” target=“_top”>NO FRAMES</A> <SCRIPT type=“text/javascript”>
<!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //-->
</SCRIPT> <NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD> </TR> <TR> <TD VALIGN=“top” CLASS=“NavBarCell3”><FONT SIZE=“-2”>
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN=“top” CLASS=“NavBarCell3”><FONT SIZE=“-2”> DETAIL: FIELD | <A HREF=“#constructor_detail”>CONSTR</A> | <A HREF=“#method_detail”>METHOD</A></FONT></TD> </TR> </TABLE> <A NAME=“skip-navbar_top”></A> <!– ========= END OF TOP NAVBAR ========= –>
<HR> <!– ======== START OF CLASS DATA ======== –> <H2> <FONT SIZE=“-1”> lingscope.algorithms</FONT> <BR> Class AnnotationComparer</H2> <PRE> java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>lingscope.algorithms.AnnotationComparer</B>
</PRE> <HR> <DL> <DT><PRE>public class AnnotationComparer<DT>extends java.lang.Object</DL> </PRE>
<P> Compares two annotations or two annotation files <P>
<P> <HR>
<P>
<!– ======== CONSTRUCTOR SUMMARY ======== –>
<A NAME=“constructor_summary”><!– –></A> <TABLE BORDER=“1” WIDTH=“100%” CELLPADDING=“3” CELLSPACING=“0” SUMMARY=“”> <TR BGCOLOR=“#CCCCFF” CLASS=“TableHeadingColor”> <TH ALIGN=“left” COLSPAN=“2”><FONT SIZE=“+2”> Constructor Summary</FONT></TH> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#AnnotationComparer(int)">AnnotationComparer</A>
(int numFolds)
<BR> </TD> </TR> </TABLE> <!– ========== METHOD SUMMARY =========== –>
<A NAME=“method_summary”><!– –></A> <TABLE BORDER=“1” WIDTH=“100%” CELLPADDING=“3” CELLSPACING=“0” SUMMARY=“”> <TR BGCOLOR=“#CCCCFF” CLASS=“TableHeadingColor”> <TH ALIGN=“left” COLSPAN=“2”><FONT SIZE=“+2”> Method Summary</FONT></TH> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> void
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#compareAnnotationFiles(java.lang.String, java.lang.String)”>compareAnnotationFiles</A>(java.lang.String goldFile,
java.lang.String testFile)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> void
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#compareAnnotations(lingscope.structures.AnnotatedSentence, lingscope.structures.AnnotatedSentence)”>compareAnnotations</A>(<A HREF=“../../lingscope/structures/AnnotatedSentence.html” title=“class in lingscope.structures”>AnnotatedSentence</A> goldSentence,
<A HREF="../../lingscope/structures/AnnotatedSentence.html" title="class in lingscope.structures">AnnotatedSentence</A> testSentence)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double[]
</FONT></TD> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#getAccuracies()">getAccuracies</A>
()
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#getAccuracy(double, double, double, double)”>getAccuracy</A>(double tp,
double fp, double fn, double tn)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#getFScore(double, double)”>getFScore</A>(double recall,
double precision)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double[]
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#getFScores(double[], double[])”>getFScores</A>(double recalls,
double[] precisions)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double[]
</FONT></TD> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#getPerfectAccuracies()">getPerfectAccuracies</A>
()
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#getPerfectAccuracy(double, double)”>getPerfectAccuracy</A>(double trues,
double total)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#getPrecision(double, double)”>getPrecision</A>(double tp,
double fp)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double[]
</FONT></TD> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#getPrecisions()">getPrecisions</A>
()
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double
</FONT></TD> <TD><CODE><A HREF=“../../lingscope/algorithms/AnnotationComparer.html#getRecall(double, double)”>getRecall</A>(double tp,
double fn)</CODE>
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> double[]
</FONT></TD> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#getRecalls()">getRecalls</A>
()
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> void
</FONT></TD> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#printStats()">printStats</A>
()
<BR> </TD> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD ALIGN=“right” VALIGN=“top” WIDTH=“1%”><FONT SIZE=“-1”> void
</FONT></TD> <TD><A HREF="../../lingscope/algorithms/AnnotationComparer.html#reset()">reset</A>
()
<BR> Resets the values for the comparer</TD> </TR> </TABLE> <A NAME=“methods_inherited_from_class_java.lang.Object”><!– –></A> <TABLE BORDER=“1” WIDTH=“100%” CELLPADDING=“3” CELLSPACING=“0” SUMMARY=“”> <TR BGCOLOR=“#EEEEFF” CLASS=“TableSubHeadingColor”> <TH ALIGN=“left”>Methods inherited from class java.lang.Object</TH> </TR> <TR BGCOLOR=“white” CLASS=“TableRowColor”> <TD>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</TD> </TR> </TABLE> <P>
<!– ========= CONSTRUCTOR DETAIL ======== –>
<A NAME=“constructor_detail”><!– –></A> <TABLE BORDER=“1” WIDTH=“100%” CELLPADDING=“3” CELLSPACING=“0” SUMMARY=“”> <TR BGCOLOR=“#CCCCFF” CLASS=“TableHeadingColor”> <TH ALIGN=“left” COLSPAN=“1”><FONT SIZE=“+2”> Constructor Detail</FONT></TH> </TR> </TABLE>
<A NAME=“AnnotationComparer(int)”><!– –></A><H3> AnnotationComparer</H3> <PRE> public AnnotationComparer(int numFolds)</PRE> <DL> </DL>
<!– ============ METHOD DETAIL ========== –>
<A NAME=“method_detail”><!– –></A> <TABLE BORDER=“1” WIDTH=“100%” CELLPADDING=“3” CELLSPACING=“0” SUMMARY=“”> <TR BGCOLOR=“#CCCCFF” CLASS=“TableHeadingColor”> <TH ALIGN=“left” COLSPAN=“1”><FONT SIZE=“+2”> Method Detail</FONT></TH> </TR> </TABLE>
<A NAME=“reset()”><!– –></A><H3> reset</H3> <PRE> public final void reset()</PRE> <DL> <DD>Resets the values for the comparer <P> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“compareAnnotationFiles(java.lang.String, java.lang.String)”><!– –></A><H3> compareAnnotationFiles</H3> <PRE> public void compareAnnotationFiles(java.lang.String goldFile,
java.lang.String testFile)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“compareAnnotations(lingscope.structures.AnnotatedSentence, lingscope.structures.AnnotatedSentence)”><!– –></A><H3> compareAnnotations</H3> <PRE> public void compareAnnotations(<A HREF=“../../lingscope/structures/AnnotatedSentence.html” title=“class in lingscope.structures”>AnnotatedSentence</A> goldSentence,
<A HREF="../../lingscope/structures/AnnotatedSentence.html" title="class in lingscope.structures">AnnotatedSentence</A> testSentence)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“printStats()”><!– –></A><H3> printStats</H3> <PRE> public void printStats()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getRecalls()”><!– –></A><H3> getRecalls</H3> <PRE> public double[] getRecalls()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getPrecisions()”><!– –></A><H3> getPrecisions</H3> <PRE> public double[] getPrecisions()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getFScores(double[], double[])”><!– –></A><H3> getFScores</H3> <PRE> public double[] getFScores(double[] recalls,
double[] precisions)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getAccuracies()”><!– –></A><H3> getAccuracies</H3> <PRE> public double[] getAccuracies()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getPerfectAccuracies()”><!– –></A><H3> getPerfectAccuracies</H3> <PRE> public double[] getPerfectAccuracies()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getPerfectAccuracy(double, double)”><!– –></A><H3> getPerfectAccuracy</H3> <PRE> public double getPerfectAccuracy(double trues,
double total)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getAccuracy(double, double, double, double)”><!– –></A><H3> getAccuracy</H3> <PRE> public double getAccuracy(double tp,
double fp, double fn, double tn)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getRecall(double, double)”><!– –></A><H3> getRecall</H3> <PRE> public double getRecall(double tp,
double fn)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getPrecision(double, double)”><!– –></A><H3> getPrecision</H3> <PRE> public double getPrecision(double tp,
double fp)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <HR>
<A NAME=“getFScore(double, double)”><!– –></A><H3> getFScore</H3> <PRE> public double getFScore(double recall,
double precision)</PRE>
<DL> <DD><DL> </DL> </DD> </DL> <!– ========= END OF CLASS DATA ========= –> <HR>
<!– ======= START OF BOTTOM NAVBAR ====== –> <A NAME=“navbar_bottom”><!– –></A> <A HREF=“#skip-navbar_bottom” title=“Skip navigation links”></A> <TABLE BORDER=“0” WIDTH=“100%” CELLPADDING=“1” CELLSPACING=“0” SUMMARY=“”> <TR> <TD COLSPAN=2 BGCOLOR=“#EEEEFF” CLASS=“NavBarCell1”> <A NAME=“navbar_bottom_firstrow”><!– –></A> <TABLE BORDER=“0” CELLPADDING=“0” CELLSPACING=“3” SUMMARY=“”>
<TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AnnotationComparer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR>
</TABLE> </TD> <TD ALIGN=“right” VALIGN=“top” ROWSPAN=3> </TD> </TR>
<TR> <TD BGCOLOR=“white” CLASS=“NavBarCell2”><FONT SIZE=“-2”> <A HREF=“../../lingscope/algorithms/AbnerTokenizer.html” title=“class in lingscope.algorithms”>PREV CLASS</A> <A HREF=“../../lingscope/algorithms/Annotator.html” title=“class in lingscope.algorithms”>NEXT CLASS</A></FONT></TD> <TD BGCOLOR=“white” CLASS=“NavBarCell2”><FONT SIZE=“-2”>
<A HREF="../../index.html?lingscope/algorithms/AnnotationComparer.html" target="_top"><B>FRAMES</B></A>
<A HREF=“AnnotationComparer.html” target=“_top”>NO FRAMES</A> <SCRIPT type=“text/javascript”>
<!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //-->
</SCRIPT> <NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD> </TR> <TR> <TD VALIGN=“top” CLASS=“NavBarCell3”><FONT SIZE=“-2”>
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN=“top” CLASS=“NavBarCell3”><FONT SIZE=“-2”> DETAIL: FIELD | <A HREF=“#constructor_detail”>CONSTR</A> | <A HREF=“#method_detail”>METHOD</A></FONT></TD> </TR> </TABLE> <A NAME=“skip-navbar_bottom”></A> <!– ======== END OF BOTTOM NAVBAR ======= –>
<HR>
</BODY> </HTML>