mirror of https://github.com/explosion/spaCy.git
Update Language docs and docstrings
This commit is contained in:
parent
f62b740961
commit
ddd5194088
|
@ -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))
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue