public class BIOTester extends Object
Token
classifier to induce the predicted segments, and then
computing precision, recall, and F1 measures on those segments.
A predicted segment is judged as different than a labeled segment if the
two segments start or end at different Token
s, or if they have
different types.
It is assumed that both of the specified Token
classifiers
(one giving labels and the other giving predictions) produce discrete
predicitions of the form B-type
,
I-type
, and O
to represent the beginning
of a segment of type type, a token inside a segment of type
type, and a token outside of any segment respectively.
It is also assumed that the specified Parser
produces Token
s linked to each other via the previous
and next
fields inherited from
LinkedChild
. In order to invoke this class as a
program on the command line, it must also be the case that the parser
implements a constructor with a single String
argument.
java edu.illinois.cs.cogcomp.lbjava.edu.illinois.cs.cogcomp.lbjava.nlp.seg.BIOTester <classifier> <labeler>
<parser> <test file>
TestDiscrete
class.Modifier and Type | Field and Description |
---|---|
protected edu.illinois.cs.cogcomp.lbjava.classify.Classifier |
classifier
A BIO classifier that classifies
Token s. |
protected edu.illinois.cs.cogcomp.lbjava.classify.Classifier |
labeler
A BIO classifier that produces the true labels of the
Token s. |
protected edu.illinois.cs.cogcomp.lbjava.parse.Parser |
parser
A parser that produces
Token s. |
Constructor and Description |
---|
BIOTester(edu.illinois.cs.cogcomp.lbjava.classify.Classifier c,
edu.illinois.cs.cogcomp.lbjava.classify.Classifier l,
edu.illinois.cs.cogcomp.lbjava.parse.Parser p)
Initializing constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
The command line program simply instantiates an object of this class and
calls its
test() method. |
edu.illinois.cs.cogcomp.lbjava.classify.TestDiscrete |
test()
This method runs the tester, packaging the results in a
TestDiscrete object. |
protected edu.illinois.cs.cogcomp.lbjava.classify.Classifier classifier
Token
s.protected edu.illinois.cs.cogcomp.lbjava.classify.Classifier labeler
Token
s.protected edu.illinois.cs.cogcomp.lbjava.parse.Parser parser
Token
s.public BIOTester(edu.illinois.cs.cogcomp.lbjava.classify.Classifier c, edu.illinois.cs.cogcomp.lbjava.classify.Classifier l, edu.illinois.cs.cogcomp.lbjava.parse.Parser p)
c
- The value for classifier
.l
- The value for labeler
.p
- The value for parser
.Copyright © 2017. All rights reserved.