mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Start scoring tokens
This commit is contained in:
parent
4944d3ba20
commit
0c4b5a2bb0
|
@ -46,7 +46,7 @@ class Scorer(object):
|
|||
|
||||
@property
|
||||
def token_acc(self):
|
||||
return self.tokens.fscore * 100
|
||||
return self.tokens.precision * 100
|
||||
|
||||
@property
|
||||
def uas(self):
|
||||
|
@ -85,8 +85,10 @@ class Scorer(object):
|
|||
continue
|
||||
gold_i = gold.cand_to_gold[token.i]
|
||||
if gold_i is None:
|
||||
self.tags.fp += 1
|
||||
if token.dep_.lower() not in ('p', 'punct'):
|
||||
self.tokens.fp += 1
|
||||
else:
|
||||
self.tokens.tp += 1
|
||||
cand_tags.add((gold_i, token.tag_))
|
||||
if token.dep_.lower() not in ('p', 'punct') and token.orth_.strip():
|
||||
gold_head = gold.cand_to_gold[token.head.i]
|
||||
|
|
Loading…
Reference in New Issue
Block a user