Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same wikipedia entity title for all top k candidates #16

Closed
lucatorellimxm opened this issue Jan 17, 2023 · 2 comments
Closed

Same wikipedia entity title for all top k candidates #16

lucatorellimxm opened this issue Jan 17, 2023 · 2 comments

Comments

@lucatorellimxm
Copy link

Hello, I found what I believe is an issue with the method retrieving the top k candidate entities. When asking for top_k_predicted_entities from a span object, all candidates show the same wikipedia entity title (which is equal to the title of the selected, top-score entity), even if the wikidata ids actually point to different entities.

To show an example, when asking for top k predicted entities for "Barack Obama", I get:

[(Entity(wikidata_entity_id=Q76, wikipedia_entity_title=Barack Obama), 1.0),
 (Entity(wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q649593, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q16847466, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q4858115, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q3526570, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q50303833, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q8564528, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q2935433, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q4858123, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q4858105, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q1379733, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q45578, wikipedia_entity_title=Barack Obama), 0.0),
 (Entity(wikidata_entity_id=Q5842038, wikipedia_entity_title=Barack Obama), 0.0)]

even though, for example, id=Q16847466 corresponds to the wikipedia item "Efforts to impeach Barack Obama".

Am I missing something?

@dukesun99
Copy link

I have created PR #18, there was a bug in their code.

@lucatorellimxm
Copy link
Author

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants