Open main menu

Extension:Semantic Need

MediaWiki extensions manual
OOjs UI icon advanced.svg
Semantic Need
Release status: unmaintained
Implementation User interface, Special page , Database
Description Semantics from the people: guiding Semantic MediaWiki annotations
Author(s) Hans-Jörg Happel (hhappeltalk)
Latest version 1.0 (2012-04-27)
MediaWiki 1.17+
License GPL
Download
Example amazonas.fzi.de
Translate the Semantic Need extension if it is available at translatewiki.net
Check usage and version matrix.

Contents

OverviewEdit

Semantic Need gives you the opportunity to automatically analyze inline queries, subqueries and property chains and concepts and give you information about missing annotations in your wiki. This is accomplished by analyzing existing queries and the information they request from wikipages.

Requirements/InstallationEdit

  • Mediawiki 1.17 or greater (latest version tested with 1.18.2)
  • Semantic Mediawiki Extension 1.7 or greater
  • insert
include_once( "$IP/extensions/SemanticNeed-Core/SNECore.php" );
include_once( "$IP/extensions/SemanticNeed-Ext/SNE.php" );
$wgShowSneBox = true;

in your LocalSettings.php

  • insert
wfRunHooks('SMW_AskQueryExecution', array(&$query, &$context, &$format, &$res, 0, 0));

in SMWQueryProcessor.php's getResultFromQuery() function before both return statements

  • insert
$res = smwfGetStore()->getQueryResult($query);
wfRunHooks('SMW_AskQueryExecution', array(&$query, &$context, &$format, &$res, 0, 1));

in SMWConcept.php's render() function before the return statement

  • go to /Special:SNEAdmin to initialize the SemanticNeed database (and optionally scan the wiki for existing queries)

Description of SNE-CoreEdit

  • All logged queries throughout the wiki can update their result sets in real time after a wikipage's properties or categories have been edited.
  • Allows you to scan your wiki for existing queries after the database has been initialized through the Semantic Need administrator special page

Description of SNE-ExtEdit

  • SNE-Core needs to be installed
  • Link on the wiki sidebar to display description of the wikipage (1)
  • Toolbox that displays missing properties or categories in queries result sets (2)
  • Overview of all logged queries (as special page)
  • Description of a query (as special page)
  • Description of a wikipage with (1) (as special page):
    • queries that have this page as a result
    • constraints lacking on the page to be a result
    • list of categories and properties to have this page as a result (2)
    • list of categories and properties lacking in a query's result set (2)

if you don't want the SemanticNeed-Extension functionality don't add the

include_once( "$IP/extensions/SemanticNeed-Ext/SNE.php" );
$wgShowSneBox = true;

rows in your LocalSettings.php

Additional InformationEdit

DownloadEdit

Source code is available at https://waves1.fzi.de/svn/waves/trunk/SemanticNeed/ (User/Pass "anonymous").

ExamplesEdit

for SNE-CoreEdit

Query: {{#ask: [[Category:Country]] |?capitol |?Population}}

  • initial state
Page state Query state
   
  • queries update immediately when constraint restrictions are met (in this case [[Category:Country]])
Page state Query state
   


  • queries update immediately when printouts are added or changed (in this case |?capitol)
Page state Query state
   

for SNE-ExtEdit

  • Link on the wiki sidebar to display description of the wikipage

 

  • Toolbox that displays missing properties or categories in queries result sets

 

  • Overview of all logged queries

 

  • Description of a query

 

  • Description of a wikipage

to be added


AcknowledgementsEdit

Development of Semantic Need is partially funded by the Landesstiftung BW in the context of project GlobaliSE. Semantic Need has been developed by FZI Germany and Hans-Jörg Happel. We thank those external developers and all contributors to the MediaWiki core and to Semantic MediaWiki and its related extensions.

See alsoEdit