Open main menu

Grand Theft Wiki β

Help:Semantics

Revision as of 21:19, 25 May 2012 by Gboyers (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Grand Theft Wiki is a Semantic Wiki. This means we collect data within a page into a searchable/displayable format.

Overview

The basic principle of semantic data is setting properties on pages. Those properties are little facts, such as the nationality or gender of the character. We can then do a search or query on those properties.

For example, on each character's page, we can specify the nationality of the character. Then we can do a search for all characters from each nationality. We can also display that search on a country page using an inline query.


Setting Properties

Properties are set in a similar way to links and categories. You need the name of the property and the data (answer) for it.

[[Property::Data]]

To set the 'Nationality' property to 'British':

[[Nationality::British]]

Some templates set these properties. {{infobox character}} is Grand Theft Wiki's first large-scale semantic template, setting the gender, nationality and dates of birth/death of the character. Simply fill out the details on the template to have these properties automatically set.


Types of Properties

Every property has a page, listed at Special:Properties.

By default, a property is type=page. This can be changed by adding a datatype to the properties page (just like a category).

If you select a datatype, such as 'date', anything that doesn't fit that input will generate an error. The data will have a yellow warning triangle next to it, and page will show up in Property:Has improper value for.


Standard answers

Be careful to use a standard answer whenever you mean the same thing, rather than a slightly different one.

For example, For a gender, always use 'Male' or 'Female' - don't sometimes use boy/man/woman/lady/girl.


How Properties Display

If you simply use [[Nationality::British]] (as above), it will show a link to page 'British'.

Properties can be changed like links. You can specify an alternative place to link to: [[Nationality::British|United Kingdom]] or use a space to hide the link completely: [[Nationality::British| ]]

Additional templates and switches can be used to change these outputs. Template {{country}} changes any country terms/abbreviations into the correct term (eg USA > United States), whilst {{nationality}} changes them into the demonym for the people who live there (eg USA > American).


Queries

Queries can be built and run on Special:Ask.

You can easily search on properties and categories, exactly the same way as setting them. This is an AND query.

So to search for all Russian characters in GTA IV:
We want to search for all pages in Category:Characters in GTA IV and with Nationality::Russia
So we just search for those two things, exactly the same way as we would set them on a page:
[[Category:Characters in GTA IV]] [[Nationality::Russia]]
Results

If you need to use an OR, you need to do this within the [[square brackets]] of the links, and use || as an OR operator

[[Category:Characters in GTA IV || Category:Characters in GTA III Era]]
http://www.grandtheftwiki.com/index.html?title=Help:Semantics&oldid=359911&mobileaction=toggle_view_mobile
www.grandtheftwiki.com
crawl=CC-MAIN-2017-17
20587
application/http; msgtype=response
sha1:AKMUDDVGOSZSIDHEAZ5SU2DCBJIT4PUH
<urn:uuid:927e6b42-3885-4aff-8066-6aa9026cbec0>
2017-04-28T04:46:53Z
104.28.28.92
sha1:QZNWPCVBAEWWNNQRMTY5HNBNDI2KPC5D
<urn:uuid:45dfdd32-c79f-456c-9059-cf297b105cf1>
http://www.grandtheftwiki.com/index.html?title=Help:Semantics&oldid=359911&mobileaction=toggle_view_mobile
length
response
<urn:uuid:965be686-3b59-4e03-ad52-68ea6cb0385e>
robots: classic
hostname: ip-10-145-167-34.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2017-17
operator: CommonCrawl Admin
description: Wide crawl of the web for April 2017
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf