mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Update docstrings
This commit is contained in:
parent
e2299dc389
commit
8e83f8e2fa
|
@ -188,6 +188,9 @@ class Language(object):
|
|||
|
||||
@classmethod
|
||||
def setup_directory(cls, path, **configs):
|
||||
"""
|
||||
Initialise a model directory.
|
||||
"""
|
||||
for name, config in configs.items():
|
||||
directory = path / name
|
||||
if directory.exists():
|
||||
|
@ -295,7 +298,7 @@ class Language(object):
|
|||
and can contain arbtrary whitespace. Alignment into the original string
|
||||
is preserved.
|
||||
|
||||
Args:
|
||||
Argsuments:
|
||||
text (unicode): The text to be processed.
|
||||
|
||||
Returns:
|
||||
|
@ -344,6 +347,12 @@ class Language(object):
|
|||
yield doc
|
||||
|
||||
def save_to_directory(self, path):
|
||||
"""
|
||||
Save the Vocab, StringStore and pipeline to a directory.
|
||||
|
||||
Arguments:
|
||||
path (string or pathlib path): Path to save the model.
|
||||
"""
|
||||
configs = {
|
||||
'pos': self.tagger.cfg if self.tagger else {},
|
||||
'deps': self.parser.cfg if self.parser else {},
|
||||
|
|
Loading…
Reference in New Issue
Block a user