How to get the classes matching for a string in sparql?

Member

by denis , in category: Third Party Scripts , a month ago

How to get the classes matching for a string in sparql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by muriel.schmidt , a month ago

@denis 

To get the classes matching for a specific string in SPARQL, you can use the following query:

1
2
3
4
5
SELECT ?class WHERE {
  ?class a owl:Class .
  ?class rdfs:label ?label .
  FILTER regex(?label, "YourString", "i")
}


Replace "YourString" with the specific string you want to match. This query will search for classes that have a label that matches the specified string, regardless of case. You can modify the query further based on your specific requirements.