cogExtends the tagging mechanism of the XWiki Platform
TypeOther
Category
Developed by

Oana Florea, Anna-Maria Metzak

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

The Semantic Tagging XWiki component enriches the tagging mechanism for the XWiki Platform using the Zemanta content recommendation tool and the DBpedia knowledge base.

How to use it

The Semantic Tagging component can be used from a velocity script for example:

#set($suggestedList = $tagger.getSuggestions("get suggestions for this text"))
#foreach($suggestedTag in $suggestedList)
  #set($ok = $tagger.fetchFirstSemanticDetail($suggestedTag))
  #set($details = $suggestedTag.getSemanticDetails())
 <li>
   <a class="suggested-tag" href="#">$suggestedTag.name</a>
   <span class="suggested-tag-info" style="display: none">$details.get(0).getDescription()
    #if("$details.get(0).getUri()" != "")
     <br/><a href="$details.get(0).getUri()">Visit</a>
    #else
      $msg.get("semtags.nodetails")
    #end
   <div id="more-at">$msg.get("semtags.poweredBy")<a href="http://www.dbpedia.org"><img src='$dbpediaImg' alt="Dbpedia"/></a></div></span>
 </li>
#end

The Semantic Tagging application is a use case for this component.

You can find more details about the project in this article: Semantic Tagging for the XWiki Platform with Zemanta and DBpedia.

Prerequisites & Installation Instructions

The Zemanta API allows a maximum of 1000 calls/day. 

Installation Guide: 

  • Download the Zemanta API for Java from http://developer.zemanta.com.
  • Compile the API using ant jar to generate your libs. Add the zemanta-api JARs to the webapps/xwiki/WEB-INF/lib folder in your XWiki instance.
  • Apply the following patch for XWiki Enterprise:
    • Override the tags.js file in the webapps/xwiki/resources/uicomponents/viewers/ folder with the tags.js file provided in the ZIP download
    • Override the documentTags.vm and htmlheader.vm template files in webapps/xwiki/templates with the corresponding files provided in the ZIP download.
  • Copy the xwiki-semtag-component JAR to the webapps/xwiki/WEB-INF/lib folder in your XWiki instance.
  • Start XWiki
  • (Optional) Install the Semantic Tagging XWiki Application.
Tags:
Created by Oana Florea on 2010/03/21 23:05
    

Get Connected