mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 21:54:54 +03:00
Undo changes to PRFScorer
This commit is contained in:
parent
08c0c4140c
commit
67596fc58a
|
@ -26,7 +26,7 @@ class PRFScore:
|
||||||
*,
|
*,
|
||||||
tp: int = 0,
|
tp: int = 0,
|
||||||
fp: int = 0,
|
fp: int = 0,
|
||||||
fn: int = 0
|
fn: int = 0,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.tp = tp
|
self.tp = tp
|
||||||
self.fp = fp
|
self.fp = fp
|
||||||
|
@ -43,7 +43,7 @@ class PRFScore:
|
||||||
|
|
||||||
def __add__(self, other):
|
def __add__(self, other):
|
||||||
return PRFScore(
|
return PRFScore(
|
||||||
tp=self.tp + other.tp, fp=self.fp + other.fp, fn=self.fn + other.fn,
|
tp=self.tp + other.tp, fp=self.fp + other.fp, fn=self.fn + other.fn
|
||||||
)
|
)
|
||||||
|
|
||||||
def score_set(self, cand: set, gold: set) -> None:
|
def score_set(self, cand: set, gold: set) -> None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user