- Introduction to Semantic MediaWiki
- Browsing interfaces
- Semantic search
- Selecting pages
- Displaying information
- Result formats
- Inline queries
- API modules
- Semantic Web
This section explains how to edit pages in Semantic MediaWiki. As explained in the introduction, SMW introduces special markup elements which allow editors to provide «hints» to computer programs on how to interpret some piece of information given in the wiki. Such hints are called semantic annotations and they are created with a special markup of SMW. Besides this, editing in SMW is just the same as in MediaWiki. Users who are not familiar with basic editing yet, should first read about how to edit pages in MediaWiki. Editors may or may not provide annotations on wiki pages as they like – it is an added feature that is completely voluntary.
Classification and semantic annotations
Annotations in Semantic MediaWiki can be viewed as an extension of the existing category system in MediaWiki. Categories are a means to classify articles according to certain criteria. For example, by adding [[Category:Cities]] to an article, the page is tagged as describing a city. MediaWiki can use this information to generate a list of all cities in a wiki, and thus help users to browse the information.
Semantic MediaWiki provides a further means of structuring the wiki. Wiki pages have links and text values in them, but only a human reader knows what the link or text represents. For example, «is the capital of Germany with a population of 3,396,990» means something very different from «plays football for Germany and earns 3,396,990 dollars a year». SMW allows you to annotate any link or text on the page to describe the meaning of the hyperlink or text. This turns links and text into explicit properties of an article. The property capital of is different from on national football team of, just as the property population is different from annual income.
This addition enables users to go beyond mere categorisation of articles. Usage and possible problems with using these features are similar to the existing category system. Since categories and properties merely emphasize a particular part of an article's content, they are often called (semantic) annotations. Information that was provided in an article anyway, e.g. that Berlin is the capital of Germany, is now provided in a formal way accessible to software tools.
Besides annotations, SMW also allows editors to embed semantic queries into articles. Thereby, readers of the wiki can view ready-made query results without having to learn the SMW query language. This feature is explained in the section on Inline queries.
Categories are an editing feature of MediaWiki, and the main reference for their use is the MediaWiki documentation on categories. Categories are used as universal "tags" for articles, describing that the article belongs to a certain group of articles. To add an article to a category Example category, just write
anywhere in the article. The name of the category (here, "Example category") is arbitrary but, of course, you should try to use categories that already exist instead of creating new ones. Every page can be assigned to a category by writing [[Category:Example category]] anywhere in the source text of the page. The category's article can be empty, but it is strongly recommended to add a description that explains which articles should go into the category.
On wikis like Wikipedia, categories are used for many different purposes. For example, the Cities category contains both individual cities, related subcategories like "City nicknames" and abstract concepts like "Digital city".
In Semantic MediaWiki-using sites, categories tend to be used much more sparingly, since inline queries make many categories superfluous. For example, a subcategory like Large cities could be replaced by a query for articles with Category:Cities with an area larger than 10 km², or a population larger than 1,000,000. In addition, categories tend to be used more exactly: a page like "Digital city" might end up in a category like "City-related terms" instead of "Cities", so that it wouldn't show up in a query on the "Cities" category.
- Category vs. property describes the different use pattern for categories and properties