memray / OpenNMT-kpg-release

Keyphrase Generation
MIT License
216 stars 34 forks source link

Question about exact-matching between predicted and groundtruth keyphrases #45

Closed hzahera closed 2 years ago

hzahera commented 2 years ago

Hi,

I have a question about how the exact-matching is computed between two keyphrases in this function: https://github.com/memray/OpenNMT-kpg-release/blob/e0149ce392269ed0f53d3583a754d5eb1795efaf/onmt/keyphrase/eval.py#L28

for example:predicted k1= "data mining course" , groundtruth k2="data mining projects" in this case, both K1 and K2 are not exact matching (i.e, score=0 no matching at all) or it will be 2 correct-words out of 3?

Thanks,

memray commented 2 years ago

Hi @hzahera,

It will be 0. 'exact' means all words in predicted/groundtruth phrases should match, and be in the same order.

Best, Rui