User:Yury Katkov/s13n stands for semantification

From semantic-mediawiki.org
Jump to: navigation, search

Semantification is the process of making all kinds of data in the wiki (e.g. meta data, statistical data, history data, user data) accessible via SMW #ask queries. It's not yet possible in Semantic MediaWiki, so here is the feature proposal.

Use cases

Here are some examples (none of these queries are now possible) on what can be possible if the data is semantified.

s13n of history data

Show me all revisions made by people that knows biology and old enough (this is actually possible with the Semantic History extension but the way they made s13n is very rude)

{{#ask:
[[Category:Revision]]
[[Author::<q>[[Age::>15]] [[knows::Biology</q>]]
|?Author
|?Time
}}

s13n of ranking\voting data

Shows the bubble chart of engineering articles where the biggest bubble is the most voted article:

{{#ask:
[[Category:Engineering]]
|?Average vote
|format=bubble chart
|size of bubles property=Average vote
}}

s13n of commenting (e.g. Liquid Threads)

Sort all the engineering articles my amount of comments for them:

{{#ask:[[Category:Engineering]][[amount of comments::+]]
|sort=amount of comments
}}

s13n of user\social data

Show all the persons that have Moderator permissions in the Wiki

{{#ask:[[Category:Person]] [[Role::Moderator]]
|format=graph
}}

s13n of viewing statistics

{{#ask:[[Category:Flowers]]
|sort=Viewing times}}

s13n of approved revisions

Show me all processes with approval meta data

{{ #ask:[[Category:Process]]
  |?Approved By
  |?Approval Timestamp
  |?Approved Revision
  |?RevisionID
  |?RevisionUser
}}

Show me all processes that are not yet approved (will be hard to do if there's no default value, e.g. for Approved By)

{{ #ask:[[Category:Process]][[Approved By::Nobody]]
  |?RevisionID
  |?RevisionUser
}}

Current approaches to s13n

There are some amount of semantified extensions: Semantic History, Semantic Social Profile. The methods of s13n they're currently using are quite unstable and looks like hacks:

  • add some amount of wiki-markup to the article (for example [[average vote::5.7]])
  • create a lot of wiki pages to store the semantic data (Semantic History creates one page per each revision)
  • create phantom properties and update them each time the data in the store is updated

These approaches are bad, because:

  • it's duplication of already existing data
  • it creates garbage in the wiki that can annoy or puzzle the authors
  • it make impossible the write access control for the semantified data (consider for example voting)

The other approach is to create phantom/virtual properties programmatically. This is done in Semantic Extra Special Properties, Semantic Article Feedback.

An extension is hooked to the hooks in SMW:

$wgHooks['smwInitProperties'         ][] = 'SemanticESP::sespInitProperties';
$wgHooks['SMWStore::updateDataBefore'][] = 'SemanticESP::sespUpdateDataBefore';

In the first hook smwInitProperties the extension initializes all properties in SMWStore, in the second the actual property values are created.

The main drawbacks here is the duplication and the dependency of the page update (which will cause updateDataBefore)

Request to the developers

Creating the tools (e.g. hooks, programming interfaces) that can ease the s13n of the data that is not stored on wiki pages. Intuitively it seems that the right approach is to store the data where it has been stored originally and create some hooks in SMW core to access it.

See Also