Skip to main content

Description Logic Concept to SPARQL query

Project description

DL2SPARQL: Description Logic Concept to SPARQL Query

Installation

conda create -n dl2sparql python=3.9 --no-default-packages && conda activate dl2sparql
pip3 install pytest
pip3 install pandas
pip3 install parsimonious
pip3 install rdflib
# To test it
pytest tests
from dl2sparql import DescriptionLogicConcept, SPARQLQuery
ce_str = "∃hasChild.Male"
concept = DescriptionLogicConcept(dl_str="∃hasChild.Male", namespace="http://www.benchmark.org/family#")
query = SPARQLQuery(dl_concept=concept)
"""
SELECT
 DISTINCT ?x WHERE { 
?x a <http://www.w3.org/2002/07/owl#NamedIndividual> . 
?x <http://www.benchmark.org/family#hasChild> ?s_1 . 
?s_1 a <http://www.benchmark.org/family#Male> . 
 }
"""

For any questions or wishes, please contact: caglar.demir@upb.de or caglardemir8@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dl2sparql-0.0.1.tar.gz (54.5 kB view hashes)

Uploaded Source

Built Distribution

dl2sparql-0.0.1-py3-none-any.whl (62.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page