(self, stream: Iterable[Doc], *, batch_size: int = 128)
Apply the pipe to a stream of documents. This usually happens under
        the hood when the nlp object is called on a text and all components are
        applied to the Doc.

        stream (Iterable[Doc]): A stream of documents.
        batch_size (int): The number of documents to buffer.
        YIELDS (Doc): Processed documents in order.

        DOCS: https://spacy.io/api/transformer#pipe
Apply the pipe to a stream of documents. This usually happens under
        the hood when the nlp object is called on a text and all components are
        applied to the Doc.
Apply the pipe to a stream of documents . This usually happens under the hood when the nlp object is called on a text and all components are applied to the Doc .
def pipe(self, stream: Iterable[Doc], *, batch_size: int = 128) -> Iterator[Doc]:
        """Apply the pipe to a stream of documents. This usually happens under
        the hood when the nlp object is called on a text and all components are
        applied to the Doc.

        stream (Iterable[Doc]): A stream of documents.
        batch_size (int): The number of documents to buffer.
        YIELDS (Doc): Processed documents in order.

        DOCS: https://spacy.io/api/transformer#pipe
        """
        install_extensions()
        for outer_batch in minibatch(stream, batch_size):
            outer_batch = list(outer_batch)
            for indices in batch_by_length(outer_batch, self.cfg["max_batch_items"]):
                subbatch = [outer_batch[i] for i in indices]
                self.set_annotations(subbatch, self.predict(subbatch))
            yield from outer_batch
def pipe ( self , stream : Iterable [ Doc ] , * , batch_size : int = 128 ) -> Iterator [ Doc ] : install_extensions ( ) for outer_batch in minibatch ( stream , batch_size ) : outer_batch = list ( outer_batch ) for indices in batch_by_length ( outer_batch , self . cfg [ "max_batch_items" ] ) : subbatch = [ outer_batch [ i ] for i in indices ] self . set_annotations ( subbatch , self . predict ( subbatch ) ) yield from outer_batch