-
Notifications
You must be signed in to change notification settings - Fork 95
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
Invalid prediction - no wikipedia entity #89
Comments
This is because you are not using the constrained search as shown in the example code. https://github.com/facebookresearch/GENRE/tree/main/examples_genre |
Thanks! But I thought, that it should always give me a valid entity name without any constraint on the candidate set. |
Then the |
Thanks. I tried the following: Passing the whole BPE prefix tree as
But that does not work, the output does not make sense. This is, what you suggested, right? Or is it more complicated and I have to rewrite the code in |
As I show in the example the candidates_trie=Trie([
model.encode(" }} [ {} ]".format(e))[1:].tolist()
for e in ["Albert Einstein", "Nobel Prize in Physics", "NIL"]
]) the |
Sorry, for asking again.
Output
The output for |
This looks correct to me. One suggestion: save your trie so you do not need to recompute it every time. The disambiguation model and the end2end linking model are not the same so they might give different outputs. The disambiguation is usually much more precise than the end2end linking model. |
Okay, thank you. Then, it would make sense to first compute all mentions from the e2e model and not use the linked wikipedida entities but use the disambiguation model to link those mentions, wouldn't it? |
The two models operate in different ways. Please refer to the paper for details.
Yes, I think so. It is also faster to use something like FLAIR to get the mentions. |
Thank you for the fast and detailled answers! :) |
Hi, I use the end-to-end entity linking model of GENRE.
Unfortunately, for some predictions, I get entity names, that do not appear in Wikipedia.
Code:
Output:
"John Trapolta" does not exist neither does John Trapolta. If I understood the paper correct, the model should only output valid wikipedia entities, right? Can you help me out what I did wrong?
Cheers!
The text was updated successfully, but these errors were encountered: