On 07/12/11 09:01, Jérôme wrote:
Le 06/12/11 20:54, Andy Seaborne a écrit :
On 6 December 2011 15:44, Jérôme<[email protected]> wrote:

Thank you Andy,

it was the cost of serializing and deserializing.

My second problem (yes, i have another one ;-) ) is:

By the way - replying to unrelated threads and changing the subject risks
you email not being seen. I, for one, don't always check threads that I'm
not involved in.
Yes, i am sorry. But when i wrote this e-mail, i thought the subject
"fuseki query performance" was appropriate...

My email client (thunderbird) uses the "In-Reply-To:" field to organise threads.


try

SELECT ?Response
WHERE
{
?Response rdf:type<http://www.tei-c.org/ns/1.0#p> .
?Objet_1 rdf:type<http://example.com#word> .
?Objet_1 ram:contents ?Objet_1_content .
FILTER (regex(?Objet_1_content,"example")
&& regex(?Objet_1_content,"work") )
?Response ram:contains ?Objet_1 .
}

I think this query is not correct, because a word can't satisfy
"example" and "work" regexps.
Here a very simplified(much information is missing) example of data:
<paragraph>
[...]
</paragraph>

<paragraph>
<word>
<contents>this</contents>
</word>
<word>
<contents>work</contents>
</word>
<word>
<contents>is</contents>
</word>
<word>
<contents>an</contents>
</work>
<word>
<contents>example</contents>
</work>
</paragraph>

<paragraph>
[...]
</paragraph>

That's why i have to use 2 different objects in my example query: a
paragraph with the word "example" and with the word "work" -
Is not it?

Not including the "rdf:type <http://example.com#word>" is going to help, possibly greatly, because the checking adds nothing.

Sicne it's the same ?Objet that's of interest (as I understand the problem) then use it once in the query but get the content twice and test.

{
  ?Response ram:contains ?Objet .
  ?Objet ram:contents ?x .
  FILTER(regex(?x,"example")
  ?Objet ram:contents ?y .
  FILTER(regex(?y,"help")
}

A different approach would to try LARQ and have a free-text index for your content.

        Andy


Thank you.
Jérôme

Reply via email to