mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-01 10:23:07 +03:00
* Fix merge conflict in init_model
This commit is contained in:
commit
c62eb110c0
|
@ -90,6 +90,9 @@ def _read_probs(loc):
|
||||||
|
|
||||||
|
|
||||||
def _read_freqs(loc):
|
def _read_freqs(loc):
|
||||||
|
if not loc.exists():
|
||||||
|
print("Warning: Frequencies file not found")
|
||||||
|
return None
|
||||||
counts = PreshCounter()
|
counts = PreshCounter()
|
||||||
total = 0
|
total = 0
|
||||||
for i, line in enumerate(loc.open()):
|
for i, line in enumerate(loc.open()):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
cython
|
cython
|
||||||
cymem == 1.11
|
cymem == 1.11
|
||||||
pathlib
|
pathlib
|
||||||
preshed == 0.37
|
preshed == 0.41
|
||||||
thinc == 3.3
|
thinc == 3.3
|
||||||
murmurhash == 0.24
|
murmurhash == 0.24
|
||||||
unidecode
|
unidecode
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -119,7 +119,7 @@ def run_setup(exts):
|
||||||
"spacy.syntax": ["*.pxd"]},
|
"spacy.syntax": ["*.pxd"]},
|
||||||
ext_modules=exts,
|
ext_modules=exts,
|
||||||
license="Dual: Commercial or AGPL",
|
license="Dual: Commercial or AGPL",
|
||||||
install_requires=['numpy', 'murmurhash', 'cymem >= 1.11', 'preshed == 0.37',
|
install_requires=['numpy', 'murmurhash', 'cymem >= 1.11', 'preshed == 0.41',
|
||||||
'thinc == 3.3', "unidecode", 'wget', 'plac', 'six',
|
'thinc == 3.3', "unidecode", 'wget', 'plac', 'six',
|
||||||
'ujson'],
|
'ujson'],
|
||||||
setup_requires=["headers_workaround"],
|
setup_requires=["headers_workaround"],
|
||||||
|
|
|
@ -5,6 +5,8 @@ cdef class CFile:
|
||||||
def __init__(self, loc, mode):
|
def __init__(self, loc, mode):
|
||||||
if isinstance(mode, unicode):
|
if isinstance(mode, unicode):
|
||||||
mode_str = mode.encode('ascii')
|
mode_str = mode.encode('ascii')
|
||||||
|
else:
|
||||||
|
mode_str = mode
|
||||||
cdef bytes bytes_loc = loc.encode('utf8') if type(loc) == unicode else loc
|
cdef bytes bytes_loc = loc.encode('utf8') if type(loc) == unicode else loc
|
||||||
self.fp = fopen(<char*>bytes_loc, mode_str)
|
self.fp = fopen(<char*>bytes_loc, mode_str)
|
||||||
if self.fp == NULL:
|
if self.fp == NULL:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user