Other

Scorer

class
Compute evaluation scores

The Scorer computes and stores evaluation scores. It’s typically created by Language.evaluate.

Scorer.__init__ method

Create a new Scorer.

NameTypeDescription
eval_punctboolEvaluate the dependency attachments to and from punctuation.

Scorer.score method

Update the evaluation scores from a single Doc / GoldParse pair.

NameTypeDescription
docDocThe predicted annotations.
goldGoldParseThe correct annotations.
verboseboolPrint debugging information.
punct_labelstupleDependency labels for punctuation. Used to evaluate dependency attachments to punctuation if eval_punct is True.

Properties

NameTypeDescription
token_accfloatTokenization accuracy.
tags_accfloatPart-of-speech tag accuracy (fine grained tags, i.e. Token.tag).
uasfloatUnlabelled dependency score.
lasfloatLabelled dependency score.
ents_pfloatNamed entity accuracy (precision).
ents_rfloatNamed entity accuracy (recall).
ents_ffloatNamed entity accuracy (F-score).
scoresdictAll scores with keys uas, las, ents_p, ents_r, ents_f, tags_acc and token_acc.