Home > lewist, semantic, Work > Semantic Progress

Semantic Progress

January 29, 2010

Got lucene search function working in Jena finally, having figured out where my bugs were. Now possible to freetext search literals and get back RDF of subject referring to that literal, or any other construct

At http://uoccou.endofinternet.net:2020/lewist.html do this :

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX muo: <http://purl.oclc.org/NET/muo/muo#>
PREFIX lew: <http://purl.org/uoccou/lewist/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX geonames: <http://www.geonames.org/ontology#>
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ucum: <http://purl.oclc.org/NET/muo/ucum/unit/length/>
PREFIX wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX list: <http://jena.hpl.hp.com/ARQ/list#>
PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
CONSTRUCT { ?s ?prop ?lit }
WHERE { ?lit apf:textMatch '+"Board of First Fruits"' . 
 ?doc ?p ?lit .
 ?s ?prop ?doc

Next steps are to create my own extension function to search across both ontology and text, and group results.

  1. azhar
    May 28, 2010 at 2:49 pm

    Can you explain how you made Joseki pass through the free text search SPARQL to ARQ? I’ve generated my Lucene indexes but now need to modify Joseki to enable ARQ’s free text functionality. Any tips/ code you can share will be appreciated..

    • uoccou
      May 28, 2010 at 6:31 pm

      Hi – simple enough – all I do is generate a sparql query and ajax that over to joseki’s sparql endpoint. The sparql query should have a triple like this :

      • ?Match apf:textMatch 'your-query-term'

      ?Match will then contain the result(s) of the index lookup.

  1. No trackbacks yet.
Comments are closed.
%d bloggers like this: