MCPcopy
hub / github.com/explosion/spaCy / _stream_docbin

Function _stream_docbin

spacy/cli/apply.py:37–43  ·  view source on GitHub ↗

Stream Doc objects from DocBin.

(path: Path, vocab: Vocab)

Source from the content-addressed store, hash-verified

35
36
37def _stream_docbin(path: Path, vocab: Vocab) -> Iterable[Doc]:
38 """
39 Stream Doc objects from DocBin.
40 """
41 docbin = DocBin().from_disk(path)
42 for doc in docbin.get_docs(vocab):
43 yield doc
44
45
46def _stream_jsonl(path: Path, field: str) -> Iterable[str]:

Callers 1

applyFunction · 0.85

Calls 3

DocBinClass · 0.85
get_docsMethod · 0.80
from_diskMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…