{"id":1488,"date":"2015-11-14T20:31:08","date_gmt":"2015-11-14T19:31:08","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=1488"},"modified":"2022-10-09T23:49:48","modified_gmt":"2022-10-09T22:49:48","slug":"entitystore-and-termstore-for-wikibasewikidata","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","title":{"rendered":"EntityStore and TermStore for Wikibase\/Wikidata"},"content":{"rendered":"<p>I&#8217;m happy to announce the public release of two new PHP libraries that provide services around <a href=\"https:\/\/www.wikibase.consulting\/what-is-wikibase\/\">Wikibase<\/a>, the software behind <a href=\"https:\/\/www.wikidata.org\/\">Wikidata<\/a>. They are called <a href=\"https:\/\/github.com\/JeroenDeDauw\/EntityStore\">QueryR EntityStore<\/a> and <a href=\"https:\/\/github.com\/JeroenDeDauw\/TermStore\">QueryR TermStore<\/a>.<\/p>\n<p>Both these libraries provide persistence and lookup services for specific Wikibase data. These services are build on top of <a href=\"http:\/\/www.doctrine-project.org\/projects\/dbal.html\">Doctrine DBAL<\/a>, so support various databases, including in-memory SQLite.<\/p>\n<p><strong>QueryR EntityStore<\/strong><\/p>\n<p>This component has <a href=\"https:\/\/github.com\/JeroenDeDauw\/EntityStore\/blob\/a719b0baaf5a00b89ced442862b80aa8b464066d\/src\/EntityStoreInstaller.php\">two database tables<\/a>: one for storing items and one for storing blobs. Each has a blob field, plus some indexed fields to allow finding entities by various criteria. These tables are an internal implementation detail that is not exposed, and are just listed here to give you an idea of what can be done with the library.<\/p>\n<p>All services are constructed via the EntityStoreFactory class:<\/p>\n<pre class=\"lang:php decode:true \">use Queryr\\EntityStore\\EntityStoreFactory;\n$factory = new EntityStoreFactory(\n    $dbalConnection,\n    new EntityStoreConfig( \/* optional config *\/ )\n);<\/pre>\n<p>$dbalConnection is a Connection object from Doctrine DBAL.<\/p>\n<p>For writing values, you will need either ItemStore or PropertyStore.<\/p>\n<pre class=\"lang:php decode:true \">$itemStore = $factory-&gt;newItemStore();\n$propertyStore = $factory-&gt;newPropertyStore();<\/pre>\n<p>The main write methods are &#8220;store document&#8221; and &#8220;remove document by id&#8221;.<\/p>\n<pre class=\"lang:php decode:true \">$itemStore-&gt;storeItemRow( $itemRow );\n$itemStore-&gt;deleteItemById( $itemId );<\/pre>\n<p>Note that $itemRow is of type ItemRow, which is defined by this component. ItemRow represents all values in a row of the items table. It does not require having a fully instantiated Wikibase DataModel EntityDocument object, you just need the JSON.<\/p>\n<p>Next to ItemRow there also is ItemInfo, which is identical, apart for not having the JSON. (Internally these share code via the package private trait ItemRowInfo.)<\/p>\n<p>Here are some examples of how entities can be looked up. To get a full list, look at the services you can construct via the store, and their interfaces.<\/p>\n<p>Fetching an Item by id:<\/p>\n<pre class=\"lang:php decode:true \">$q42 = $itemStore-&gt;getItemRowByNumericItemId( 42 );<\/pre>\n<p>Property data type lookup:<\/p>\n<pre class=\"lang:php decode:true \">$lookup = $factory-&gt;newPropertyTypeLookup();\n$propertyType = $lookup-&gt;getTypeOfProperty( $propertyId );<\/pre>\n<p>Get cheaply retrievable info on the first 100 items:<\/p>\n<pre class=\"lang:php decode:true \">$itemInfoList = $itemStore-&gt;getItemInfo( 100, 0 );<\/pre>\n<p>Restrict the result to items of type &#8220;book&#8221;, assuming 424242 is the numeric id of &#8220;book&#8221;:<\/p>\n<pre class=\"lang:php decode:true \">$itemInfoList = $itemStore-&gt;getItemInfo( 100, 0, 424242 );<\/pre>\n<p><strong>QueryR TermStore<\/strong><\/p>\n<p>This component also has <a href=\"https:\/\/github.com\/JeroenDeDauw\/TermStore\/blob\/7646a37bef69818ec0b264ca1b12de3db68dd487\/src\/TermStoreInstaller.php\">two database tables<\/a>: one for labels and one for aliases. Again, these tables are an internal implementation detail that is not exposed, and are just listed here to give you an idea of what can be done with the library.<\/p>\n<p>All services are constructed via the TermStoreFactory class:<\/p>\n<pre class=\"lang:php decode:true \">use Queryr\\TermStore\\TermStoreFactory;\n$factory = new TermStoreFactory(\n    $dbalConnection,\n    new TermStoreConfig( \/* optional config *\/ )\n);<\/pre>\n<p>Writing to the store:<\/p>\n<pre class=\"lang:php decode:true \">$writer = $factory-&gt;newTermStoreWriter();\n\n$writer-&gt;storeEntityFingerprint( $entityId, $fingerprint );\n$writer-&gt;dropTermsForId( $entityId );<\/pre>\n<p>Lookup up an EntityId based on terms:<\/p>\n<pre class=\"lang:php decode:true \">$idLookup = $factory-&gt;newEntityIdLookup();\n\n$idLookup-&gt;getItemIdByLabel( $languageCode, $labelText );\n$idLookup-&gt;getItemIdByText( $languageCode, $termText );\n$idLookup-&gt;getIdByLabel( $languageCode, $labelText );<\/pre>\n<p>(See the EntityIdLookup interface for all methods and their documentation.)<\/p>\n<p>Lookup label based on EntityId and language:<\/p>\n<pre class=\"lang:php decode:true \">$labelLookup = $factory-&gt;newLabelLookup();\n$labelLookup-&gt;getLabelByIdAndLanguage( $entityId, $languageCode );<\/pre>\n<p>(See the LabelLookup interface for documentation.)<\/p>\n<p><strong>Installation<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/JeroenDeDauw\/EntityStore\">QueryR EntityStore<\/a> is available on Packagist as <a href=\"https:\/\/packagist.org\/packages\/queryr\/entity-store\">queryr\/entity-store<\/a>, and <a href=\"https:\/\/github.com\/JeroenDeDauw\/TermStore\">QueryR TermStore<\/a> is available as <a href=\"https:\/\/packagist.org\/packages\/queryr\/term-store\">queryr\/term-store<\/a>. They both support PHP 5.5 and later, including PHP 7 and HHVM. For more detailed instructions, including things such as release notes and how to run the tests, see their respective readme files.<\/p>\n<p><strong>Author<\/strong><\/p>\n<p>To avoid potential confusion, I&#8217;d like to explicitly state that <a href=\"https:\/\/wikimedia.de\">Wikimedia Deutchland<\/a>, my current employer, was not in any way involved in the development of these libraries. They have been written by me as a personal project.<\/p>\n<p>Contributions in the form of pull requests or issue submission are welcome.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m happy to announce the public release of two new PHP libraries that provide services around Wikibase, the software behind&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,8],"tags":[340,306,383,149,181,313,195,197,385,384,317,305],"class_list":["post-1488","post","type-post","status-publish","format-standard","hentry","category-programming","category-software","tag-components","tag-composer","tag-entitystore","tag-library","tag-open-source","tag-packagist","tag-php","tag-planet-wikimedia","tag-queryr","tag-termstore","tag-wikibase","tag-wikidata"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>EntityStore and TermStore for Wikibase\/Wikidata - Blog of Jeroen De Dauw<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EntityStore and TermStore for Wikibase\/Wikidata - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m happy to announce the public release of two new PHP libraries that provide services around Wikibase, the software behind&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-14T19:31:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-09T22:49:48+00:00\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\"EntityStore and TermStore for Wikibase\\\/Wikidata\",\"datePublished\":\"2015-11-14T19:31:08+00:00\",\"dateModified\":\"2022-10-09T22:49:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/\"},\"wordCount\":480,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"keywords\":[\"Components\",\"composer\",\"EntityStore\",\"Library\",\"Open Source\",\"packagist\",\"PHP\",\"Planet Wikimedia\",\"QueryR\",\"TermStore\",\"Wikibase\",\"wikidata\"],\"articleSection\":[\"Programming\",\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/\",\"name\":\"EntityStore and TermStore for Wikibase\\\/Wikidata - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\"},\"datePublished\":\"2015-11-14T19:31:08+00:00\",\"dateModified\":\"2022-10-09T22:49:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2015\\\/11\\\/14\\\/entitystore-and-termstore-for-wikibasewikidata\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"EntityStore and TermStore for Wikibase\\\/Wikidata\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jeroendedauw\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EntityStore and TermStore for Wikibase\/Wikidata - Blog of Jeroen De Dauw","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","og_locale":"en_US","og_type":"article","og_title":"EntityStore and TermStore for Wikibase\/Wikidata - Blog of Jeroen De Dauw","og_description":"I&#8217;m happy to announce the public release of two new PHP libraries that provide services around Wikibase, the software behind&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2015-11-14T19:31:08+00:00","article_modified_time":"2022-10-09T22:49:48+00:00","author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":"EntityStore and TermStore for Wikibase\/Wikidata","datePublished":"2015-11-14T19:31:08+00:00","dateModified":"2022-10-09T22:49:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/"},"wordCount":480,"commentCount":1,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"keywords":["Components","composer","EntityStore","Library","Open Source","packagist","PHP","Planet Wikimedia","QueryR","TermStore","Wikibase","wikidata"],"articleSection":["Programming","Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/","name":"EntityStore and TermStore for Wikibase\/Wikidata - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"datePublished":"2015-11-14T19:31:08+00:00","dateModified":"2022-10-09T22:49:48+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/14\/entitystore-and-termstore-for-wikibasewikidata\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":"EntityStore and TermStore for Wikibase\/Wikidata"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-o0","jetpack-related-posts":[{"id":1524,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/01\/25\/replicator-a-cli-tool-for-wikidata\/","url_meta":{"origin":1488,"position":0},"title":"Replicator: Wikidata import tool","author":"Jeroen","date":"2016-01-25","format":false,"excerpt":"I'm happy to announce the first release of Replicator, a CLI tool for importing entities from Wikidata. Replicator was created for importing data from Wikidata into the QueryR REST API persistence. It has two big conceptual components: getting entities from a specified source, and then doing something with said entities.\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1484,"url":"https:\/\/www.entropywins.wtf\/blog\/2015\/11\/08\/wikidata-wikibase-json-dump-reader\/","url_meta":{"origin":1488,"position":1},"title":"Wikidata\/Wikibase Json Dump Reader","author":"Jeroen","date":"2015-11-08","format":false,"excerpt":"I've created a small PHP library to read from, and iterate through, Wikidata\/Wikibase JSON dumps. Wikidata is the free knowledge base that anyone can edit, and serves as a central data repository for Wikipedia and associated projects. Wikibase is a set of free open source software that powers Wikidata. You\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1337,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/05\/06\/the-wikidata-phase3-software-components\/","url_meta":{"origin":1488,"position":2},"title":"The Wikidata phase3 software components","author":"Jeroen","date":"2014-05-06","format":false,"excerpt":"Work on the long awaited query functionality for the Wikidata project has already happened during a period of several months. Since queries are a completely disjoint feature set from the existing functionality, we decided to put it into a new component part of the Wikibase software. This component is called\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1287,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/03\/20\/status-of-the-new-wikibase-deserialization-code\/","url_meta":{"origin":1488,"position":3},"title":"Status of the new Wikibase (de)serialization code","author":"Jeroen","date":"2014-03-20","format":false,"excerpt":"A quick update on the status of the new serialization and deserialization code for Wikibase, the software behind Wikidata. For a long time now, we've had two serialization formats. One intended for external usage, and one intended for internal usage. The former one is the format our web API uses.\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/www.entropywins.wtf\/blog\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1401,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/09\/02\/wikibase-datamodel-1-0\/","url_meta":{"origin":1488,"position":4},"title":"Wikibase DataModel 1.0","author":"Jeroen","date":"2014-09-02","format":false,"excerpt":"I'm happy to announce the 1.0 release of Wikibase DataModel.\u00a0Wikibase DataModel is the canonical PHP implementation of the Data Model at the heart of the Wikibase software. This is a big release which has been some time in the making, even though many additions have been split of and included\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1303,"url":"https:\/\/www.entropywins.wtf\/blog\/2014\/04\/10\/diff-1-0-released\/","url_meta":{"origin":1488,"position":5},"title":"Diff 1.0 released!","author":"Jeroen","date":"2014-04-10","format":false,"excerpt":"I'm very happy to announce the 1.0 release of the PHP Diff library. Diff is a small PHP library for representing differences between data structures, computing such differences, and applying them as a patch. For more details see the usage instructions. I created this library as part of the Wikibase\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/www.entropywins.wtf\/blog\/category\/software\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=1488"}],"version-history":[{"count":6,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1488\/revisions"}],"predecessor-version":[{"id":2893,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1488\/revisions\/2893"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=1488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=1488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=1488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}