mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-28 07:54:56 +03:00
Adjust type check of TextCategorizer to exclude subclasses.
This commit is contained in:
parent
5bacad8f67
commit
5de02dc903
|
@ -112,7 +112,7 @@ def find_threshold(
|
|||
if not hasattr(pipe, "scorer"):
|
||||
raise AttributeError(Errors.E1045)
|
||||
|
||||
if isinstance(pipe, TextCategorizer):
|
||||
if type(pipe) == TextCategorizer:
|
||||
wasabi.msg.warn(
|
||||
"The `textcat` component doesn't use a threshold as it's not applicable to the concept of "
|
||||
"exclusive classes. All thresholds will yield the same results."
|
||||
|
|
Loading…
Reference in New Issue
Block a user