{"id":268,"date":"2020-01-09T22:43:38","date_gmt":"2020-01-09T22:43:38","guid":{"rendered":"http:\/\/wikidata.wwwnlsrc4.supercp.com\/?page_id=268"},"modified":"2020-07-28T15:00:35","modified_gmt":"2020-07-28T15:00:35","slug":"autocompletion","status":"publish","type":"post","link":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/simple-queries\/the-simplest-query\/autocompletion\/","title":{"rendered":"Autocompletion"},"content":{"rendered":"\n<h2>WDQS built-in search function<\/h2>\n\n\n\n<p>The code\u00a0snippet for the <a href=\"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/simple-queries\/the-simplest-query\/adding-labels\/\">Wikidata Label Service<\/a> is not easy to remember. Fortunately, WDQS offers a great solution to this:\u00a0<em>autocompletion<\/em>. In the WDQS window, whenever you press Ctrl+Space (or Alt+Enter) at any point in the query, a drop-down menu  will offer suggestions for code that might be appropriate; select the right suggestion with the up\/down arrow keys, and press Enter to select it.<\/p>\n\n\n\n<p>For example, instead of writing out&nbsp;<\/p>\n\n\n\n<p>SERVICE wikibase:label { bd:serviceParam wikibase:language &#8220;[AUTO_LANGUAGE]&#8221;.}<\/p>\n\n\n\n<p>you can just type&nbsp;SERV, hit&nbsp;Ctrl+Space, and the first suggestion will be that complete label service code. Just hit&nbsp;Enter&nbsp;to accept it. You may want to change the code to retrieve labels in specific languages.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"949\" height=\"502\" src=\"https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion.png\" alt=\"\" class=\"wp-image-402\" srcset=\"https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion.png 949w, https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion-300x159.png 300w, https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion-768x406.png 768w\" sizes=\"(max-width: 949px) 100vw, 949px\" \/><\/figure>\n\n\n\n<p> Autocompletion can also search for Q numbers for items or P numbers for properties. If you type one of the Wikidata prefixes, like&nbsp;wd:&nbsp;(for items) or&nbsp;wdt: (for properties) and write text afterwards,&nbsp;Ctrl+Space&nbsp;will search for that text on Wikidata and suggest results for items and properties.&nbsp; <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" width=\"892\" height=\"482\" src=\"https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion2.png\" alt=\"\" class=\"wp-image-446\" srcset=\"https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion2.png 892w, https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion2-300x162.png 300w, https:\/\/wdqs-tutorial.toolforge.org\/wp-content\/uploads\/2020\/01\/autocompletion2-768x415.png 768w\" sizes=\"(max-width: 892px) 100vw, 892px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>WDQS built-in search function The code\u00a0snippet for the Wikidata Label Service is not easy to remember. Fortunately, WDQS offers a great solution to this:\u00a0autocompletion. In the WDQS window, whenever you press Ctrl+Space (or Alt+Enter) at any point in the query, a drop-down menu will offer suggestions for code that might be appropriate; select the right [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/268"}],"collection":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":17,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":1453,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions\/1453"}],"wp:attachment":[{"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wdqs-tutorial.toolforge.org\/index.php\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}