huggingface / huggingface/neuralcoref

Wrong average embedding during inference due to a small bug in neuracoref.pyx

Open
#336 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.9k
Forks
467
PR merge metrics
No merged PRs in 30d

Description

The average embeddings can be wrongly calculated during inference due to a small bug in neuralcoref.pyx:

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

`PUNCTS` is a list of strings, while `token.lower` is an integer hash.
This means that punctuation embeddings will be added to the average embeddings of spans, causing a potential mismatch between training and inference features.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.