How to measure similarity of words?
I want to know it BERT based contextual embedding can be used to measure similarity of identical words in different contexts.
And, can I estimate a threshold for that.

You should check out BLEU and ROUGE scores. These are often referred to as the precision and recall of NLP.

You may be able to craft a pseudo-f1 score out of these as well 
`f1 = 2*(bleu*rouge)/(bleu + rouge)`

I haven't tried this myself yet, but hopefully this helps!

[https://en.wikipedia.org/wiki/BLEU](https://en.wikipedia.org/wiki/BLEU)
[https://en.wikipedia.org/wiki/ROUGE_(metric)](https://en.wikipedia.org/wiki/ROUGE_(metric))<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
