| | 44 | |
| | 45 | == Example == |
| | 46 | |
| | 47 | With 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 | |
| | 59 | You 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 | |
| | 70 | If you want to query it, you can use a query like: |
| | 71 | |
| | 72 | {{{ |
| | 73 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
| | 74 | PREFIX text: <http://4store.org/fulltext#> |
| | 75 | SELECT ?x ?string |
| | 76 | WHERE { |
| | 77 | ?x text:dmetaphone "PS" ; |
| | 78 | rdfs:label ?string . |
| | 79 | } |
| | 80 | }}} |
| | 81 | |
| | 82 | Which will give: |
| | 83 | |
| | 84 | || '''?x''' || '''?string''' || |
| | 85 | || <a> || "foo bar, baz" || |