From ff7fc0850d984d1d16b4979c618a2a8d62abc586 Mon Sep 17 00:00:00 2001 From: Raphael Mitsch Date: Mon, 5 Dec 2022 16:35:03 +0100 Subject: [PATCH] Add kwargs to KnowledgeBase.generate_from_disk(). --- spacy/kb/kb.pyx | 2 +- spacy/kb/kb_in_memory.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/kb/kb.pyx b/spacy/kb/kb.pyx index fa537edc9..3a4d3b4be 100644 --- a/spacy/kb/kb.pyx +++ b/spacy/kb/kb.pyx @@ -111,7 +111,7 @@ cdef class KnowledgeBase: @classmethod def generate_from_disk( - cls: Type[_KBType], path: Union[str, Path], exclude: Iterable[str] = SimpleFrozenList() + cls: Type[_KBType], path: Union[str, Path], exclude: Iterable[str] = SimpleFrozenList(), **kwargs ) -> _KBType: """ Factory method for generating KnowledgeBase subclass instance from file. diff --git a/spacy/kb/kb_in_memory.pyx b/spacy/kb/kb_in_memory.pyx index 2b245d76f..ddebc468d 100644 --- a/spacy/kb/kb_in_memory.pyx +++ b/spacy/kb/kb_in_memory.pyx @@ -48,7 +48,7 @@ cdef class InMemoryLookupKB(KnowledgeBase): @classmethod def generate_from_disk( - cls, path: Union[str, Path], exclude: Iterable[str] = SimpleFrozenList() + cls, path: Union[str, Path], exclude: Iterable[str] = SimpleFrozenList(), **kwargs ) -> "InMemoryLookupKB": kb = InMemoryLookupKB(vocab=Vocab(strings=["."]), entity_vector_length=1) kb.from_disk(path)