This commit is contained in:
Raphael Mitsch 2023-02-23 12:20:14 +01:00
parent 705c4b976e
commit 449883db0f

View File

@ -117,12 +117,14 @@ def test_serialize_subclassed_kb():
self.custom_field = custom_field
@registry.misc("spacy.CustomEmptyKB.v1")
def empty_custom_kb(custom_field: int) -> Callable[[Vocab, int], SubInMemoryLookupKB]:
def empty_custom_kb(
custom_field: int,
) -> Callable[[Vocab, int], SubInMemoryLookupKB]:
def empty_kb_factory(vocab: Vocab, entity_vector_length: int):
return SubInMemoryLookupKB(
vocab=vocab,
entity_vector_length=entity_vector_length,
custom_field=custom_field
custom_field=custom_field,
)
return empty_kb_factory