(self, doc: Doc)
Add one :class:`spacy.tokens.Doc` to the corpus, provided it was processed
        using the :attr:`Corpus.spacy_lang` pipeline.

        Args:
            doc
Add one :class:`spacy.tokens.Doc` to the corpus, provided it was processed
        using the :attr:`Corpus.spacy_lang` pipeline.
Add one : class : spacy . tokens . Doc to the corpus provided it was processed using the : attr : Corpus . spacy_lang pipeline .
def add_doc(self, doc: Doc) -> None:
        """
        Add one :class:`spacy.tokens.Doc` to the corpus, provided it was processed
        using the :attr:`Corpus.spacy_lang` pipeline.

        Args:
            doc
        """
        if not isinstance(doc, Doc):
            raise TypeError(errors.type_invalid_msg("doc", type(doc), Doc))
        if doc.vocab is not self.spacy_lang.vocab:
            raise ValueError(
                f"doc.vocab ({doc.vocab}) must be the same as "
                f"corpus.vocab ({self.spacy_lang.vocab})"
            )
        self._add_valid_doc(doc)
def add_doc ( self , doc : Doc ) -> None : if not isinstance ( doc , Doc ) : raise TypeError ( errors . type_invalid_msg ( "doc" , type ( doc ) , Doc ) ) if doc . vocab is not self . spacy_lang . vocab : raise ValueError ( f"doc.vocab ({doc.vocab}) must be the same as " f"corpus.vocab ({self.spacy_lang.vocab})" ) self . _add_valid_doc ( doc )