mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Fix errors in packaging revision
This commit is contained in:
parent
86ee9d046d
commit
a6ba43ecaf
|
@ -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):
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user