(
        self, path: Union[str, Path], *, exclude: Iterable[str] = tuple()
    )
Serialize the pipe to disk.

        path (str / Path): Path to a directory.
        exclude (Iterable[str]): String names of serialization fields to exclude.

        DOCS: https://spacy.io/api/transformer#to_disk
Serialize the pipe to disk.
Serialize the pipe to disk .
def to_disk(
        self, path: Union[str, Path], *, exclude: Iterable[str] = tuple()
    ) -> None:
        """Serialize the pipe to disk.

        path (str / Path): Path to a directory.
        exclude (Iterable[str]): String names of serialization fields to exclude.

        DOCS: https://spacy.io/api/transformer#to_disk
        """
        serialize = {}
        serialize["cfg"] = lambda p: srsly.write_json(p, self.cfg)
        serialize["vocab"] = lambda p: self.vocab.to_disk(p)
        serialize["model"] = lambda p: self.model.to_disk(p)
        util.to_disk(path, serialize, exclude)
def to_disk ( self , path : Union [ str , Path ] , * , exclude : Iterable [ str ] = tuple ( ) ) -> None : serialize = { } serialize [ "cfg" ] = lambda p : srsly . write_json ( p , self . cfg ) serialize [ "vocab" ] = lambda p : self . vocab . to_disk ( p ) serialize [ "model" ] = lambda p : self . model . to_disk ( p ) util . to_disk ( path , serialize , exclude )