A utility class for scoring chunk parsers. ChunkScore
can evaluate a chunk parser's output, based on a number of statistics
(precision, recall, f-measure, misssed chunks, incorrect chunks). It can
also combine the scores from the parsing of multiple texts; this makes it
signifigantly easier to evaluate a chunk parser that operates one
sentence at a time.
|
|
|
|
|
|
|
|
score(self,
correct,
guessed)
Given a correctly chunked sentence, score another chunked version of
the same sentence. |
source code
|
|
|
|
accuracy(self)
Returns:
The overall tag-based accuracy for all text that have been scored by
this ChunkScore, using the IOB (conll2000) tag encoding. |
source code
|
|
float
|
precision(self)
Returns:
the overall precision for all texts that have been scored by this
ChunkScore. |
source code
|
|
float
|
recall(self)
Returns:
the overall recall for all texts that have been scored by this
ChunkScore. |
source code
|
|
float
|
f_measure(self,
alpha=0.5)
Returns:
the overall F measure for all texts that have been scored by this
ChunkScore. |
source code
|
|
list of chunks
|
missed(self)
Returns:
the chunks which were included in the correct chunk structures, but
not in the guessed chunk structures, listed in input order. |
source code
|
|
list of chunks
|
incorrect(self)
Returns:
the chunks which were included in the guessed chunk structures, but
not in the correct chunk structures, listed in input order. |
source code
|
|
list of chunks
|
correct(self)
Returns:
the chunks which were included in the correct chunk structures,
listed in input order. |
source code
|
|
list of chunks
|
guessed(self)
Returns:
the chunks which were included in the guessed chunk structures,
listed in input order. |
source code
|
|
|
|
|
String
|
|
String
|
|