wordlift-plugin
wordlift-plugin copied to clipboard
SameAs search not working properly in the Wordpress Plugin
Please describe the issue here: Impossible to find some entities defined in WikiData
Please provide additional data about your WordPress install: [ ] WordPress version: 4.9.8 [ ] WordLift plugin version: 3.19.4 [ ] Step-by-step procedure on how to reproduce the issue:
- Step 1: open in a web browser the Speed Painting page on WikiData: https://www.wikidata.org/wiki/Q1759721
- Step 2: in Wordpress create an entity speed painting
- Step 3: In the entity page of WP write in the SameAs field "Q1759721" or "https://www.wikidata.org/wiki/Q1759721" or "speed painting" (without quotes)
They are not found..
Hello @slim16165
In order for an entity to appear in the autocomplete select, it must support a schema.org type. Unfortunately Q1759721 doesn't look to have one and therefore it is not suggested.
When typing the URI directly, use the 2nd input below the autocomplete select.
Let us know if you need more details.
Cheers.
Let us know if you need more details.
Yes, thanks, I really appreciate.
If I'm not wrong many entities from Wikidata works fine with the SameAs research. Why this specific miss the schema.org type? Can I complete it by modifying WikiData?
I'd also like to ask another detail. When I insert the URI directly it's https://www.wikidata.org/wiki/Q1759721 but if the URI is added through the SameAs research it's usually https://www.wikidata.org/entity/Q1759721
Does it make any difference? Or both works fine?
Hello @slim16165
We use the following chain of properties to determine the type of a Wikidata entity:
wdt:P31/wdt:P279*/wdt:P1709*
For example, the query for Coco Chanel entity [1] returns many types among those also schema:Person
, while the query for Speed Painting [2] doesn't return any type.
You can add the type in Wikidata starting with wdt:P31.
You should use https://www.wikidata.org/entity/Q1759721 when populating the sameAs manually.
[1] https://query.wikidata.org/#SELECT%20%2a%20WHERE%20%7B%0A%20%20%3Fid%20wdt%3AP31%2Fwdt%3AP279%2a%2Fwdt%3AP1709%2a%20%3Ftype%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20BIND%20%28%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ45661%3E%20AS%20%3Fid%20%29%0A%20%20%23%20BIND%20%28%20%3Chttps%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ1759721%3E%20AS%20%3Fid%20%29%0A%7D%0A [2] https://query.wikidata.org/#SELECT%20%2a%20WHERE%20%7B%0A%20%20%3Fid%20wdt%3AP31%2Fwdt%3AP279%2a%2Fwdt%3AP1709%2a%20%3Ftype%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%23%20BIND%20%28%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ45661%3E%20AS%20%3Fid%20%29%0A%20%20BIND%20%28%20%3Chttps%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ1759721%3E%20AS%20%3Fid%20%29%0A%7D%0A
Sorry for bothering you again.
I've tried to modify the entry on Wikidata https://www.wikidata.org/wiki/Q1759721 adding the property you suggested me (Property:P31). Why still it doesn't work?
Sorry for bothering you again
No problem at all.
I've tried to modify the entry on Wikidata https://www.wikidata.org/wiki/Q1759721 adding the property you suggested me (Property:P31). Why still it doesn't work?
I see it now:
Ah, sorry. You are right. I tried only with this query.
https://query.wikidata.org/#SELECT%20%2a%20WHERE%20%7B%0A%20%20%3Fid%20wdt%3AP31%2Fwdt%3AP279%2a%2Fwdt%3AP1709%2a%20%3Ftype%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%23%20BIND%20%28%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ45661%3E%20AS%20%3Fid%20%29%0A%20%20BIND%20%28%20%3Chttps%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ1759721%3E%20AS%20%3Fid%20%29%0A%7D%0A ᐧ
Il giorno lun 24 set 2018 alle ore 14:34 David Riccitelli < [email protected]> ha scritto:
Sorry for bothering you again
No problem at all.
I've tried to modify the entry on Wikidata https://www.wikidata.org/wiki/Q1759721 adding the property you suggested me (Property:P31). Why still it doesn't work?
I see it now:
[image: image] https://user-images.githubusercontent.com/11438/45952301-d626bd80-c006-11e8-998a-371d3e95f7f5.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/insideout10/wordlift-plugin/issues/854#issuecomment-423959171, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5b_WsDRKUiKO0UtgGSSfW229gYybEsks5ueNFOgaJpZM4Wygdj .
http://www.wikidata.org/entity/Q1759721 (instead of https://www.wikidata.org/entity/Q1759721) yields results:
SELECT * WHERE {
?id wdt:P31/wdt:P279*/wdt:P1709* ?type
BIND ( <http://www.wikidata.org/entity/Q1759721> AS ?id )
}
Thanks! ᐧ
Il giorno lun 24 set 2018 alle ore 14:47 David Riccitelli < [email protected]> ha scritto:
http://www.wikidata.org/entity/Q1759721 (instead of https://www.wikidata.org/entity/Q1759721) yields results:
?id wdt:P31/wdt:P279*/wdt:P1709* ?type
BIND ( http://www.wikidata.org/entity/Q1759721 AS ?id ) }
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/insideout10/wordlift-plugin/issues/854#issuecomment-423962606, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5b_YykCacPn7fKNVrUfQKVBqaZMJJ2ks5ueNRtgaJpZM4Wygdj .
I was looking to this two elements (since "base azotata" wasn't found in the search https://www.wikidata.org/wiki/Q422960 https://www.wikidata.org/wiki/Q2836809
They are both well compiled but they miss the property P31 instanceOf (they have the P279 Subclass of)
I cannot get the difference between them so I'd just like to ask you if you think that the query in Wordlift could include both the property. The benefit would be huge.
What do you think? Would it be a mistake?
Yes, I see, we might want to make P31 optional. We'll run some more tests and get back on this.
I'm also a developer (more experienced with c#). Do you think I can experiment this change on my installation? Is it just one line of code to modify?
I'd like to search not only for wdt:P31 but also for the other you suggested me: /wdt:P279*/wdt:P1709*
If it's ok to try, can you help me to find the piece of code to edit?
ᐧ
Il giorno mar 25 set 2018 alle ore 10:31 David Riccitelli < [email protected]> ha scritto:
Yes, I see, we might want to make P31 optional. We'll run some more tests and get back on this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/insideout10/wordlift-plugin/issues/854#issuecomment-424253228, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5b_W6lZ6aIQPHW5D0ntoQY9yi_Zbdaks5ueenegaJpZM4Wygdj .
Hello @slim16165,
Unfortunately not, because it's a service provided by our cloud infrastructure, i.e. the plugin only performs a plain http call to a remote end-point and receives the preformatted results.
No problem, Thanks for the full support you provide. I really appreciate! ᐧ
Il giorno mer 26 set 2018 alle ore 16:35 David Riccitelli < [email protected]> ha scritto:
Hello @slim16165 https://github.com/slim16165,
Unfortunately not, because it's a service provided by our cloud infrastructure, i.e. the plugin only performs a plain http call to a remote end-point and receives the preformatted results.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/insideout10/wordlift-plugin/issues/854#issuecomment-424738670, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5b_WyVSzqrsAeg-ZcQyd-JQWXyhOpOks5ue5ClgaJpZM4Wygdj .
Yes, I see, we might want to make P31 optional. We'll run some more tests and get back on this. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#854 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5b_W6lZ6aIQPHW5D0ntoQY9yi_Zbdaks5ueenegaJpZM4Wygdj .
Hi, is there any news on this issue? For me is very sad not being able to use Wordlift on entities like this: https://www.wikidata.org/wiki/Q837515
If I'm not wrong there isn't any "business reason" for limiting the research only to P31 and esclude P279.
Hello @slim16165,
We're testing a more relaxed query (wdt:P31*/wdt:P279*/wdt:P1709*
) on WordLift Cloud.
Since the query takes more time than the previous one, we had to split it.
If we see that it is stable, we'll replicate it to WordLift Server.
I'll keep you posted.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.