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
Release history Release notifications | RSS feed
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)
Built Distribution
dl2sparql-0.0.1-py3-none-any.whl
(62.4 kB
view hashes)
Close
Hashes for dl2sparql-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c6529ef900969680960cad3fc0a721e17beaae92b6744a88b8558a311deff8 |
|
MD5 | 803c642fd7d42d0af891a89e1a8c234c |
|
BLAKE2b-256 | b8fe7b2f6a3f978040da69e08f451fa5ce10c244fd0915312108aa289d7da7fa |