Update Language docs and docstrings

This commit is contained in:
ines 2017-04-17 01:52:13 +02:00
parent f62b740961
commit ddd5194088
2 changed files with 11 additions and 2 deletions

View File

@ -242,6 +242,15 @@ class Language(object):
self.save_to_directory(path) self.save_to_directory(path)
def __init__(self, **overrides): def __init__(self, **overrides):
"""
Create or load the pipeline.
Arguments:
**overrides: Keyword arguments indicating which defaults to override.
Returns:
Language: The newly constructed object.
"""
if 'data_dir' in overrides and 'path' not in overrides: if 'data_dir' in overrides and 'path' not in overrides:
raise ValueError("The argument 'data_dir' has been renamed to 'path'") raise ValueError("The argument 'data_dir' has been renamed to 'path'")
path = util.ensure_path(overrides.get('path', True)) path = util.ensure_path(overrides.get('path', True))

View File

@ -55,14 +55,14 @@ p Create or load the pipeline.
+table(["Name", "Type", "Description"]) +table(["Name", "Type", "Description"])
+row +row
+cell #[code **kwrags] +cell #[code **overrides]
+cell - +cell -
+cell Keyword arguments indicating which defaults to override. +cell Keyword arguments indicating which defaults to override.
+footrow +footrow
+cell return +cell return
+cell #[code Language] +cell #[code Language]
+cell #[code self] +cell The newly constructed object.
+h(2, "call") Language.__call__ +h(2, "call") Language.__call__
+tag method +tag method