Sam Wilson's Website

Linking tags to Wikidata

By .

I've recently added support to my website for linking posts' tags to Wikidata entities. This means that each tag (which has it's own URL at where nn is the tag ID) can be linked to a Wikidata ID, and have a little table of facts displayed. This means that tags are no longer just strings, but are firmly linked to a meaningful concept — a tag such as 'York' is definitely the town in Western Australia and not the one in Yorkshire. No two tags are allowed to be linked to the same Wikidata item.

The other part of this work was adding a lookup widget to the tag entry form field. Before, it was just a text box and tags had to be entered with semicolons separating them. Now, you start typing and a dropdown appears with suggestions firstly from existing tags on the site and then below them with labels and descriptions of Wikidata items. It makes entering new tags much easier.

It's great fun going back through my archives and linking all the tags, although it's also highlighting the fact that I often create duplicate tags (e.g. misspellings, or Fremantle Railway Station vs Fremantle Train Station). To add a tag-merging system I first need to add a system of tracking and redirecting old URLs (something I should've added ages ago when I added the ability to delete duplicate posts).

Tags: · · ·

This post is syndicated at: IndieNews