Wikispooks:Semantic Mediawiki

From Wikispooks
Revision as of 08:15, 4 January 2014 by Peter (talk | contribs) (typo)
Jump to navigation Jump to search
SMW.png

Semantic Mediawiki (SMW) is an extension for the basic Mediawiki software that powers the Wikispooks site. Its purpose is to provide semantic definition and querying capabilities which are lacking in the basic software. This offers two main benefits to the site - (i) a richer set of ways to organise and use the information, (ii) the possibility to define site feeds to export the data in a predictable format, which others can build.

Learning SMW

Learning Semantic Mediawiki may be quite a steep learning curve for non-computer scientists, but remember that it is a large piece of software and not much is needed to get started. Administrators are available to answer queries and give help where needed. A useful guide to the syntax - which gives an idea of the range of SMW is the quick reference guide, available here.

SMW on Wikispooks

SMW is installed on Wikispooks together with a bunch of associated extensions (Semantic Bundle). Towards the end of 2013, Wikispooks has been expanding its use of SMW - most notably through Semantic Forms extension. Policy and practices in this area are currently fluid a Wikispooks editors are gradually learning how to get the best out of the software, and simultaneously developing a framework for its use on the site. Some best practices are emerging:

No loose markup

Wikispooks is following the SMW recommendation of strongly discouraging loose pieces of inline markup. For reasons of future-proofing and maintenance, SMW properties should be assigned through templates. See Semantic Templates for suitable templates. The main semantic template to use for replacing inline semantic data is Template:SMWData.

Presenting SMW Data

SMW querying is the recommended way to present large data tables inline in pages, since this is easier in terms of reuse. The main semantic template for displaying semantic data is Template:SMWDocs, which is a kind of 'catch all' for relevant data. When inserted in a page manually, it should usually be used just before the "References" section.

Timelines

Full article: WikiSpooks:Timelines

Experiments with timelines, notably the JFK Assassination Timeline have made further use of SMW. Timelines are a semantic results format which must have at least one date property defined in order to correctly displayed events. The JFK timeline currently uses 3 semantic property definitions (Start, End and Description), 'Start' and 'End' are of property type 'Date' and 'Description is of property type 'Text'.

The properties currently used by the timelines experiments may need to be changed to accord with standard but evolving semantic properties syntax and grammar.

Properties

Full article: WikiSpooks:Semantic Properties

A property is the basic type of semantic data. Wikispooks currently uses 261 properties, all marked up with Template:Property.

Development

Existing use of SMW suggests that it has considerable potential to enhance the functionality of the site, making its contents more accessible to well thought out querying. Among other things, this will require:

  • Some capable programming by editors up to speed on SMW
  • Identifying and defining a core set of semantic properties (and possibly also concepts) which are useful for structuring the data
  • Applying these new structures to the existing content
  • Allowing for seemlessly creation of these structures on new pages by non-SMW aware users (i.e. through semantic forms)

Integrating with Mediawiki

Mediawiki's main organisational tools for arranging pages are the namespace and the category. Adding SMW's properties and concepts to the mix allows for considerable flexibility in how to organise data. The basic approach is a replacement of the generic grouped together with (category) relationship by SMW's more precisely defined relationships (properties). How best to do this remains an open question, but some basic principles are:

  1. Properties and Concepts are generally to be preferred to categories
  2. For reasons of reliability and maintenance, data should be dynamically produced (e.g. from templates) rather than input by hand whenever possible
  3. Hard thinking is preferable to hard work where possible :)

See Wikispooks talk:Semantic Mediawiki for more detailed discussion.


Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png
Wikispooks
Technical
SMW.png Help.png