diff --git a/spacy/__init__.py b/spacy/__init__.py index da038a9fe..1177e726d 100644 --- a/spacy/__init__.py +++ b/spacy/__init__.py @@ -7,13 +7,20 @@ from . import de from . import zh +try: + basestring +except NameError: + basestring = str + + + set_lang_class(en.English.lang, en.English) set_lang_class(de.German.lang, de.German) set_lang_class(zh.Chinese.lang, zh.Chinese) def load(name, vocab=True, tokenizer=True, parser=True, tagger=True, entity=True, - matcher=True, serializer=True, vectors=True, via=None): + matcher=True, serializer=True, vectors=True, pipeline=True, via=None): if via is None: via = util.get_data_path() @@ -21,8 +28,7 @@ def load(name, vocab=True, tokenizer=True, parser=True, tagger=True, entity=True path = util.match_best_version(target_name, target_version, via) if isinstance(vectors, basestring): - vectors_name, vectors_version = util.split_data_name(vectors) - vectors = util.match_best_version(vectors_name, vectors_version, via) + vectors = util.match_best_version(vectors, None, via) cls = get_lang_class(target_name) return cls( @@ -34,4 +40,5 @@ def load(name, vocab=True, tokenizer=True, parser=True, tagger=True, entity=True parser=parser, entity=entity, matcher=matcher, + pipeline=pipeline, serializer=serializer)