-
Notifications
You must be signed in to change notification settings - Fork 944
Conversation
@Benestar thanks for your contribution! Can you please fill out the pull request template and edit your initial comment. Once completed, we'll be sure to review your PR and give you some feedback. Thanks! |
@moollaza thanks for the hint, I've added the template |
|
||
Spice.add({ | ||
id: "wikidata", | ||
name: "Wikidata", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to "Answer"
Three questions:
|
Hi @airon90
Wikidata is multilingual "per definition" and you can contribute to it by translating the labels of items there (see https://www.wikidata.org/wiki/Wikidata:Contribute). However, I didn't find a way yet to get the language of the user. If that is possible somehow, it should be very easy to use other languages as well.
The answers are currently linked to Wikidata though we can change this and link either do DDG or to the connected Wikipedia article.
I didn't have enough time the last weeks to fix the comments by @moollaza but will hopefully address them this week. |
@abeyang this one is ready for an initial design review. It's using our Info, and Media templates. It should look very similar to our Wikipedia answers. It's using Wikidata, but has more flexible queries. Currently live on: https://beta.duckduckgo.com/?q=president+of+the+United+States&ia=answer @Benestar I see a couple bugs:
|
"population of Berlin" isn't currently working because I only implemented the answers for the item datatype (ie. values which contain other items). I will however also implement views for quantities like the population, times like date of creation or birth date and locations. You can see a list of datatypes here. The images are actually tall enough but they get displayed in a not so good way. You can see the full image when clicking on the item. However, we will always encounter this problem of cropped images as some images may be horizontal and some vertical. |
@Benestar , I'm not familiar with wikidata, but is their data complete? I just did a few quick sample queries, and a search for Steve Job's children produces 1 result with wikidata, but 4 results with That Other Search Engine... |
@abeyang most of the currently existing items were initially created by bots from existing Wikipedia articles, or a few other datasets (administrative districts). In this case, it seems the three other children of Steve Jobs weren’t deemed significant for inclusion in any Wikipedia language edition. I’ve added them now, since AFAIK Wikidata’s threshold of significance is lower than that of Wikipedia. |
https://beta.duckduckgo.com/?q=kuussa+tuulee&ia=iatesting I'm expecting a table like on Wikipedia 0-click info with all data about Q20872523 because sometimes I need a overview of a topic. |
Thanks @lucaswerkmeister for adding that data. This is exactly how Wikidata works @abeyang. Driven by a community the data gets better when it is used in more places. If more users figure out they can actually edit and fix the data the coverage and quality will increase as well. @airon90 yes that is a different task but should also definitely be done. Wikidata is per definition machine readable and much better in displaying such data tables than Wikipedia infoboxes. |
Another bug (maybe): https://beta.duckduckgo.com/?q=product+certification+of+Roma-Bangkok&ia=iatesting It seems that there is an answer but it isn't shown: https://beta.duckduckgo.com/js/spice/wikidata/Roma-Bangkok/product%20certification |
@airon90 for it shows an answer. Note you have to select the "Answer" tab under the search box. https://beta.duckduckgo.com/?q=product+certification+of+Roma-Bangkok&ia=answer |
https://beta.duckduckgo.com/?q=product+certification+of+Roma-Bangkok&ia=answer I know that I have to select "Answer" but no answer tab is shown |
Now it works for me too. Strange! |
@Benestar sorry for the delay -- I forget where we left off on this. What's the status? |
Hey @moollaza, the status is that this needs more feedback :-) Perhaps this needs a rebase and some updates for the Wikibase api. We now have quantities with units and a lot more useful data so we need a nice way to display this inside of this spice. However, I'd like the simple version to get ready first. |
@Benestar I've re-deployed this to beta. I'm have a hard time getting it to produce any results though. Is there a particularly property/attribute that you know is well defined across the data? If so, I'd like to use a list of the top...20? 50? as triggers to really reign in the triggering of this IA because right now it's going to trigger too much. For "daughters of barack obama" we need to use tile variants and/or larger images to make things look better.
I'm still not sure what other kind of info this IA is capable of producing. Can you give me a list of queries that produce different results so I can understand how the IA looks for different results?
|
@Benestar I'm closing this PR for now. If you're still interested in finishing, please let me know and I'll gladly re-open it for you! |
This is a first version of a spice to automatically show results based on Wikidata. More information below or in the introduction.
This proposal currently uses an api wrapper of the Wikidata api to avoid having several requests. To have a stable api, we can provide this wrapper directly on Wikidata. I will create a patch for such an api module if this is going to be merged.
What is Wikidata?
Wikidata is a free linked database that can be read and edited by both humans and machines.
Wikidata acts as central storage for the structured data of its Wikimedia sister projects including Wikipedia, Wikivoyage, Wikisource, and others.
Wikidata also provides support to many other sites and services beyond just Wikimedia projects! The content of Wikidata is available under a free license, exported using standard formats, and can be interlinked to other open data sets on the linked data web.
From the main page (CC-BY-SA 3.0)
Pinging @moollaza as he was interested in this wikidata integration.
Pull request template
What does your Instant Answer do?
Parse simple questions/phrases in the form "foo of bar" and search for values on Wikidata.
What problem does your Instant Answer solve (Why is it better than organic links)?
Instead of having to read eg. the Wikipedia article you can directly see the result in a nice format.
What is the data source for your Instant Answer? (Provide a link if possible)
Wikidata
Why did you choose this data source?
It's the new great project for open data, it's free and it's created and maintained by the Wikipedia community
Are there any other alternative (better) data sources?
There may be better sources for some specific data, but no sources have such a broad coverage as Wikidata
What are some example queries that trigger this Instant Answer?
"president of the United States", "population of Berlin", "what are the children of Barack Obama"
Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
very broad topics covered (like Wikipedia and even more)
Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
something like this was suggested in https://duck.co/ideas/idea/343/improve-0-click-info-with-wikidata-entries
Which existing Instant Answers will this one supersede/overlap with?
it may overlap with some IAs about population data
Are you having any problems? Do you need our help with anything?
yes, merge this :D
What are the terms of use for the API? Will DuckDuckGo need specific authorization (e.g. an API key)? Are there any costs associated with API usage?
Wikidata is licenced under CC0 and no special authorization should be required
What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
Checklist
Please place an 'X' where appropriate.
IA Page: https://duck.co/ia/view/wikidata