mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-22 18:12:00 +03:00
Cherry-pick is_empty() fix. Drop KnowledgeBase.__len()__.
This commit is contained in:
parent
604cec0140
commit
14b22b9d65
|
@ -123,10 +123,10 @@ cdef class KnowledgeBase:
|
|||
Errors.E1044.format(parent="KnowledgeBase", method="generate_from_disk", name=cls.__name__)
|
||||
)
|
||||
|
||||
def __len__(self) -> int:
|
||||
"""Returns number of entities in the KnowledgeBase.
|
||||
RETURNS (int): Number of entities in the KnowledgeBase.
|
||||
def is_empty(self) -> bool:
|
||||
"""Returns whether KnowledgeBase is empty.
|
||||
RETURNS (bool): Whether KnowledgeBase is empty.
|
||||
"""
|
||||
raise NotImplementedError(
|
||||
Errors.E1044.format(parent="KnowledgeBase", method="__len__", name=self.__name__)
|
||||
Errors.E1044.format(parent="KnowledgeBase", method="is_empty", name=self.__name__)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user