01 – Learn about SMW

From academy

In a nutshell: Learn about MediaWiki's environment and general functions of Semantic MediaWiki. Also, see some real examples and what extensions you need to install.

The wiki periphery[edit]

Don't get confused by all the MediaWikiPediaMedia's around. It looks like a big family and here it is:

Wikipedia is the largest online encyclopedia, the mother of all wikis, written in 295 different languages. The language Wikipedias are independent from each other (though interlinked), the largest ones are the English, German and French Wikipedia. There are also numerous sister projects, among them Wiktionary, Wikidata, Wikiquote, Wikinews, Commons and MediaWiki. Usually, the term "Wikipedia" refers to the language Wikipedias, but not the sister projects.
The Wikimedia Foundation (WMF) is the non-profit foundation hosting Wikipedia and her sister projects. The foundation is responsible for financing the project and keeping track of the mission.
MediaWiki is the wiki software best known for powering Wikipedia and all her sister projects. It is open-source and available for download and usage by everybody. It is written in PHP using some SQL magic. MediaWiki is released and mainly[1] maintained by the Wikimedia Foundation (WMF).
Semantic MediaWiki
Semantic MediaWiki (SMW) is a grand extension on top of MediaWiki, sometimes the name refers also to a couple more useful extensions in this context (e.g. Page Forms, Semantic Result Formats, Semantic Title). It enhances MediaWiki with database functionalities and is very often used in business and enterprise contexts, as well as public institutions.
Wikidata is Wikipedia's project running on Wikibase, following a similar approach to Semantic MediaWiki to unify and reuse data.

Who else is out there?[edit]

There is a large community around Wikipedia and the development for its software. But also around third party users there have formed strong communities:

MediaWiki Stakeholders' Group
The MediaWiki Stakeholders' Group or MWStake is initiating strong communication between third party MediaWiki users and the WMF.
The SMWCon and EMWCon
The Semantic MediaWiki conference (SMWCon) happens every fall in Europe and will be in its 15th edition in fall 2018.
The newer Enterprise MediaWiki conference (EMWCon) happens every spring in the US.
Enterprise MediaWiki
Around enterprise users have formed a strong community of (Semantic) MediaWiki consultants, developers and users. They are uniting their forces for a better standing of MediaWiki in general and better communication between users and towards the WMF. There is a new website online under Enterprise MediaWiki.

Why use a wiki at all?[edit]

What is special about a wiki?[2][edit]

  • Unlike on a website, everybody can edit a page.
  • Unlike in an intranet, users usually have more rights to add and edit content.
  • Unlike in documents, content is always showing the latest revision, while keeping access to the entire revision history.
  • Unlike in self-saving systems, in the wiki it is easy to revert mistakes.
  • Errors can be corrected by everybody, not just authorized people.
  • Unlike in hierarchical systems, wikis work a lot better on horizontal linking, i.e. hyperlinks within the text.
  • Relationships between content can be established and visualized.
  • Simple, consistent formatting is possible with little markup. Can be extended with consistent templates and forms.[3]
  • Transparency - allow everyone to see information, builds trust, and surfaces issues.[4]

What are the benefits of a wiki?[edit]

Content first, search second, structure last
Drop your content and structure it later. Search for content, instead of for content location.
Combination of structured plus unstructured content
Killer feature! You can have database-like functions plus unstructured raw storytelling text next to each other, wonderfully interwoven.
Quicker onboarding
A central knowledge database enables quicker onboarding and reduces negative burden for new employees.
Single point of information
The wiki integrates into the company's system/infrastructure, but can serve well as a starting point, single point of information.
Full control over all edits
All changes are reversible and nothing is ruinable. Complete version history of all changes is saved by default.
Open-source is chance, not a risk.
With open-source software like MediaWiki you can get a long life expectancy. SMW is based on MediaWiki, which powers Wikipedia, one of the 5 largest website on the globe. There are many people interested in its long-term survival. You therefore "buy" into a software with a safe future.

Why use Semantic MediaWiki?[edit]

What's it all about? Here's the glitter and glamour:[5]

With Semantic MediaWiki (SMW), you get a highly scalable, low-cost and extremly flexible and customizable database included in a knowledge management system. With SMW you can create a flexible ontology on the fly, it can create a a holistic ecosystem for processes in your organization.

What can it be used for?[edit]

To describe SMW's use cases is difficult, since there so many. Here are some common functionalities:

  1. Storage of data – in comparison to free-text content – but alongside free-text content
  2. Querying for data, displaying data
  3. Automated lists and tables from data
  4. Visualization of data
  5. External reuse of data

How does this work?[edit]

database functions
MediaWiki is text-based and can best be used for knowledge transfer on an "office" basis. Semantic MediaWiki is enhancing this functionality by those of a database.
semantic annotations
Content in the wiki can be semantically annotated via certain properties and can then be queried for and displayed in lists, tables, graphs, calendars or any other suitable format.
the triple
Semantic annotations work like sentences: Subject + predicate + object.

What do I need to do?[edit]

  1. You have content (free text) in your wiki.
  2. You annotate the content in the background, it becomes data. "January" and "Januarystreet" are only words, unless you tell the wiki they are a date and a location.
  3. You reuse the data and output it on another page: as a list, a table, a map, a calendar, a graph or export formats like RDF, CSV, XML.

Some general concepts[edit]

  1. You put data in only once. You then can use it again and again at any place in your wiki.
  2. A lot of the times, SMW is used together with templates, where the annotations are placed, instead of annotating directly on the page.
  3. Additionally, a lot of the times, SMW is used in combination with Page Forms to fill the templates. This is best practice to take away the burden of errors from the user.

Good examples of semantic wikis[edit]

> Now off to step 2, defining the ontology.


  1. There are free developers contributing to MediaWiki core, still, most of development happens within the Foundation.
  2. Inspired by Best practices for using MediaWiki
  3. Best practices for using MediaWiki
  4. Best practices for using MediaWiki
  5. Thanks to Tony Mallia for input.