Difference between revisions of "Wikispooks:Semantic Mediawiki"

From Wikispooks
Jump to navigation Jump to search
m (Text replacement - "WikiSpooks" to "Wikispooks")
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Semantic Mediawiki''' (SMW) is an extension for the basic [[Mediawiki]] software that powers the Wikispooks site. It's purpose is to provide semantic definition and querying capabilities which are lacking in the basic software.
+
{{HelpSection|image=SMW.png}}
 +
'''Semantic Mediawiki''' (SMW) extends the basic Mediawiki software by providing semantic definition and querying capabilities. 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 {{WSLink|site feeds}} to export the data in a predictable format, for others to build upon.
  
==SMW on Wikispooks==
+
==Using the SMW Extension==
SMW is installed on Wikispooks, as are most of its related extensions (ie extensions to Mediawiki that are dependant upon SMW to function). To date (November 2013) Wikispooks has made only limited use of SMW - most notably its Semantic Forms extension.  
+
[[image:Extension.png|link=http://www.mediawiki.org/wiki/Extension:Semantic_MediaWiki|left|40px|alt=SMW download page]]
 +
Thankfully, using the SMW extension (like using Mediawiki) does ''not'' require understanding how it works. Behind the scenes, SMW is doing a lot of work organising and cross-referencing pages, but all you really need to know as an editor is the magic word '''{{t|<nowiki>{{SMWDocs}}</nowiki>}}''', which should be placed just above the "references" section. This calls [[Template:SMWDocs]], which searches the site and automatically prepares  a set of tables of any relevant documents and pages.
  
===Timelines===
+
==Understanding SMW==
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 '[[Special:Types/Date|Date]]' and 'Description is of property type '[[Special:Types/Text|Text]]'.
+
Semantic Mediawiki may seem to present quite a steep learning curve for non-computer scientists, as the idea of 'semantic data' may not be intuitive. [[User:Robin|Robin]] has volunteered to try to answer any and all SMW queries and to give to beginners help where needed. If you want to get to grips with the syntax, there is a lot of help online about this, and a useful guide to the syntax - which also gives an idea of the range of SMW - is the quick reference guide, available [http://postable.net/smwqr/smw-quick-reference.pdf here]. Note that you don't actually need to understand any syntax to get started - if you can fill in a form, then you can fill in semantic data!
  
The properties currently used by the timelines experiments may need to be changed to accord with standard but evolving semantic properties syntax and grammar.
+
==Use on Wikispooks==
 +
Since November 2013, Wikispooks has made use of SMW and associated extensions (Semantic Bundle). The approach is to:
 +
#Define a core set of [[SMWObject|semantic ''objects'']] for structuring the data, with their own sets of properties and interrelationships
 +
#Creating a set of [[:Category:Semantic Templates|semantic ''templates'']] to present these objects and their interrelationships
 +
#Creating a set of [[:Category:Semantic_Forms|semantic ''forms'']] to present these objects and their interrelationships
 +
#Processing the existing content to fit it into these structures
 +
#Allowing for seamless creation of these structures on new pages by non-SMW aware users (i.e. through semantic forms)
  
===Development===
+
===Semantic Objects===
The timeline experiments have made it clear that SMW has considerable potential to enhance the functionality of Wikispooks by making its contents more accessible to well thought out querying. Among other things, this will require:
+
{{FA|Wikispooks:Semantic Objects}}
 +
Wikispooks has been using a core set of semantic objects for about 4 years with only very minor changes, so they can be considered stable. By structuring the Wikispooks data, they facilitate interoperation with other projects, as well as coming with a set of forms, templates and properties to interrelate them.
  
*Identifying and defining other semantic properties in its existing content.
+
===Semantic Properties===
*applying the new properties to existing content.
+
{{FA|Wikispooks:Semantic Properties}}
*facilitating the use of the defined properties on new pages - best done by careful design of templates and corresponding data-entry/editing forms
+
A ''property'' is the basic type of semantic data. Wikispooks currently has [[:Category:Properties|{{#expr: {{PAGESINCAT:Special Properties}}+{{PAGESINCAT:Stable Properties}}+{{PAGESINCAT:Experimental Properties}}}} properties]] in use, each of which is documented using [[Template:Property]].
  
Before steaming ahead with this, we need to be a lot clearer about how to differentiate the use of properties and categories. The category tree is already an incoherent mess and it would be good to avoid turning the property list/tree into a similar mess.
+
===Semantic Templates===
 +
{{FA|Wikispooks:Semantic Templates}}
 +
If you can code ordinary [[Help:Templates|Templates]], then you should find it no trouble to code Semantic Templates. All the structure and syntax from ordinary Mediawiki applies, as does the [[Wikispooks:Templates|template standardisation policy]]. In addition there are a couple of parser functions to provide access to the semantic properties.
  
Please feel free to add to and edit this page. The talk page is best to make suggestions, ask questions etc.
+
===Semantic Forms===
 +
{{FA|Wikispooks:Semantic Forms}}
 +
A ''form'' is just what it sounds like - a set of boxes and checkboxes to be filled in. The 'semantic' aspect is that each of these fields is tied to particular parameters in a template. Wikispooks currently has only a few semantic forms in use, because the first priority is defining the objects and templates.
  
==Property definition and usage==
+
===Best Practice===
Please adhere to the following rules over properties:
+
{{FA|Wikispooks:SMW Best Practice}}
#Do not include a property in any page unless the property already has a corresponding page explaining what it is for - ie the property name shows blue in the [[Special:Properties|current properties list]]
+
Policy and practices in this area are currently fluid as Wikispooks editors are still 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 however emerging, such as the use of templates for all semantic markup.
#Do not define a new property unless you are very clear about its precise purpose.
 
# per 1 above, create a page for any newly defined property and explain its usage clearly before using it on any other page.
 
  
==Caution==
+
===Integrating with Mediawiki===
The semantic property definition process is easy - almost too easy in fact - and it has pitfalls. The most obvious of these to date is that it is possible to create large numbers of properties accidentally whilst experimenting with their use on templates that are already in use on many pages. That in itself would not be so bad except for the fact that, once defined, it seems that they cannot be deleted, even where there is no page or usage made of them - See [[Special:Properties]] for an illustration of what can happen.
+
Mediawiki's main organisational tools for arranging pages are the ''namespace'' and the ''category''. Manually assigned categories are still used for [[templates]], but are not recommended for ordinary pages, since SMW is easier to maintain and provides a superior user experience. There is a possibility of greatly expanding the use of namespaces to reflect the structure of objects defined (i.e. having separate namespaces for {{t|Person:}}, {{t|Event:}}, {{t|Book:}}, {{t|Nation:}} etc. Input is welcome about this on this talk page.
  
[[Category:About WikiSpooks]]
+
==Known Issues==
 +
{{FA|Wikispooks:SMW Known Issues}}
 +
Semantic Mediawiki is undergoing active development and as such, not without problems. If important, these will likely be resolved in time by the software's developers. This page is for reporting and discussion of any such issues.
 +
 
 +
==See Also==
 +
* [https://semantic-mediawiki.org/ Semantic Mediawiki software homepage]
 +
* [http://en.wikipedia.org/wiki/Semantic_Web Wikipedia on the Semantic Web]
 +
{{Wikispooks Footer/Semantic Mediawiki}}
 +
[[Category:Semantic Mediawiki| ]]

Revision as of 17:28, 14 October 2018

SMW.png

Semantic Mediawiki (SMW) extends the basic Mediawiki software by providing semantic definition and querying capabilities. 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, for others to build upon.

Using the SMW Extension

SMW download page

Thankfully, using the SMW extension (like using Mediawiki) does not require understanding how it works. Behind the scenes, SMW is doing a lot of work organising and cross-referencing pages, but all you really need to know as an editor is the magic word {{SMWDocs}}, which should be placed just above the "references" section. This calls Template:SMWDocs, which searches the site and automatically prepares a set of tables of any relevant documents and pages.

Understanding SMW

Semantic Mediawiki may seem to present quite a steep learning curve for non-computer scientists, as the idea of 'semantic data' may not be intuitive. Robin has volunteered to try to answer any and all SMW queries and to give to beginners help where needed. If you want to get to grips with the syntax, there is a lot of help online about this, and a useful guide to the syntax - which also gives an idea of the range of SMW - is the quick reference guide, available here. Note that you don't actually need to understand any syntax to get started - if you can fill in a form, then you can fill in semantic data!

Use on Wikispooks

Since November 2013, Wikispooks has made use of SMW and associated extensions (Semantic Bundle). The approach is to:

  1. Define a core set of semantic objects for structuring the data, with their own sets of properties and interrelationships
  2. Creating a set of semantic templates to present these objects and their interrelationships
  3. Creating a set of semantic forms to present these objects and their interrelationships
  4. Processing the existing content to fit it into these structures
  5. Allowing for seamless creation of these structures on new pages by non-SMW aware users (i.e. through semantic forms)

Semantic Objects

Full article: Wikispooks:Semantic Objects

Wikispooks has been using a core set of semantic objects for about 4 years with only very minor changes, so they can be considered stable. By structuring the Wikispooks data, they facilitate interoperation with other projects, as well as coming with a set of forms, templates and properties to interrelate them.

Semantic Properties

Full article: Wikispooks:Semantic Properties

A property is the basic type of semantic data. Wikispooks currently has 259 properties in use, each of which is documented using Template:Property.

Semantic Templates

Full article: Wikispooks:Semantic Templates

If you can code ordinary Templates, then you should find it no trouble to code Semantic Templates. All the structure and syntax from ordinary Mediawiki applies, as does the template standardisation policy. In addition there are a couple of parser functions to provide access to the semantic properties.

Semantic Forms

Full article: Wikispooks:Semantic Forms

A form is just what it sounds like - a set of boxes and checkboxes to be filled in. The 'semantic' aspect is that each of these fields is tied to particular parameters in a template. Wikispooks currently has only a few semantic forms in use, because the first priority is defining the objects and templates.

Best Practice

Full article: Wikispooks:SMW Best Practice

Policy and practices in this area are currently fluid as Wikispooks editors are still 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 however emerging, such as the use of templates for all semantic markup.

Integrating with Mediawiki

Mediawiki's main organisational tools for arranging pages are the namespace and the category. Manually assigned categories are still used for templates, but are not recommended for ordinary pages, since SMW is easier to maintain and provides a superior user experience. There is a possibility of greatly expanding the use of namespaces to reflect the structure of objects defined (i.e. having separate namespaces for Person:, Event:, Book:, Nation: etc. Input is welcome about this on this talk page.

Known Issues

Full article: Wikispooks:SMW Known Issues

Semantic Mediawiki is undergoing active development and as such, not without problems. If important, these will likely be resolved in time by the software's developers. This page is for reporting and discussion of any such issues.

See Also

Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png SMW.png
Semantic
Mediawiki
Help.png