|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.nlp.seg.BIOTester
public class BIOTester
This class may be used to produce a detailed report of the segment by
segment performance of a given classifier on given labeled testing
data. Segment by segment performance is computed by using a specified
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 LBJ2.nlp.seg.BIOTester <classifier> <labeler>
<parser> <test file>
TestDiscrete class.
| Field Summary | |
|---|---|
protected Classifier |
classifier
A BIO classifier that classifies Tokens. |
protected Classifier |
labeler
A BIO classifier that produces the true labels of the Tokens. |
protected Parser |
parser
A parser that produces Tokens. |
| Constructor Summary | |
|---|---|
BIOTester(Classifier c,
Classifier l,
Parser p)
Initializing constructor. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
The command line program simply instantiates an object of this class and calls its test() method. |
TestDiscrete |
test()
This method runs the tester, packaging the results in a TestDiscrete object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Classifier classifier
Tokens.
protected Classifier labeler
Tokens.
protected Parser parser
Tokens.
| Constructor Detail |
|---|
public BIOTester(Classifier c,
Classifier l,
Parser p)
c - The value for classifier.l - The value for labeler.p - The value for parser.| Method Detail |
|---|
public TestDiscrete test()
TestDiscrete object.
public static void main(java.lang.String[] args)
test() method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||