Difference between revisions of "Semantic Wiki"

From BattleMaster Wiki
Jump to navigation Jump to search
(switched position semantic around)
Line 37: Line 37:
 
! style="background:#ddd;" | Example Uses / Notes
 
! style="background:#ddd;" | Example Uses / Notes
 
|-
 
|-
| style="background:#eee" colspan=4 | Properties for Places
+
| style="background:#eee" colspan=4 | Generic Properties
 
|-
 
|-
 
| [[Property:located on|located on]]
 
| [[Property:located on|located on]]
Line 48: Line 48:
 
| page
 
| page
 
| Mostly used to note on region pages which realm and duchy they belong to, for example: <nowiki>[[part of::Sirion]]</nowiki>. This should be used in all the region infobox templates.
 
| Mostly used to note on region pages which realm and duchy they belong to, for example: <nowiki>[[part of::Sirion]]</nowiki>. This should be used in all the region infobox templates.
 +
|-
 +
| [[Property:member of|member of]]
 +
| general parent/child relations of characters and persons
 +
| page
 +
| Denotes which realms, but also which family a character belongs to, e.g. <nowiki>[[member of::Hawk Family]]</nowiki> or <nowiki>[[member of::Outer Tilog]]</nowiki>
 +
|-
 +
| style="background:#eee" colspan=4 | Properties for Regions
 
|-
 
|-
 
| [[Property:population|population]]
 
| [[Property:population|population]]
| population count of the subject
+
| population count of the region - population of realms is calculated automatically from its regions
 
| number
 
| number
 
|  
 
|  
Line 58: Line 65:
 
| string
 
| string
 
|  
 
|  
 +
|-
 +
| [[Property:has feature|has feature]]
 +
| describes relevant details of a place
 +
| string
 +
| Use on the region page. Values can be things like "mountains", "river", "coast", "forest", "desert", "road", "bridge", etc.
 
|-
 
|-
 
| [[Property:capital of|capital of]]
 
| [[Property:capital of|capital of]]
Line 70: Line 82:
 
|-
 
|-
 
| style="background:#eee" colspan=4 | Properties for Persons
 
| style="background:#eee" colspan=4 | Properties for Persons
|-
 
| [[Property:member of|member of]]
 
| general parent/child relations of characters and persons
 
| page
 
| Denotes which realms, but also which family a character belongs to, e.g. <nowiki>[[member of::Hawk Family]]</nowiki> or <nowiki>[[member of::Outer Tilog]]</nowiki>
 
|-
 
| [[Property:ruler of|ruler of]]<br />[[Property:judge of|judge of]]<br />[[Property:general of|general of]]<br />[[Property:banker of|banker of]]<br />[[Property:duke of|duke of]]<br />[[Property:lord of|lord of]]<br />[[Property:knight of|knight of]]
 
| Denotes position(s) the character has in relation to a realm or region
 
| page
 
| note that [[Property:government member of]] also exists, and the government member positions are all sub-properties of it. In addition, all these properties are also sub-properties of "member of" and so include it automatically. You don't have to tell the Wiki that the "ruler of X" is also a member of X, it will use inferencing to determine that automatically
 
 
|-
 
|-
 
| [[Property:founder of|founder of]]
 
| [[Property:founder of|founder of]]
Line 98: Line 100:
 
|  
 
|  
 
|-
 
|-
| [[Property:has feature|has feature]]
+
| [[Property:has ruler|has ruler]]<br />[[Property:has judge|has judge]]<br />[[Property:has general|has general]]<br />[[Property:has banker|has banker]]<br />[[Property:has lord|has lord]]<br />[[Property:has knight|has knight]]
| describes relevant details of a place
+
| Denotes the position(s) and the people filling them
 
| string
 
| string
| Use on the region page. Values can be things like "mountains", "river", "coast", "forest", "desert", "road", "bridge", etc.
+
| This could also be implemented the other way around, e.g. "ruler of" on the character page. However, many characters do not have a wiki page at all, or not their own page (i.e. all characters are described on the family page). In templates using this property, it is suggested to include an optional link to the character page.
 
|-
 
|-
 
| [[Property:has state religion|has state religion]]
 
| [[Property:has state religion|has state religion]]

Revision as of 04:29, 7 February 2009

The BattleMaster Wiki uses Semantic MediaWiki to turn itself into a full-blown Semantic Web.

What does that mean when we strip out the buzzwords?

It means that - with proper markup - the wiki "understands" its own content, and can generate answers to fairly complicated questions such as "which realms (on any island) have the highest population-to-nobles ratios?" - not because any human has actually done the math, but because the wiki contains information about the realms, their populations and the number of nobles in them, and can do the math itself.

Yes, we can use external data sources and with time the game will be extended to offer them. That means that Semantic Web also means you do not have to hand-craft (and update constantly) the boxes that contain basic realm data such as name, regions, population, etc.


Scope

We are not aiming for the big thing, or integration with a world-wide semantic web. BattleMaster is it's own small world, with more well-defined terms and boundaries than the real world (where, for example, it isn't always clear what exactly a "realm" even is). As such, it is well-suited to using the Semantic Web technology.


Support

  • /Templates discusses templates you can use to make use of Semantic Web functions with minimal additional hassle.
  • /Concepts explains what concepts are and how to use them. It also lists the concept pages we have created.
  • /Lists can be dynamically generated from semantic data, and replace all the manually updated ones (such as Template:Realms of Atamara.


Editing

To enable semantics, you need to add so-called properties to the links in your pages. A property is simply an additional word or two that tells the computer what the link means. For example, when Keplerville links to Keplerstan, the computer has no way of knowing what that link means. However, when you tell it explicitly [[capital of::Keplerstan]], the computer knows that Keplerville is the capital of Keplerstan.


Ontology

This is where we define what is and what isn't, i.e. the semantic relations that we want to use. This is necessary or useful because it avoids duplications that would really mess things up. For example, if we call the game worlds "islands" in some cases and "continents" in others, that will make a lot of queries faulty, as their results will only show those instances that were annotated one way or the other.

Below are the terms that are set and fixed. Please do not modify this list - put new suggestions on the talk page.

In addition to these terms, we use Categories to indicate what kind of thing the subject is. So every region should be in and every realm in and every person in - well, a category we still have to create. (also note, it would be cleaner to rename these to singular, we'll do that sometime in the future)


Property Meaning Type Example Uses / Notes
Generic Properties
located on game-world the subject can be found on page [[located on::Atamara]] tells us this realm, region, religion or whatever can be found on the island/continent Atamara
part of general parent/child relations between items and places page Mostly used to note on region pages which realm and duchy they belong to, for example: [[part of::Sirion]]. This should be used in all the region infobox templates.
member of general parent/child relations of characters and persons page Denotes which realms, but also which family a character belongs to, e.g. [[member of::Hawk Family]] or [[member of::Outer Tilog]]
Properties for Regions
population population count of the region - population of realms is calculated automatically from its regions number
is of type region type as given by the game string
has feature describes relevant details of a place string Use on the region page. Values can be things like "mountains", "river", "coast", "forest", "desert", "road", "bridge", etc.
capital of specific property to indicate that a region is capital of a realm page Use on the region page. The realm should use semantics to automatically find its capital, or should use the inverse ("has capital::")
has feature describes relevant details of a place string Use on the region page. Values can be things like "mountains", "river", "coast", "forest", "desert", "road", "bridge", etc.
Properties for Persons
founder of Denotes guilds or religions that the character has founded page Will be used in semantic searches to automatically determine the founder of any guilds or religions that are on the Wiki
father of
son of
brother of
etc.
general parent/child relations of characters and persons page detail family relationships, expand as needed but please use this syntax
Properties for Realms, Guilds, Religions (i.e. abstract entities)
founding date the day the subject was created or founded date
has ruler
has judge
has general
has banker
has lord
has knight
Denotes the position(s) and the people filling them string This could also be implemented the other way around, e.g. "ruler of" on the character page. However, many characters do not have a wiki page at all, or not their own page (i.e. all characters are described on the family page). In templates using this property, it is suggested to include an optional link to the character page.
has state religion Denotes that a realm has a state/official religion, and which one page
government type is Denotes the government type of a realm string We're using a string because while there is a page on government systems, the individual systems do not have their own pages
Properties for Unique Items
discovery date the day the item was found or created date
discovered by the character who found or discovered the item page

Further terms will be added as we discuss and agree on them.


General Notes on Types

page 
These are types where the property is a page itself, e.g. a realm or region (which have their own pages), etc.
numbers 
These types must contain a valid number, even if that is a guess or approximation. Terms like "ca. 1 mio" are invalid, use "1000000" instead, and if you want a different display, the pipe trick. Example: [[population::5200|ca. 5000]]
date 
See MediaWiki Manual for details and syntax.


Searching and Inline Results

To use semantics on your pages, use the parser commands #ask or #show. Here are a few examples:

  • The population of Keplerstan is: ({{#show: Keplerstan | ?population}} = )
  • alternative syntax for the above: {{#ask: [[{{PAGENAME}}]] | ?population = }}
  • The capital of Keplerstan is: ({{#ask: [[capital of::Keplerstan]] | default=unknown }} = unknown)

In most cases, you will use the magic word {{PAGENAME}} to get facts about the current page. See the source code on the Keplerstan page for an example.


TODO / Questions

  • Do we want to add Halo ?
    • Interesting. The properties and categories editor looks helpful. It was hard to find, though, as their demo wiki is a spam linkfarm. For those interested in checking it out: take a look here. Also, the annotate tab on the pages lists all links/properties on a page.