lvaudor / glitter

an R package which writes SPARQL queries
https://lvaudor.github.io/glitter
44 stars 5 forks source link

how to translate "a" in DSL #164

Open maelle opened 1 year ago

maelle commented 1 year ago

spq_add("?class a owl:Class")

lvaudor commented 1 year ago

Yes!!!! good find! I've stumbled upon this a few times (why no Issue? well I don't know... I think I might have tried to address this a looooong time ago before you even joined the project) by trying to enable the formulations "?class is owl:Class" or "?class==owl:Class" ). Plus, isn't that issue somehow related to spq_set?

maelle commented 1 year ago

a and is are special types of equals :thinking:

I agree about spq_set()

lvaudor commented 1 year ago

I was considering "a" and "is" just as some natural language because I couldn't find any property/verb actually corresponding to "is" in Wikidata or other ontologies. For instance, we regularly use wdt:P31 "is an instance of" as our most basic definition in our queries but regularly too, I have needed to replace this with an even more basic wdt:????? "is" without finding how to do (I just mean, it's kind of hard to think of "a" to identify this property). I'm sorry I know my explanations are probably a little confusing!