Changes between Version 3 and Version 4 of TextIndexing


Ignore:
Timestamp:
21/02/11 10:40:31 (2 years ago)
Author:
swh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TextIndexing

    v3 v4  
    4242 
    4343Some examples of the text indexing, and how to query it are shown here: http://theno23.livejournal.com/17658.html 
     44 
     45== Example == 
     46 
     47With the config file above, and the following data: 
     48 
     49{{{ 
     50@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 
     51@prefix text: <http://4store.org/fulltext#> . 
     52@prefix ex: <http://example.org/text#> . 
     53 
     54<a> rdfs:label "foo bar, baz" . 
     55<b> ex:token "Foo bar, baz" . 
     56<c> ex:stem "Foos, bar, baz's" . 
     57}}} 
     58 
     59You will get the these triples. 
     60 
     61{{{ 
     62<a> rdfs:label "foo bar, baz" ; 
     63    text:dmetaphone "F", "PR", "PS" . 
     64<b> ex:token "Foo bar, baz" ; 
     65    text:token "bar", "baz", "foo" . 
     66<c> ex:stem "Foos, bar, baz's" ; 
     67    text:stem "bar", "baz", "foo" . 
     68}}} 
     69 
     70If you want to query it, you can use a query like: 
     71 
     72{{{ 
     73PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
     74PREFIX text: <http://4store.org/fulltext#> 
     75SELECT ?x ?string 
     76WHERE { 
     77  ?x text:dmetaphone "PS" ; 
     78     rdfs:label ?string . 
     79} 
     80}}} 
     81 
     82Which will give: 
     83 
     84|| '''?x''' || '''?string''' || 
     85|| <a> || "foo bar, baz" ||