question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is BERT actually good for semantic similarity.. check the example

See original GitHub issue

As per score below , second case is more semantic similar than other one. But in actual it is just the opposite.

>>> model.predict([("he is an indian", "he has indian citizenship")])
array([3.2054904], dtype=float32)
>>> model.predict([("he is an indian", "he is  not an indian")])
array([3.590286], dtype=float32)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Jul 24, 2019

Hi, The implementation may be correct but does it worth if results are wrong. I belive bert embedding is not made for this purpose. Why to put a code in public which will not give intended results as the name suggests or the Readme page promises. Please correct me if I am wrong on BERT usage for this purpose

On Wed, 24 Jul, 2019, 3:48 AM Andriy Mulyar, notifications@github.com wrote:

The model implemented is identical to the model in the BERT paper reporting .89 annotator correlation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AndriyMulyar/semantic-text-similarity/issues/2?email_source=notifications&email_token=AHRBKIEEVIARLVOKM35SC2DQA57UJA5CNFSM4IGHWIXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UTCBQ#issuecomment-514404614, or mute the thread https://github.com/notifications/unsubscribe-auth/AHRBKIAFMN6633QKUKIOPRDQA57UJANCNFSM4IGHWIXA .

0reactions
timpal0lcommented, Feb 11, 2020

@sabirdvd What would be a better approach than using the sentence representation from bert for Semantic Similarity…?

Read more comments on GitHub >

github_iconTop Results From Across the Web

BERT For Measuring Text Similarity - Towards Data Science
That's all for this introduction to measuring the semantic similarity of sentences using BERT — using both sentence-transformers and a lower- ...
Read more >
Semantic Similarity with BERT - Keras
Semantic Similarity is the task of determining how similar two sentences are, in terms of what they mean. This example demonstrates the use ......
Read more >
Semantic Similarity in Sentences and BERT | Analytics Vidhya
How do BERT and other pretrained models calculate sentence similarity differently and how BERT is the better option among them.
Read more >
Measuring Text Similarity Using BERT - Analytics Vidhya
In this article we are going to measure text similarity using BERT. For the task we will be using pytorch a deep learning...
Read more >
python - Semantic text similarity using BERT
BERT is trained on a combination of the losses for masked language modeling and next sentence prediction. For this, BERT receives as input ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found