huggingface / huggingface/neuralcoref
Can't serialize document
- Dominant language
- C
- Stars
- 2.9k
- Forks
- 467
- PR merge metrics
- No merged PRs in 30d
Description
I can save a Spacy document to disk but not one produced by neuralcoref. For example, the following snippet returns error `TypeError: can't serialize My sister: [My sister, She]`.
```python
import spacy
nlp0 = spacy.load('en_core_web_sm')
doc0 = nlp0(u'My sister has a dog. She loves him.')
with open(f'output/test0.pkl', 'wb') as f:
f.write(doc0.to_bytes())
nlp = spacy.load('en_coref_sm')
doc = nlp(u'My sister has a dog. She loves him.')
with open(f'output/test.pkl', 'wb') as f:
f.write(doc.to_bytes())
```
The files produced are as follows:
```bash
$ ls -lh output/*.pkl
-rw-r--r-- 1 cumeo staff 0B Aug 11 21:16 output/test.pkl
-rw-r--r-- 1 cumeo staff 16K Aug 11 21:16 output/test0.pkl
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.