-
Notifications
You must be signed in to change notification settings - Fork 11
Neuralcoref on Windows
valtron edited this page Mar 10, 2019
·
2 revisions
Using latest spaCy (2.0.18), there's this problem:
ValueError: cymem.cymem.Pool has the wrong size, try recompiling. Expected 64, got 48
(This is because of this change.)
Downgrading to 2.0.12 didn't work either; I got can't retrieve string for hash '35848228568803' when loading the model. So, time to build everything from source.
- Download everything
- Start in empty folder
$DIR git clone -b v2.0.2 https://github.com/explosion/cymem.gitgit clone -b v2.0.18 https://github.com/explosion/spaCy.gitgit clone -b master https://github.com/huggingface/neuralcoref.git- Download whichever pretrained model you want, and untar the files so that
setup.pyends up in$DIR/en_coref_xx
- Start in empty folder
- In each folder (
cymem,spaCy,neuralcoref,en_coref_xx), editsetup.pyto adddefine_macros = [('MS_WIN64', None)]as an argument to theExtension(...) - Edit
$DIR/spaCy/strings.pyxto addself.keys = []; self.hits = []afterself.mem = Pool(). (This is to fix a different "wrong size" problem; maybe a bug in Cython.) - Build/install everything (the slashes are important!)
pip install cymem/pip install spaCy/pip install neuralcoref/pip install en_coref_xx/