{"id":268,"date":"2015-03-12T15:56:44","date_gmt":"2015-03-12T14:56:44","guid":{"rendered":"http:\/\/blog.magnusmanske.de\/?p=268"},"modified":"2015-03-12T23:19:52","modified_gmt":"2015-03-12T22:19:52","slug":"linkin-mash","status":"publish","type":"post","link":"http:\/\/magnusmanske.de\/wordpress\/archives\/268","title":{"rendered":"Linkin mash"},"content":{"rendered":"<p>So I <a href=\"http:\/\/magnusmanske.de\/wordpress\/?p=265\">recently blogged<\/a> about automatic descriptions based on <a href=\"http:\/\/www.wikidata.org\">Wikidata<\/a>. And as nice as these APIs are, what could they be used for? You got it &#8211; demo time!<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Linkin_Park#Band_members\">Linkin Park<\/a> band member Dave Farrell has no article on English Wikipedia (only a redirect to Linkin Park, which is unhelpful). He does, however, have a <a href=\"https:\/\/www.wikidata.org\/wiki\/Q19202\">Wikidata item<\/a> with articles in 35 other languages. This is, essentially, the situation you get on smaller Wikipedias &#8211; lots of articles in other languages, just not in yours. There is information about the subject, but unless you can read any of those other languages, it&#8217;s closed to you.<\/p>\n<p>On English Wikipedia, I created <a href=\"https:\/\/en.wikipedia.org\/wiki\/Template:Red_Wikidata_link\">a template<\/a> for this situation a while ago. Instead of a redlink, you specify the target and the Wikidata item, and you get the &#8220;normal&#8221; redlink, as well as links to Wikidata and Reasonator. An improvement, undoubtedly, but still rather clunky.<\/p>\n<p>Thus, I resorted to something from the 90&#8217;s &#8211; a &#8220;mash-up&#8221; of multiple existing parts. A little bit of Wikipedia mobile view, my automatic description API, the Wikipedia API to render Wikitext as HTML, season with some JavaScript, and boom! we have a Wikipedia clone &#8211; with a twist. By default, this mash-up will happily display the <a href=\"https:\/\/tools.wmflabs.org\/magnustools\/mashwiki\/#language=en&amp;page=Linkin%20Park\">Linkin Park<\/a> article; however, under the &#8220;Band members&#8221; section (about the middle of the page), Dave Farrell now has just another, normal link:<\/p>\n<div style=\"display: inline-block;\">\n<div id=\"attachment_269\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park-orig.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-269\" class=\"size-medium wp-image-269\" src=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park-orig-300x218.png\" alt=\"Band section on Wikipedia\" width=\"300\" height=\"218\" srcset=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park-orig-300x218.png 300w, http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park-orig.png 548w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-269\" class=\"wp-caption-text\">Band section on Wikipedia<\/p><\/div>\n<\/div>\n<div style=\"display: inline-block;\">\n<div id=\"attachment_270\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-270\" class=\"size-medium wp-image-270\" src=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park-300x226.png\" alt=\"Band section in the mash-up\" width=\"300\" height=\"226\" srcset=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park-300x226.png 300w, http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Linkin-Park.png 551w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-270\" class=\"wp-caption-text\">Band section in the mash-up<\/p><\/div>\n<\/div>\n<p>The mash-up code recognized the code generated by the template on Wikipedia, and replaced it with a normal-looking, special link. Clicking on that &#8220;Dave Farrell&#8221; will lead to a <a href=\"https:\/\/tools.wmflabs.org\/magnustools\/mashwiki\/#language=en&amp;q=Q19202\">live-generated page<\/a>. It uses the automatic description API to get Wikitext plus infobox, then uses the Wikipedia API to render that as (mobile) HTML. And while the text is a little bit dull, it looks just like another Wikipedia page rendered through the mash-up, image and all.<\/p>\n<p>I am well aware of the current limitations of this approach, including the potential deterrent to creating &#8220;proper&#8221; articles. However, with the much-hyped next billion internet users, many of them limited to the smaller Wikipedias, banging on our virtual door, such a mechanism could be a stop-gap measure to provide at least basic information in smaller languages, in a user-friendly way. Details of text generation for those languages, infoboxes, integration into Wikipedia proper, redlink markup, etc. would have to be worked out for this to happen.<\/p>\n<div id=\"attachment_271\" style=\"width: 926px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Dave-Farrell.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-271\" class=\"wp-image-271 size-full\" src=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Dave-Farrell.png\" alt=\"Dave Farrell\" width=\"916\" height=\"517\" srcset=\"http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Dave-Farrell.png 916w, http:\/\/magnusmanske.de\/wordpress\/wp-content\/uploads\/2015\/03\/Dave-Farrell-300x169.png 300w\" sizes=\"auto, (max-width: 916px) 100vw, 916px\" \/><\/a><p id=\"caption-attachment-271\" class=\"wp-caption-text\">Dave Farrell, as rendered by the mash-up<\/p><\/div>\n<hr \/>\n<p>UPDATE: Aaaand&#8230; my template introduction <a href=\"https:\/\/en.wikipedia.org\/w\/index.php?title=Linkin_Park&amp;oldid=651097277&amp;diff=prev\">has been reverted<\/a>, effectively breaking the demo. I&#8217;m not going to start an edit war over this, you still have the screenshots.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I recently blogged about automatic descriptions based on Wikidata. And as nice as these APIs are, what could they be used for? You got it &#8211; demo time! Linkin Park band member Dave Farrell has no article on English Wikipedia (only a redirect to Linkin Park, which is unhelpful). He does, however, have a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-268","post","type-post","status-publish","format-standard","hentry","category-wikidata"],"_links":{"self":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":4,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":275,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/268\/revisions\/275"}],"wp:attachment":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}