Dear all;
I am trying to query the Arabic chapter of DBpedia. My query includes
some Arabic text, which I believe is the reason behind the failure of
my query.
Query in Java:
Literal literal = ResourceFactory.createLangLiteral("نيسابور", "ar");
Property property =
ResourceFactory.createProperty("http://ar.dbpedia.org/property/",
"label");
ParameterizedSparqlString queryString = new ParameterizedSparqlString("" +
"PREFIX pro: <http://ar.dbpedia.org/property/>\n" +
"SELECT DISTINCT ?book ?label WHERE {\n" +
"?book ?property ?label .\n" +
"} LIMIT 100");
System.out.println(queryString);
queryString.setParam("label", literal);
queryString.setParam("property", property);
QueryExecution qexec =
QueryExecutionFactory.sparqlService("http://ar.dbpedia.org/sparql",
queryString.asQuery());
The last line of this code throws an error:
Exception in thread "main" org.apache.jena.query.QueryParseException:
Encountered " <STRING_LITERAL2>
"\"\u0646\u064a\u0633\u0627\u0628\u0648\u0631\" "" at line 4, column
23.
Was expecting one of:
<VAR1> ...
<VAR2> ...
"from" ...
"where" ...
"(" ...
"{" ...
at org.apache.jena.sparql.lang.ParserSPARQL11.perform(ParserSPARQL11.java:101)
I tried to run the query using the sparql web interface:
Query:
PREFIX dbpar: <http://ar.dbpedia.org/property/>
SELECT DISTINCT ?book
WHERE
{ ?book dbpar:label "نيسابور"}
LIMIT 100
I tried setting the "Default Data Set Name (Graph IRI)" as, both,
"http://ar.dbpedia.org" and "http://dbpedia.org".
It runs successfully, but not results where returned, which should be
because there is a result in [1].
Please is there a problem with my query? or am I missing something?
Thank you.
[1] http://ar.dbpedia.org/page/صحيح_مسلم
*------------------------------------------------*
*Ahmed Ktob (PhD student)Beihang* *University (北京航空航天大学) *
*School of Computer Science and Engineering*
*Beijing , China*
*Tel : +86 134 2605 4970*
*------------------------------------------------*
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion