(
        self, docs: Iterable[Doc], predictions: FullTransformerBatch
    )
Assign the extracted features to the Doc objects. By default, the
        TransformerData object is written to the doc._.trf_data attribute. Your
        set_extra_annotations callback is then called, if provided.

        docs (Iterable[Doc]): The documents to modify.
        predictions: (FullTransformerBatch): A batch of activations.

        DOCS: https://spacy.io/api/pipe#set_annotations
Assign the extracted features to the Doc objects. By default, the
        TransformerData object is written to the doc._.trf_data attribute. Your
        set_extra_annotations callback is then called, if provided.
Assign the extracted features to the Doc objects . By default the TransformerData object is written to the doc . _ . trf_data attribute . Your set_extra_annotations callback is then called if provided .
def set_annotations(
        self, docs: Iterable[Doc], predictions: FullTransformerBatch
    ) -> None:
        """Assign the extracted features to the Doc objects. By default, the
        TransformerData object is written to the doc._.trf_data attribute. Your
        set_extra_annotations callback is then called, if provided.

        docs (Iterable[Doc]): The documents to modify.
        predictions: (FullTransformerBatch): A batch of activations.

        DOCS: https://spacy.io/api/pipe#set_annotations
        """
        doc_data = list(predictions.doc_data)
        for doc, data in zip(docs, doc_data):
            doc._.trf_data = data
        self.set_extra_annotations(docs, predictions)
def set_annotations ( self , docs : Iterable [ Doc ] , predictions : FullTransformerBatch ) -> None : doc_data = list ( predictions . doc_data ) for doc , data in zip ( docs , doc_data ) : doc . _ . trf_data = data self . set_extra_annotations ( docs , predictions )