Owlready2 - SPARQL queries - FILTER LANGUAGE

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Owlready2 - SPARQL queries - FILTER LANGUAGE

chituan01
Hi,

I tried the following code on Google Colab but it returned nothing. On the other hand, I also tried it on SPARQL queries in Protege and it returned the result correctly as I expected.

SELECT DISTINCT (STR(?y1) AS ?class)
{?x1 a owl:Class.  
?x1 rdfs:label ?y1.
FILTER(LANGMATCHES(LANG(?y1),"en"))}

I don't know why this happened. Any comments are welcome.
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Owlready2 - SPARQL queries - FILTER LANGUAGE

Jiba
Administrator
Hi,

Indeed, the implementation of LANGMATCHES was wrong.

I fixed that in the development version on BitBucket.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Owlready2 - SPARQL queries - FILTER LANGUAGE

chituan01
Hi,

Thank you for your support.
Have a great day.

Anh-Chi Tuan