Extension:Semantic MediaWiki Graph

From MediaWiki.org
Jump to: navigation, search


MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Semantic MediaWiki Graph

Release status:Extension status beta

ImplementationTemplate:Extension#type Ajax, Special page
DescriptionTemplate:Extension#description Visualize Semantic Information in a Force-directed graph
Author(s)Template:Extension#username Tobias Wellertalk
Latest versionTemplate:Extension#version 1.0.1 (27.03.2017)
MediaWikiTemplate:Extension#mediawiki 1.23+
PHPTemplate:Extension#php 5.3+
LicenseTemplate:Extension#license Apache License 2.0
Download Link to external source

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

Check usage and version matrix.

The Semantic MediaWiki Graph extension visualises the semantic information of any Semantic MediaWiki page. The extension uses Force directed Graph from d3 to visualize the semantic information in a two-dimensional space.

Installation[edit]

The Semantic MediaWiki extension must be installed in order to use this extension.
  • Download, extract and place the file(s) in a directory called SemanticMediaWikiGraph in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/SemanticMediaWikiGraph/SemanticMediaWikiGraph.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


Usage[edit]

Semantic MediaWiki Graph is a Special Page under the group Semantic MediaWiki. In the initial screen of the extension, type in any wiki page (see figure). The extension preloads wiki pages and suggests pages, based on the input. Category and Property pages are not preloaded. Only pages from the Main Page namespace.However, every wiki page can be used as input in order to visualise the structured information. After a click on ok, the extension loads the structured information about the wiki page and visualises them in a force directed Graph.

SMWGraph marked.png


Move Nodes[edit]

Nodes can be draged/droped. Currently, the gravitiy, friction and charge are defined in the source code. However, one could also allow users to change the behaviour of the graph (if wished by users) in the browser. Nodes can only be moved within the given box.


Clicking on Nodes[edit]

Clicking on a node, which is of type Internal Link, will include the structured information of the the corresponding wiki page in the graph (see figure). The clicked node itself will become the new focused node (big bubble). Clicking on a node which were already clicked, will lead to nothing. However, part of future work, is to minimize the structured information in the graph of this node.


Clicking on Texts[edit]

The text on the nodes corresponds to the assigned values of the properties. The texts on the edges corresponds to the name of the properties. By clicking on the text of a node, a new window appears with the corresponding link, but only if it's a internal wiki link or an external link. So clicking on a number of date, which is no wiki page, will not lead to a redirect in a new window.

Currently, clicking on the text of an edge will not lead to a redirect in a new window. This feature is part of future work (see below).


Clicking on the Legend[edit]

Clicking on a bubble of the Legend will hide/unhide all nodes of this certain corresponding type. The Legend will have unfilled bubbles of hidden node types. Hovering over the bubble will illustrate the corresponding nodes in the diagram (if not hidden).


Colors[edit]

The colors are currently fixed in the source code. The colors of the nodes depend on the type of node.If wished by the users, one could also include different stylings or allows users to define the colors. The colors of the nodes are given in the following:

Data Type of Node Color Hex Color
Internal Link #1f77b4
Category #071f55
URI #17a8cf
Telephone #13d1e3
Email #75d3dd
Number #2ca02c
Quantity #114911
Temperature #b6e75a
Monolingual Text #f2cd0c
Text #ff7f0e
Code #b37845
Boolean #d62728
Date #d62790
Record #8927d6


Known issues[edit]

  • 2016/12/20: Hiding different node types can lead to visualising a link but without the corresponding node
  • 2017/06/1: If 2 nodes have triangle-type connection, it will duplicate a node without connection

Future Work[edit]

  • Minimize the nodes again if clicked on an already expanded node
  • Open Property wiki page by clicking on the corresponding property


Remarks[edit]

  • 2016/12/22: Frame for Force-directed graph adjusts on window size
  • 2016/12/22: Zooming is now possible

See also[edit]

Link to authors


Link to information pages
  • AIFB (KIT): Institute of Applied Informatics and Formal Description Methods