* Fix merge conflict in init_model

This commit is contained in:
Matthew Honnibal 2015-07-25 23:04:30 +02:00
commit c62eb110c0
4 changed files with 7 additions and 2 deletions

View File

@ -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()):

View File

@ -1,7 +1,7 @@
cython
cymem == 1.11
pathlib
preshed == 0.37
preshed == 0.41
thinc == 3.3
murmurhash == 0.24
unidecode

View File

@ -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"],

View File

@ -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: