* Fix language.py docstring

This commit is contained in:
Matthew Honnibal 2016-04-14 10:36:57 +02:00
parent 04d0209be9
commit 61d20de35d
1 changed files with 12 additions and 13 deletions

View File

@ -147,24 +147,23 @@ class Language(object):
package=None,
vectors_package=None):
"""
a model can be specified:
A model can be specified:
1) by calling a Language subclass
- spacy.en.English()
1) by calling a Language subclass
- spacy.en.English()
2) by calling a Language subclass with data_dir
- spacy.en.English('my/model/root')
- spacy.en.English(data_dir='my/model/root')
2) by calling a Language subclass with data_dir
- spacy.en.English('my/model/root')
- spacy.en.English(data_dir='my/model/root')
3) by package name
- spacy.load('en_default')
- spacy.load('en_default==1.0.0')
3) by package name
- spacy.load('en_default')
- spacy.load('en_default==1.0.0')
4) by package name with a relocated package base
- spacy.load('en_default', via='/my/package/root')
- spacy.load('en_default==1.0.0', via='/my/package/root')
4) by package name with a relocated package base
- spacy.load('en_default', via='/my/package/root')
- spacy.load('en_default==1.0.0', via='/my/package/root')
"""
if package is None:
if data_dir is None:
package = util.get_package_by_name()