diff --git a/spacy/language.py b/spacy/language.py index 9ce90fdef..854b0ebeb 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -242,6 +242,15 @@ class Language(object): self.save_to_directory(path) 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: raise ValueError("The argument 'data_dir' has been renamed to 'path'") path = util.ensure_path(overrides.get('path', True)) diff --git a/website/docs/api/language.jade b/website/docs/api/language.jade index e221b9142..d7090c870 100644 --- a/website/docs/api/language.jade +++ b/website/docs/api/language.jade @@ -55,14 +55,14 @@ p Create or load the pipeline. +table(["Name", "Type", "Description"]) +row - +cell #[code **kwrags] + +cell #[code **overrides] +cell - +cell Keyword arguments indicating which defaults to override. +footrow +cell return +cell #[code Language] - +cell #[code self] + +cell The newly constructed object. +h(2, "call") Language.__call__ +tag method