Hello all,
I tried looking at some examples but couldn’t quite figure out. if I were to write a simple query like this
SELECT ?food ?cooking WHERE { [] wdt:xx ? food. OPTIONAL{?food wdt:xx wd:xxx.} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". } }
What are the correct ids that I should be using?
- Quintin
Hi,
First a warning, food is known to be not-so-good on Wikidata.
Then, here you're query:
SELECT ?food ?foodLabel ?foodDescription WHERE { ?food wdt:P31/wdt:P279* wd:Q2095 . #everything under the class of food SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Cdlt ~nicolas
2018-06-22 1:31 GMT+02:00 Quintin Par quintinpar@gmail.com:
Hello all,
I tried looking at some examples but couldn’t quite figure out. if I were to write a simple query like this
SELECT ?food ?cooking WHERE { [] wdt:xx ? food. OPTIONAL{?food wdt:xx wd:xxx.} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". } }
What are the correct ids that I should be using?
- Quintin
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Your best bet is to use the Wikipedia Categories. They are not available on Wikidata, but are available on DBpedia. We did a lot of work on this in the Europeana Food and Drink project. We got a "FD classification" based on a filtered set of Wikipedia categories: http://efd.ontotext.com/data/#sec-3 You could find a bit more details (including presentations) in http://vladimiralexiev.github.io/pubs/
Good luck!
Thanks so much and sorry for the delay. The email ended in my spam folder.
I checked out this query and it looks like there is a lot of missing data. Or least I couldn’t believe some obvious ones weren’t there.
My goal with this project is to do some big query analysis to find out if an article from Wikipedia is food related or not (something like https://en.wikipedia.org/wiki/Ice_drilling https://mailtrack.io/trace/link/7e8caa8681d84a9aaf7ecca57b83973e234d4c72?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FIce_drilling&userId=74734&signature=225449adaae2106b - is this food or not?). Felipe Hoffa wrote about it a bit more here:
https://lookup-api.apple.com/lists.wikimedia.org/pipermail/wikidata/2016-Mar... https://mailtrack.io/trace/link/ee731303f38851cbbe7f42ce27d075f3820f2d0a?url=https%3A%2F%2Flookup-api.apple.com%2Flists.wikimedia.org%2Fpipermail%2Fwikidata%2F2016-March%2F008414.html&userId=74734&signature=ebc0ff39a4e23cad
and he has already uploaded wikidata dump to bigquery.
What would be the right way to do this? (Dbpedia or wikidata). If Dbpedia, Vladimir, is it possible to query if a wikipedia article is a particular category(s) or not?
- Quintin
On Fri, Jun 22, 2018 at 12:15 AM, Vladimir Alexiev < vladimir.alexiev@ontotext.com> wrote:
Your best bet is to use the Wikipedia Categories. They are not available on Wikidata, but are available on DBpedia. We did a lot of work on this in the Europeana Food and Drink project. We got a "FD classification" based on a filtered set of Wikipedia categories: http://efd.ontotext.com/data/#sec-3 https://mailtrack.io/trace/link/9b23b14bd64271e6d6f091f34988ebc0f5c774bb?url=http%3A%2F%2Fefd.ontotext.com%2Fdata%2F%23sec-3&userId=74734&signature=46610344c3f3b6ba You could find a bit more details (including presentations) in http://vladimiralexiev.github.io/pubs/ https://mailtrack.io/trace/link/479d2809504c7c185b518e83847e722ffb410761?url=http%3A%2F%2Fvladimiralexiev.github.io%2Fpubs%2F&userId=74734&signature=2666b42d1c66123b
Good luck!
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata https://mailtrack.io/trace/link/2fcbb5bc384dc971d4530e6f4c20242f6963c543?url=https%3A%2F%2Flists.wikimedia.org%2Fmailman%2Flistinfo%2Fwikidata&userId=74734&signature=17d31edf4187d779
Dbpedia, Vladimir, is it possible to query if a wikipedia article is a particular category(s) or not?
Sure. If I remember correctly, this is dct:subject. skos:broader makes the cat hierarchy, but to filter out irrelevant cars, use our data
On 22 June 2018 at 08:15, Vladimir Alexiev vladimir.alexiev@ontotext.com wrote:
Your best bet is to use the Wikipedia Categories. They are not available on Wikidata
Yes they are; for instance:
https://www.wikidata.org/wiki/Q24798534
https://www.wikidata.org/wiki/Q8381804
I didn’t quite get you here. Does this mean, there are not entries for Bread Dishes and therefore wikidata is incomplete?
- Quintin
On Fri, Jun 29, 2018 at 11:37 AM, Andy Mabbett andy@pigsonthewing.org.uk wrote:
On 22 June 2018 at 08:15, Vladimir Alexiev vladimir.alexiev@ontotext.com wrote:
Your best bet is to use the Wikipedia Categories. They are not available
on
Wikidata
Yes they are; for instance:
https://www.wikidata.org/wiki/Q24798534 https://mailtrack.io/trace/link/5c7e2921e96dda3d5258c9eb6094b57f02213188?url=https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ24798534&userId=74734&signature=202a298040a8c9b3
https://www.wikidata.org/wiki/Q8381804 https://mailtrack.io/trace/link/9a0311086b8e41d0719176b98873125b9d6792fd?url=https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ8381804&userId=74734&signature=84b362b4ea801f1a
-- Andy Mabbett @pigsonthewing http://pigsonthewing.org.uk https://mailtrack.io/trace/link/fc11b29eba285c04d187ad8f0a4ec398b8bfc7cc?url=http%3A%2F%2Fpigsonthewing.org.uk&userId=74734&signature=b10109925f39a841
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata https://mailtrack.io/trace/link/f425539a82555e97bb20f98a9ffbdd2a24fbce32?url=https%3A%2F%2Flists.wikimedia.org%2Fmailman%2Flistinfo%2Fwikidata&userId=74734&signature=dd39f8ff611078f7
On 29 June 2018 at 19:40, Quintin Par quintinpar@gmail.com wrote:
On Fri, Jun 29, 2018 at 11:37 AM, Andy Mabbett andy@pigsonthewing.org.uk wrote:
On 22 June 2018 at 08:15, Vladimir Alexiev vladimir.alexiev@ontotext.com wrote:
Your best bet is to use the Wikipedia Categories. They are not available on Wikidata
Yes they are; for instance:
I didn’t quite get you here. Does this mean, there are not entries for Bread Dishes and therefore wikidata is incomplete?
No; i was replying to Vladimir's claim that "Wikipedia Categories... are not available on Wikidata"
As for bread dishes on Wikidata, see, for example:
https://www.wikidata.org/wiki/Q990900
Though of course Wikidata is - and always will be, just like Wikipedia - incomplete.
Thank you.
- Quintin
On Fri, Jun 29, 2018 at 12:07 PM, Andy Mabbett andy@pigsonthewing.org.uk wrote:
On 29 June 2018 at 19:40, Quintin Par quintinpar@gmail.com wrote:
On Fri, Jun 29, 2018 at 11:37 AM, Andy Mabbett <
andy@pigsonthewing.org.uk> wrote:
On 22 June 2018 at 08:15, Vladimir Alexiev vladimir.alexiev@ontotext.com wrote:
Your best bet is to use the Wikipedia Categories. They are not
available on
Wikidata
Yes they are; for instance:
I didn’t quite get you here. Does this mean, there are not entries for Bread Dishes and therefore wikidata is incomplete?
No; i was replying to Vladimir's claim that "Wikipedia Categories... are not available on Wikidata"
As for bread dishes on Wikidata, see, for example:
https://www.wikidata.org/wiki/Q990900 https://mailtrack.io/trace/link/364ca33394ea5bf7d53dd77e4f774c4854bf6199?url=https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ990900&userId=74734&signature=d33e7fefa763fcfc
Though of course Wikidata is - and always will be, just like Wikipedia
- incomplete.
-- Andy Mabbett @pigsonthewing http://pigsonthewing.org.uk https://mailtrack.io/trace/link/d477ce178334cb5fa54844a8e0b9518d249a7a77?url=http%3A%2F%2Fpigsonthewing.org.uk&userId=74734&signature=f50882e0d4deef63
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata https://mailtrack.io/trace/link/6c540b446ef473b6f7f9b5efc1b6e7e3220f8dda?url=https%3A%2F%2Flists.wikimedia.org%2Fmailman%2Flistinfo%2Fwikidata&userId=74734&signature=55f0e97002c4bf63