Question: how to evaluate word similarity with context?
## ❓ Questions & Help

Hello, 
I am trying to evaluate **word similarity** (particularly named entities). 

Example:
`I flew to Paris last month.`
`I met a famous celebrity, Paris Hilton.`

Most named entity recognition models (e.g. the default `pipeline('ner')`) will return `Paris` and `Paris Hilton` as named entities. 
They look similar, but they represent different entities. My question is: 
### How can I determine that two hyponymic words/phrases are different (from context)?

I tried this solution: 
https://discuss.huggingface.co/t/generate-raw-word-embeddings-using-transformer-models-like-bert-for-downstream-process/2958/2
and then compared with cosine similarity, but as mentioned in this issue https://github.com/huggingface/transformers/issues/2298, cosine similarity does not work well with BERT (and similar like models) embeddings. 

I also looked into the topic of WSD (Word Similarity Disambiguation), but these solution work rather for "standard" hyponyms (like `baseball bat` and `cave bat`), but named entities are usually _special_ and are NOT present in dictionary. 

Any help or suggestion will be more than welcome! 🤗
Hello, thanks for opening an issue! We try to keep the github issues for bugs/feature requests.
Could you ask your question on the [forum](https://discuss.huggingface.co) as well?

Thanks!<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.