(self, docs: Iterable[Doc])
return activations
Apply the pipeline's model to a batch of docs, without modifying them.
        Returns the extracted features as the FullTransformerBatch dataclass.

        docs (Iterable[Doc]): The documents to predict.
        RETURNS (FullTransformerBatch): The extracted features.

        DOCS: https://spacy.io/api/transformer#predict
Apply the pipeline's model to a batch of docs, without modifying them.
        Returns the extracted features as the FullTransformerBatch dataclass.
Apply the pipeline s model to a batch of docs without modifying them . Returns the extracted features as the FullTransformerBatch dataclass .
def predict(self, docs: Iterable[Doc]) -> FullTransformerBatch:
        """Apply the pipeline's model to a batch of docs, without modifying them.
        Returns the extracted features as the FullTransformerBatch dataclass.

        docs (Iterable[Doc]): The documents to predict.
        RETURNS (FullTransformerBatch): The extracted features.

        DOCS: https://spacy.io/api/transformer#predict
        """
        if not any(len(doc) for doc in docs):
            # Handle cases where there are no tokens in any docs.
            activations = FullTransformerBatch.empty(len(docs))
        else:
            activations = self.model.predict(docs)
        batch_id = TransformerListener.get_batch_id(docs)
        for listener in self.listeners:
            listener.receive(batch_id, activations.doc_data, None)
        return activations
def predict ( self , docs : Iterable [ Doc ] ) -> FullTransformerBatch : if not any ( len ( doc ) for doc in docs ) : # Handle cases where there are no tokens in any docs. activations = FullTransformerBatch . empty ( len ( docs ) ) else : activations = self . model . predict ( docs ) batch_id = TransformerListener . get_batch_id ( docs ) for listener in self . listeners : listener . receive ( batch_id , activations . doc_data , None ) return activations