mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
logical bug in configuration check
This commit is contained in:
parent
5c927effde
commit
afc3ce1c7e
|
@ -368,7 +368,7 @@ class SpanCategorizer(TrainablePipe):
|
||||||
self.add_negative_label = add_negative_label
|
self.add_negative_label = add_negative_label
|
||||||
if allow_overlap is None:
|
if allow_overlap is None:
|
||||||
self.cfg["allow_overlap"] = True
|
self.cfg["allow_overlap"] = True
|
||||||
elif not allow_overlap and cast(int, max_positive) > 1:
|
elif not allow_overlap and max_positive is not None and max_positive > 1:
|
||||||
self.cfg["allow_overlap"] = True
|
self.cfg["allow_overlap"] = True
|
||||||
msg.warn(
|
msg.warn(
|
||||||
"'allow_overlap' can only be False when max_positive=1, "
|
"'allow_overlap' can only be False when max_positive=1, "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user