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.
|
__init__(self,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
score(self,
correct,
guessed)
Given a correctly chunked sentence, score another chunked version of
the same sentence. |
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
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
|