mirror of https://github.com/explosion/spaCy.git
* 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):
|
||||
if not loc.exists():
|
||||
print("Warning: Frequencies file not found")
|
||||
return None
|
||||
counts = PreshCounter()
|
||||
total = 0
|
||||
for i, line in enumerate(loc.open()):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
cython
|
||||
cymem == 1.11
|
||||
pathlib
|
||||
preshed == 0.37
|
||||
preshed == 0.41
|
||||
thinc == 3.3
|
||||
murmurhash == 0.24
|
||||
unidecode
|
||||
|
|
2
setup.py
2
setup.py
|
@ -119,7 +119,7 @@ def run_setup(exts):
|
|||
"spacy.syntax": ["*.pxd"]},
|
||||
ext_modules=exts,
|
||||
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',
|
||||
'ujson'],
|
||||
setup_requires=["headers_workaround"],
|
||||
|
|
|
@ -5,6 +5,8 @@ cdef class CFile:
|
|||
def __init__(self, loc, mode):
|
||||
if isinstance(mode, unicode):
|
||||
mode_str = mode.encode('ascii')
|
||||
else:
|
||||
mode_str = mode
|
||||
cdef bytes bytes_loc = loc.encode('utf8') if type(loc) == unicode else loc
|
||||
self.fp = fopen(<char*>bytes_loc, mode_str)
|
||||
if self.fp == NULL:
|
||||
|
|
Loading…
Reference in New Issue