W3C home > Mailing lists > Public > public-lod@w3.org > April 2014

Re: DBLP Sparql Endpoint

From: Alfredo Serafini <seralf@gmail.com>
Date: Fri, 4 Apr 2014 11:34:23 +0200
Message-ID: <CADawF4O-zYzKsk5qSp-5ODJTu0FuN25RzvMKxinQhRcOPkDDdA@mail.gmail.com>
To: Wetz Peter <peter.wetz@tuwien.ac.at>
Cc: "public-lod@w3.org" <public-lod@w3.org>
Hi for me seems to work, for example using instead:

SELECT DISTINCT * WHERE {
?a a foaf:Agent .
?a foaf:name ?n .
FILTER  regex(?n, '^(.+\\s+)*b', 'i')
}
LIMIT 10

I obtain as the first threee results the following ones:
"(Zhou) Bryan Bai"
"A-Reum Bae"
"A. A. (Louis) Beex"

If you want to work with surname the problem is related to the fact that
all the data (name, surname) are in the foaf:name field, so that the only
way seems to use a more specific regex, for example excluding the first
part which can be something like "A. ", "B. A." or similar...




2014-04-04 10:11 GMT+02:00 Wetz Peter <peter.wetz@tuwien.ac.at>:

>  Dear all!
>
>
>
> I would like to use the DBLP Sparql Endpoint at [1] to retrieve
> publications of authors by REGEX Search. This, however, seems not to work
> as expected.
>
>
>
> This query returns authors starting with an “A”:
>
>  SELECT DISTINCT * WHERE {
>
> ?a a foaf:Agent .
>
> ?a foaf:name ?n .
>
> FILTER  regex(?n, '^a', 'i')
>
> }
>
> LIMIT 10
>
>
>
> This query should return authors starting with a “B”:
>
>
>
> SELECT DISTINCT * WHERE {
>
> ?a a foaf:Agent .
>
> ?a foaf:name ?n .
>
> FILTER  regex(?n, '^b', 'i')
>
> }
>
> LIMIT 10
>
>
>
> This does not return any results, and I don’t know why. Actually, it’s not
> working with any other letter except “A”. What I simply want to do is, to
> search for authos based on an input string.
>
>
>
> Maybe, somone of you can help.
>
>
>
> Thanks in advance,
>
> Peter
>
>
>
> [1] http://dblp.l3s.de/d2r/snorql/
>
Received on Friday, 4 April 2014 09:34:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:22:06 UTC