dice-group / AGDISTIS

AGDISTIS - Agnostic Named Entity Disambiguation
http://aksw.org/Projects/AGDISTIS.html
GNU Affero General Public License v3.0
140 stars 37 forks source link

About the Wikidata and confidence level #69

Closed YeDeming closed 5 years ago

YeDeming commented 5 years ago

Hi,

Thanks a lot for opening source such a great resource. I am trying to run entity linking in Wikidata, But I met some trouble. In your document, "Wikidata does not use rdfs:type as a property to indicate type, it uses http://www.wikidata.org/prop/direct/P31. Thus, you need to change the predicate type search in https://github.com/dice-group/AGDISTIS/blob/master/src/main/java/org/aksw/agdistis/algorithm/DomainWhiteLister.java#L41 before using the whitelist parameter."

I am not sure. I should change "List tmp = index.search(candidateURL, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", null);" to what code for Wikidata.

And can I get the confidence level of an entity linking to a Wikidata id? For example, 0.3 probability of Tesla to Nikola Tesla, 0.7 probability of Tesla to Tesla Company.

Hope to get your help! Thanks a lot in advance!

Best, Deming Ye

DiegoMoussallem commented 5 years ago

Hi @YeDeming, first of all, thank you for using our resource.

You have to change from List tmp = index.search(candidateURL, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type", null); to List tmp = index.search(candidateURL, "http://www.wikidata.org/prop/direct/P31", null); and that's it.

Regarding the confidence level, we intend to implement it soon, but what you can get for a while is to the HITS or PageRank score per candidate, for example, you can change from type=agdistis to type=candidates, see here

YeDeming commented 5 years ago

Thanks a lot!

DiegoMoussallem commented 5 years ago

So, I'm going to close this issue.