huggingface / neuralcoref

✨Fast Coreference Resolution in spaCy with Neural Networks
https://huggingface.co/coref/
MIT License
2.83k stars 474 forks source link

Missing implementation of doc embeddings during inference #338

Open valedica opened 2 years ago

valedica commented 2 years ago

Document embeddings are not calculated during inference in neuralcoref.pyx, but they are left at zeros.

https://github.com/huggingface/neuralcoref/blob/60338df6f9b0a44a6728b442193b7c66653b0731/neuralcoref/neuralcoref.pyx#L717

This causes a mismatch between inference and training input features (doc embeddings during training are correctly calculated in document.py). Is it a bug or is it intentional? There is a call to a method get_average_embedding as a comment but it does not exist.