-
Notifications
You must be signed in to change notification settings - Fork 12
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.git
git clone -b v2.0.18 https://github.com/explosion/spaCy.git
git clone -b master https://github.com/huggingface/neuralcoref.git
- Download whichever pretrained model you want, and untar the files so that
setup.py
ends up in$DIR/en_coref_xx
- Start in empty folder
- In each folder (
cymem
,spaCy
,neuralcoref
,en_coref_xx
), editsetup.py
to adddefine_macros = [('MS_WIN64', None)]
as an argument to theExtension(...)
- Edit
$DIR/spaCy/strings.pyx
to 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/