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 Tokens, 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 Tokens 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
Tokens. |
protected edu.illinois.cs.cogcomp.lbjava.classify.Classifier |
labeler
A BIO classifier that produces the true labels of the
Tokens. |
protected edu.illinois.cs.cogcomp.lbjava.parse.Parser |
parser
A parser that produces
Tokens. |
| 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
Tokens.protected edu.illinois.cs.cogcomp.lbjava.classify.Classifier labeler
Tokens.protected edu.illinois.cs.cogcomp.lbjava.parse.Parser parser
Tokens.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.