pkumod / gAnswer

A KBQA system based on DBpedia.
http://ganswer.gstore-pku.com
BSD 3-Clause "New" or "Revised" License
376 stars 98 forks source link

how to transfer SPARQL produced by GANWERS to standard SPARQL followed w3c #60

Open xqx1568 opened 3 years ago

xqx1568 commented 3 years ago

About question "How many official languages are spoken on the Seychelles?", I got a sparql from GANWERS: select COUNT(DISTINCT ?languages) where { ?languages \<type> \<Language>. \<Seychelles> \<language> ?languages. } LIMIT 3 But I got 403 code when I use gStore to query it. It is not a stantard SPARQL containing full prefix message. And I want to get a SPARQL followed w3c so that I can query it on other endpoint. Could you help me to solve this problem.

knightmarehs commented 3 years ago

GAnswer generates SPARQL w/o prefix for simplicity, which needs the data you stored in GStore don't have prefix too. If you want to change the SPARQL generation method, please refer to the code in src/rdf/Sparql.java.