Extension:Semantic Need

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg
Semantic Need

Release status:Extension status unmaintained

ImplementationTemplate:Extension#type User interface, Special page, Database
DescriptionTemplate:Extension#description Semantics from the people: guiding Semantic MediaWiki annotations
Author(s)Template:Extension#username Hans-Jörg Happel (hhappeltalk)
Latest versionTemplate:Extension#version 1.0 (2012-04-27)
MediaWikiTemplate:Extension#mediawiki 1.17+
LicenseTemplate:Extension#license GPL
Download
ExampleTemplate:Extension#example amazonas.fzi.de

Translate the Semantic Need extension if it is available at translatewiki.net

Check usage and version matrix.

Overview[edit]

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/Installation[edit]

  • 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-Core[edit]

  • 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-Ext[edit]

  • 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 Information[edit]

Download[edit]

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

Examples[edit]

for SNE-Core[edit]

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

  • initial state
Page state Query state
Semanticneed nigeria.png Query.png
  • queries update immediately when constraint restrictions are met (in this case [[Category:Country]])
Page state Query state
Semanticneed nigeria1.png Semanticneed query1.png


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

for SNE-Ext[edit]

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

Semanticneed toolboxlink.png

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

Semanticneed snebox.png

  • Overview of all logged queries

Semanticneed asklog.png

  • Description of a query

Semanticneed queryinfo.png

  • Description of a wikipage

to be added


Acknowledgements[edit]

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 also[edit]