* Fix errors in packaging revision

This commit is contained in:
Matthew Honnibal 2015-12-29 18:37:26 +01:00
parent 86ee9d046d
commit a6ba43ecaf
4 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ from .syntax.ner import BiluoPushDown
from .syntax.arc_eager import ArcEager
from .attrs import TAG, DEP, ENT_IOB, ENT_TYPE, HEAD
from .util import get_package, MockPackage
from .util import get_package, Package
class Language(object):
@ -182,7 +182,7 @@ class Language(object):
- Language(model='en_default ==1.0.0')
- Language(model='en_default <1.1.0, data_dir='spacy/data')
"""
package = MockPackage(data_dir)
package = Package(data_dir)
if load_vectors is not True:
warn("load_vectors is deprecated", DeprecationWarning)
if vocab in (None, True):

View File

@ -21,7 +21,7 @@ from .tokens.doc cimport Doc
from .vocab cimport Vocab
from .attrs import FLAG61 as U_ENT
from .util import MockPackage
from .util import Package
from .attrs import FLAG60 as B2_ENT
from .attrs import FLAG59 as B3_ENT
@ -171,7 +171,7 @@ cdef class Matcher:
@classmethod
def load(cls, pkg_or_str_or_file, Vocab vocab):
package = MockPackage.create_or_return(pkg_or_str_or_file)
package = Package.create_or_return(pkg_or_str_or_file)
patterns = package.load_utf8(json.load,
'vocab', 'gazetteer.json',
default={}) # TODO: really optional?

View File

@ -5,7 +5,7 @@ import io
import pickle
from spacy.lemmatizer import Lemmatizer, read_index, read_exc
from spacy.util import get_package, MockPackage
from spacy.util import get_package, Package
import pytest

View File

@ -17,7 +17,7 @@ cimport cython
from . import util
from .tokens.doc cimport Doc
from .util import read_lang_data
from .util import MockPackage as Package
from .util import Package
cdef class Tokenizer: