Version 15.1 by Jerome on 2010/12/06 12:59

cog
TypeOther
Category
Developed byUnknown
Rating
0 Votes
LicenseUnknown

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

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

Compile the api using ant jar to generate your libs. Add the zemanta-api jars to to the webapps/xwiki/WEB-INF/lib folder in the XWiki platform.

  • Apply the patch for XWiki Enterprise: override the tags.js file in the webapps/xwiki/resources/uicomponents/viewers/ folder and also the documentTags.vm and htmlheader.vm template files in webapps/xwiki/templates.
  • Copy the component jar to the webapps/xwiki/WEB-INF/lib folder in the XWiki platform
  • Start the server ./start_xwiki.sh
  • (Optional) Install the Semantic Tagging XWiki Application.
Tags:
    

Get Connected