Dev8D

STAG Logo Semantic Tags

Mark Borkum, Nick Catto, Sam Easterby-Smith

Watch the screen-cast!

Try it now!

A prototype Query Tool for the Semantic Tag Processor Service has been implemented using HTML, JavaScript and Perl.

Query Tool

Use the + and - buttons to modify the number of tags in the query, then click the Submit Query button.

The Query Tool has been preloaded with 3 tags that describe an experiment:

  1. L-ascorbic acid
  2. InChI=1/C6H8O6/c7-1-2(8)5-3(9)4(10)6(11)12-5/h2,5,7-10H,1H2/t2-,5+/m0/s1
  3. UoS:27:1005
  1. Name of the chemical substance
  2. IUPAC International Chemical Identifier (InChI) for the chemical substance (see Use Case 2)
  3. Location of the experiment within University of Southampton (see Use Case 3)

What is a Semantic Tag?

A Semantic Tag is a collection of filters that transforms "regular tags" into RDF triples.
When a "regular tag" is filtered by a Semantic Tag, it is substituted into a template by the Semantic Tag Processor Service (Figure 1).

Semantic tag use
Figure 1: "My Blog Post" with embedded RDF metadata

Use Case 1: Automatic generation of RDF metadata using a REST interface
A participant of a recent happiness-enhancing event has authored an XHTML article on the Internet ("My Blog Post"). The article is tagged with the following keywords: "dev8D", "tagging", "Semantic Web", "Web 2.0". Before the article is published, the Content Management System (CMS) that hosts the article issues a request to the Semantic Tag Processor Service. The results of all matching Semantic Tags (a bag of RDF sub-graphs) are combined to form a single RDF document. The CMS embeds the RDF document into the XHTML content of the article (Figure 1).

How does it work?

A Semantic Tag contains a manifest of Regular Expressions and Templates (Figure 2). Each Semantic Tag is published as a URL that can be dereferenced as a REST end-point. Finally, the Semantic Tag contains metadata for use by search and metadata harvesting protocols.

entity-relationship diagram
Figure 2: Entity-relationship diagram for prototype Semantic Tags implementation

Use Case 2: Extraction of Chemical Information to enhance search and retrieval
A Chemistry researcher creates a new page in their Electronic Laboratory Notebook (ELN) to describe their day's work - an experiment involving a vile of boiling water. The page is tagged with the keywords: "water" and "InChI=1/H2O". The second tag is an IUPAC International Chemical Identifier (InChI) - a textual identifier for chemical substances.

regular expression for inchi code
Figure 3: Regular expression and RDF/XML template for IUPAC International Chemical Identifiers

The ELN issues a request to the Semantic Tag Processor Service. The ELN uses the RDF response to index the page and according to the formulas of the chemical substances used during the experiment (Figure 3). Finally, the ELN uses the response to retrieve additional Chemical Information from PubChem.

Paperless Prototypes

STagMonger 3000 - Mac OS X Widget (Query Tool)

Click here to download the STagMonger 3000

The STagMonger 3000 widget for Mac OS X (Figure 4) was prototyped using Dashcode during the dev8D event. The front view of the widget contains a text input. The content of the text input is used to generate a request to the Semantic Tag Processor Service. The response to the query is processed by the widget and rendered as a table. The back view of the widget can be used to obtain the original RDF/XML content of the response.

stagmonger widget
Figure 4: StagMonger 3000 widget for Mac OS X

Semantic Tag Authoring Tool

The Semantic Tag Authoring Tool is an Internet-enabled application for creating and modifying Semantic Tags.

The application provides a graphical user interface with a single window (Figure 5). The window provides a menubar (and toolbar) with the following functions:

STAG mockup
Figure 5: Semantic Tag Authoring Tool mock interface

Use Case 3: Creating a custom Semantic Tag using a graphical user interface
The ECS URI System Specification describes entities and relationships within the domain of a higher education institution. The specification is published as an OWL ontology.

The ontology defines a "Location" entity that can be referenced using a unique URI:
http://rdf.ecs.soton.ac.uk/location/campus/building/room
http://rdf.ecs.soton.ac.uk/location/UoS/27/1005

Please note: This sequence assumes that resources contain tags of the following format: B27:R1005

  1. Load the application
  2. Click the "New" button
  3. Type one or more examples of tags in the "Enter URN" text input box ('B27:R1005')
  4. Create a Capture Group for the "building" component:
    • Click the "Capture Another Element" button. The new capture group is assigned a distinct colour.
    • Type the name of the Capture Group into the text input box ('Building')
    • Drag and drop the "[" and "]" markers to enclose the target fragment ('27')
    • Select an "Element Type" (number, letter, float, etc.) or type a custom regular expression into the text input box
  5. Create a Capture Group for the "room" component (repeat Step 4.)

Future Work

Web Services and REST

Design a platform-agnostic specification for the Semantic Tag Processor Service (Figure 6). The service will be exposed using WSDL and REST.

overview diagram
Figure 6: Overview of architecture for decentralised Semantic Tags platform

Additional Metadata and Provenance

Record additional metadata about the life-cycle of the Semantic Tag, including:

Team "Flaming" HenSoft

hensoft logo