Topic on User talk:Magnus Manske

Jump to navigation Jump to search

Tool to insert "country" and "instance of" property

14
Summary by Magnus Manske

continue in other thread

Alexmar983 (talkcontribs)

Here a user I have introduced to your wdfist-widar P18 tool (do you remember my campaign to target users with "local interest"?) would like to know if there is some other tool that can speed up the upload of very generic properties such as "country" o "instance of" for items.

I would be surprised if we don't have it yet.--~~~~

Magnus Manske (talkcontribs)

Depends on how you want to speed things up:

  • If you are looking for simple ways for users to add statements, try the Wikidata Game.
  • If you have a bunch of items that you know (somehow) should all get the same statement, e.g. "country:Iceland", try PetScan (e.g. "Other sources"/"Manual list").
  • If you have a bunch of "prepared statements", try QuickStatements.
Magnus Manske (talkcontribs)

Or, here on Wikidata, you can use the Wikidata Useful script to get a hoverbox on each item, with many common statements "pre-filled" as one- or two-click actions.

Jura1 (talkcontribs)
Pietro (talkcontribs)

Thank you for your feedbacks. I checked the tools you suggested, but I didn't find the way to use them in a way similar to wdfist, specifying a category (e.g. en:Category:Castles in Italy) to get a list of wikidata items with selectable missing statements (e.g.: P17 or P31), in order to add them with predefined strings (e.g.: "Italy" or "castle").

The one close to my needs seems petscan, but it links wikipedia pages, instead of wikidata item, and I cannot select the missing statement I want to fill: something wrong in the way I use it?

Magnus Manske (talkcontribs)

OK, so in PetScan, under "Other sources", check "Wikidata" under "Use wiki". That will convert the list of Wikipedia pages into a list of Wikidata items. At that point, you will get checkboxes in front of every item. Also, on the top right, there is now a box for commands. A command is a property and a value, such as "P31:Q5" (the value needs to be a Wikidata item). If you check all the items you want to add a statement to, and click "Process commands", it will add the commands (in my example, "instance of:human") to the selected items.

I strongly suggest you try this out on the sandbox item first though!

Jura1 (talkcontribs)

Here is a version with Autolist:

Alexmar983 (talkcontribs)

Thanks guys I am learning lots of new things, I will be happy to spread them around asap.--~~~~

Pietro (talkcontribs)

Thank you for your help. The example with Autolist was extremely useful and I added missing P17Q38 to items in a small category . The main drawback with this tool are performances.

Trying to do the same with PetScan I've still problems to restrict the search to items with missing statements (the equivalent of "NOT WDQ claim [17]" for Autolist): be patient ... ;)

Pietro (talkcontribs)

I'm facing performance problems using Autolist with different browsers and parameters: Chrome gives timeouts running queries on large categories and Firefox is able to complete queries for some parameters , but not for others : any hints?

Magnus Manske (talkcontribs)

No idea, except claim[17] returns ~4.5M items. Won't spent time debugging autolist if I replace it with petscan in the near future.

Jura1 (talkcontribs)
Magnus Manske (talkcontribs)

Jura1, the reason this doesn't work any more is that you try to subset with ~17,183,174 items! Neither WDQ nor SPARQL, the underlying data sources, are really equipped to generate such a long list of items, not to mention subsequent handling of that list.

Also, why are you posting this under a "insert country property" thread?

Jura1 (talkcontribs)

I'm aware of the amount of data involved, but the same queries used to work with WDQ (not with SPARQL) not too long ago.

Topic:T1rd2vhmkwzgpz8f might be a solution for this. https://phabricator.wikimedia.org/T129037 seems to be scheduled for the Greek calends.

BTW: Pietro found the related Autolist query useful in terms of a response to his initial query and it did work when I provided it.