mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-25 11:23:40 +03:00
Add kwargs to KnowledgeBase.generate_from_disk().
This commit is contained in:
parent
6a30df3039
commit
ff7fc0850d
|
@ -111,7 +111,7 @@ cdef class KnowledgeBase:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def generate_from_disk(
|
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:
|
) -> _KBType:
|
||||||
"""
|
"""
|
||||||
Factory method for generating KnowledgeBase subclass instance from file.
|
Factory method for generating KnowledgeBase subclass instance from file.
|
||||||
|
|
|
@ -48,7 +48,7 @@ cdef class InMemoryLookupKB(KnowledgeBase):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def generate_from_disk(
|
def generate_from_disk(
|
||||||
cls, path: Union[str, Path], exclude: Iterable[str] = SimpleFrozenList()
|
cls, path: Union[str, Path], exclude: Iterable[str] = SimpleFrozenList(), **kwargs
|
||||||
) -> "InMemoryLookupKB":
|
) -> "InMemoryLookupKB":
|
||||||
kb = InMemoryLookupKB(vocab=Vocab(strings=["."]), entity_vector_length=1)
|
kb = InMemoryLookupKB(vocab=Vocab(strings=["."]), entity_vector_length=1)
|
||||||
kb.from_disk(path)
|
kb.from_disk(path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user