English 中文(简体)
sparql - regex 不工作为不区分大小写
原标题:sparql - regex doesn t work as case insensitive
  • 时间:2012-05-25 14:13:43
  •  标签:
  • sparql

I m using SemWeb.Sparql.dll in C# to execute some queries in sparql via C# I need to compare a given string variable to string in my ontology (rdfs:label) but i need this compare case insensitive ,so I used the regex function. I used this query:

disease = " ^" + disease + " ";
string query = prefixes + @"
               Select ?a ?name Where{
               ?a ?c owl:Class .
               ?a rdfs:label ?name.
               FILTER (Regex(?name," + @disease + ", i ))}";

在某些情况中工作得当,而在另一些情况中工作得当。 任何人都可以帮助我。

问题回答

能否尝试一下:

FILTER (regex(str(?name), ...

str () () 中, 折叠 ? name 。 这将确保第一个参数是一个字符串 。





相关问题
SPARQL xsd:dateTime equality

I have a SPARQL query: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX person: <http://www.myOntDomain/person#> PREFIX likedEvent: <http://www.myOntDomain/likedEventRule#...

SPARQL queries for Pizza ontology

i have to use ROWLKit http://www.dis.uniroma1.it/quonto/?q=node/30 (1) can anybody suggest two sparql queries for the Pizza.owl ? (2) is this query valid ? PREFIX rdf: <http://www.w3.org/1999/02/...

Usage of MongoDB as a RDFStore for data objects

Is there any tool to query MongoDB using SPARQL ? I store object using an RDF schema (boo Mongo no schema ^^), and now i looking for a tool/server to query the datastore using SPARQL. I started to ...

SPARQL query language tag weirdness

This works: SELECT * WHERE{ ?x rdfs:label "Chalti Ka Naam Gaadi"@en . ?x foaf:name ?z . } (Results on DBpedia SPARQL Explorer) This doesn t: SELECT * WHERE{ ?x foaf:name "Chalti Ka Naam Gaadi" ...

Question on RDF and how thisweknow.org works

I was reading through this question What s a RDF triple? and the excellent answers to it. Roger Federer | won | wimbledon I understand that the above sentence is a triplet. But if the ...

Defining cardinality for a RDF statement

Im having a problem with RDF. I have a couple of triples defined as : <User rdf:about="#T"> <hasName rdf:datatype="http://www.w3.org/2001/XMLSchema#string">T</hasName> <...

Pick and RDF/SPARQL

Anyone have any interest in intergrating RDF and/or SPARQL with a PICK database? Has anyone tried this yet? I have some thoughts about what to try. One idea is to figure out how to create a file with ...

Problem with SPARQLWrapper (Python)

I m making a SPARQL query against the Sesame store in localhost, using SPARQLWrapper: sparql = SPARQLWrapper( http://localhost:8080/openrdf-sesame/repositories/rep/statements ) sparql.setQuery(...

热门标签