Semantic Wiki/Concepts

From BattleMaster Wiki
Jump to navigation Jump to search

Concepts are much like Categories, except that they are computed dynamically from semantic information. As such, they are more flexible and can replace categories in many cases. In addition, they can be nested, i.e. a concept can be used in a semantic query. This often simplifies queries a lot.

Using the most base category only, e.g. "Region" and putting all the details into semantics, allows us to form concepts. For most contributors, that means simply using [[Concept:(something)]] instead of [[Category:(something)]].

New concepts are easily defined as well:

{{#concept:  [[Category:Regions]] [[located on::Atamara]]
| Regions of Atamara

Not only can "Regions of Atamara" be implemented as a concept, but so could "Cities", and "Regions on the coast", etc.

Once a concept is created, you can use [[Concept:Regions of Atamara]] in your queries like you would a category or property, and it will all automagically be updated with changes, etc. For example: We have defined a concept "Duchies" below (a region that is of type city or stronghold). Now we do not have to update a potentially large number of pages when the concept of a duchy changes (e.g. when for some reason we make it possible for townslands to be a duchy center, or if a new region type is introduced, etc.)

Concept or Category ?

We also implement a lot of things as categories, because that gives nice auto-generated page links. And Categories can also be used like Concepts in queries. And then we have the same thing again as Lists.

The strength of Concepts is that they can be defined from virtually anything, which is a bit more difficult for categories. Category:Atamara Regions is probably more useful than and fulfills the same purpose as Concept:Regions of Atamara. However, Concept:Duchies is a little more difficult to replicate as a Category. And a concept of, say, "big cities" where the actual definition of "big" differs from island to island, would be much easier defined as a concept.

The main advantage of a concept is that it relies entirely on semantic data and requires no changes to the pages involved. Where we strictly use a low number of templates, i.e. where updating a large number of pages is trivial, like in the regions, a category is easy to add. But if you have all the semantics in place already, and then decide you'd like to add a new category and it's not easy to do it via a change to a template or two, then you will probably want a concept.

Another advantage of concepts is that they have a description, which is being used in inline queries or RDF output.

Concept Pages

(these are still being experimented with and not all work correctly)