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

ZELDA candidate lists in EntityLinker #3108

Merged
merged 6 commits into from
Feb 17, 2023
Merged

ZELDA candidate lists in EntityLinker #3108

merged 6 commits into from
Feb 17, 2023

Conversation

alanakbik
Copy link
Collaborator

Entity Linking has been shown to profit from candidate lists that contain for a mention a list of possible disambiguation targets.

This PR integrates candidate lists as loss masking into the EntityLinker. It also integrates the ZELDA candidate lists for convenience.

Example for initializing the ZELDA candidate lists and retrieving candidates for a string.

generator = CandidateGenerator(candidates="zelda", lower_case=False)
print(generator.get_candidates("Pence"))

Example for initializing an EntityLinker with a candidate generator:

linker = EntityLinker(
    embeddings,
    label_dictionary=tag_dictionary,
    pooling_operation="first",
    candidates=CandidateGenerator("zelda") 
)

@alanakbik alanakbik merged commit 8806ab4 into master Feb 17, 2023
@alanakbik alanakbik deleted the candidate_lists branch February 17, 2023 07:54
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

Successfully merging this pull request may close these issues.

1 participant