'Save the Vocab, StringStore and pipeline to a directory.
Arguments:
path (string or pathlib path): Path to save the model.'

def save_to_directory(self, path):

    configs = {u'pos': (self.tagger.cfg if self.tagger else {}), u'deps': (self.parser.cfg if self.parser else {}), u'ner': (self.entity.cfg if self.entity else {})}
    path = util.ensure_path(path)
    if (not path.exists()):
        path.mkdir()
    self.setup_directory(path, **configs)
    strings_loc = ((path / u'vocab') / u'strings.json')
    with strings_loc.open(u'w', encoding=u'utf8') as file_:
        self.vocab.strings.dump(file_)
    self.vocab.dump(((path / u'vocab') / u'lexemes.bin'))
    if self.tagger:
        self.tagger.model.dump(str(((path / u'pos') / u'model')))
    if self.parser:
        self.parser.model.dump(str(((path / u'deps') / u'model')))
    if self.entity:
        self.entity.model.dump(str(((path / u'ner') / u'model')))
