feat: add new metric: Semantic R-precision#3
Open
shamira-venturini wants to merge 12 commits intouclanlp:mainfrom
Open
feat: add new metric: Semantic R-precision#3shamira-venturini wants to merge 12 commits intouclanlp:mainfrom
shamira-venturini wants to merge 12 commits intouclanlp:mainfrom
Conversation
…topk-configuration-1 Update sample_config_kptimes.gin
…topk-configuration Update sample_config_kp20k.gin
…implementation Update sem_matching_metric.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces Semantic R-Precision (SemR-p), a novel keyphrase evaluation metric designed to jointly assess semantic relevance and ranking quality. The metric, its motivation, and comprehensive evaluation are detailed in our paper: https://www.researchgate.net/publication/391552955_Meaning_in_Order_Order_in_Meaning_Semantic_R-precision_for_Keyphrase_Evaluation.
Summary of Changes:
metrics/semantic_matching_metric.py.top_kreferences).semantic_matchingmetric group is run and uses the newtop_kparameter (defaulting to 3) in the.ginconfig forSemanticMatchingMetric.* Included a new script
doc_retriever.pyto facilitate easy loading of source, target, and prediction data for specific document examples, by inputtingdataset,modeland,doc_id, aiding qualitative analysis.Design Rationale for SemR-p Integration:
SemR-p was integrated into
SemanticMatchingMetric.pyto efficiently reuse the existing Sentence Transformer embedding model infrastructure and align with KPEval's current approach of grouping metrics with the same underlying semantic similarity calculation method.How to Use SemR-p (in this fork):
run_evaluation.pywithmetric_id='semantic_matching', SemR-p scores will be output under the keysemantic_r_precision.top_kparameter for SemR-p can be configured in the.ginfile within theSemanticMatchingMetric.top_ksetting.We believe these additions will be valuable to the KPEval toolkit and the broader keyphrase evaluation community.