Aldo Bucchi wrote:
Yrjänä,
String literals in predicates is not a very common practicality in
RDF. We only have full-text indexing on object values.
Hmm. Sorry for being sarcastic here. Subject and predicate values cannot
be literals in RDF statements. Just to be clear.
YOU ARE RIGHT and for all formal purposes the latter holds true.
However, bear in mind that when you get to the actual implementation
of these models it becomes evident that such design decision (
specially not allowing literals on the subject ) is questionable.
In fact there has been an ongoing discussion about whether to allow
this in a future version of RDF.
Indeed: this is the current formal definition as per W3C documentation
and may be subject to change. Albeit I am partially aware of the
argument for allowing literals in subject position, I've seen none for
allowing them in the predicate position.
I also wanted to publicly apologise Marvin for my rather stupid
sarcastic remark in the first reply, as it goes against the philosophy
and purpose of mailing lists such as these. We're all here to learn,
after all :)
SPARQL grammar, for example, allows literals on subject positions. And
all my RDF implementations allow it with looks to a future change in
the spec. I bet most DB implementors, such as OpenLink, have left the
door open too at a deeper level.
The restriction is not at all that obvious ;)
Anyway. Just to give you some context on why someone might refer to
this as something that is not "common" instead of not "possible".
I thank you for that insight.
Best regards,
Yrjänä
Best,
A
On Mon, Dec 1, 2008 at 12:14 PM, Yrjänä Rankka <gh...@zonk.net> wrote:
Yrjänä Rankka wrote:
Marvin Lugair wrote:
Hi all!
This is more for the virtuoso folks but still cc-ing dbpedia.
Please give us some input if you can answer these questions:
I am trying text search in virtuos from isql against a locally loaded
dbpedia.
*QUESTION ONE*
Why does bif:contains return faster than REGEX search, and why are
they returning a different number of counted rows? The search string
is not the real string but it does not change the question. Which
should we use?
Marvin,
Actually question one seems to be two questions
1. bif:contains uses Virtuoso's full-text indexing capability which is
a much faster method than comparing each ?o using regex pattern.
2. regex filter and bif:contains have different pattern syntax and
thus have different matches.
(1) searching with with regex
SQL> sparql select count(*) where { ?s ?p ?o . FILTER regex(?o ,
"searchstring", "i")};
callret-0
INTEGER
_____________________________________________________________________________
4344
1 Rows. -- 3895755 msec.
(2) searching with bif:contains
SQL> sparql select count(*) where {?s ?p ?o. ?o bif:contains
"searchstring"};
callret-0
INTEGER
_______________________________________________________________________________
20737
1 Rows. -- 208426 msec.
*Question 2*
Why can't I search a property or subject?
SQL> sparql select count(*) where {?s ?p ?o. ?p bif:contains
"searchstring"};
*** Error 37000: [Virtuoso Driver][Virtuoso Server]SQ074: Line 1:
SP031: SPARQL compiler: The group does not contain triple pattern
with '$p' object before bif:contains() predicate
at line 1 of Top-Level:
sparql select count(*) where {?s ?p ?o. ?p bif:contains "searchstring"}
String literals in predicates is not a very common practicality in
RDF. We only have full-text indexing on object values.
Hmm. Sorry for being sarcastic here. Subject and predicate values cannot
be literals in RDF statements. Just to be clear.
Yrjänä
Please see
http://docs.openlinksw.com/virtuoso/rdfsparqlrulefulltext.html for
more info.
Yrjänä
THANKS!
Marv
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dbpedia-discussion mailing list
dbpedia-discuss...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
--
Yrjänä Rankka (gh...@zonk.net)
Grand Praetor of Excruciations - ZONK.NET Propaganda HQ
ZONK.NET - Advancing the Thermal Death of the Multiverse Since 1998
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users
--
Yrjänä Rankka (gh...@zonk.net)
Grand Praetor of Excruciations - ZONK.NET Propaganda HQ
ZONK.NET - Advancing the Thermal Death of the Multiverse Since 1998