Skip to main content

Powerful [R2]RML engine to create RDF knowledge graphs from heterogeneous data sources.

Project description

morph

License DOI Latest PyPI version Python Version PyPI status build Documentation Status Open In Colab

Morph-KGC is an engine that constructs RDF knowledge graphs from heterogeneous data sources with the R2RML and RML mapping languages. Morph-KGC is built on top of pandas and it leverages mapping partitions to significantly reduce execution times and memory consumption for large data sources.

Features :sparkles:

Documentation :bookmark_tabs:

Read the documentation.

Tutorial :woman_teacher:

Learn quickly with the tutorial in Google Colaboratory!

Getting Started :rocket:

PyPI is the fastest way to install Morph-KGC:

pip install morph-kgc

We recommend to use virtual environments to install Morph-KGC.

To run the engine via command line you just need to execute the following:

python3 -m morph_kgc config.ini

Check the documentation to see how to generate the configuration INI file. Here you can also see an example INI file.

It is also possible to run Morph-KGC as a library with RDFLib and Oxigraph:

import morph_kgc

# generate the triples and load them to an RDFLib graph
g_rdflib = morph_kgc.materialize('/path/to/config.ini')
# work with the RDFLib graph
q_res = g_rdflib.query('SELECT DISTINCT ?classes WHERE { ?s a ?classes }')

# generate the triples and load them to Oxigraph
g_oxigraph = morph_kgc.materialize_oxigraph('/path/to/config.ini')
# work with Oxigraph
q_res = g_oxigraph.query('SELECT DISTINCT ?classes WHERE { ?s a ?classes }')

# the methods above also accept the config as a string
config = """
            [DataSource1]
            mappings: /path/to/mapping/mapping_file.rml.ttl
            db_url: mysql+pymysql://user:password@localhost:3306/db_name
         """
g_rdflib = morph_kgc.materialize(config)

License :unlock:

Morph-KGC is available under the Apache License 2.0.

Author & Contact :mailbox_with_mail:

Ontology Engineering Group, Universidad Politécnica de Madrid.

Citing :speech_balloon:

If you used Morph-KGC in your work, please cite the SWJ paper:

@article{arenas2024morph,
  title     = {{Morph-KGC: Scalable knowledge graph materialization with mapping partitions}},
  author    = {Arenas-Guerrero, Julián and Chaves-Fraga, David and Toledo, Jhon and Pérez, María S. and Corcho, Oscar},
  journal   = {Semantic Web},
  year      = {2024},
  volume    = {15},
  number    = {1},
  pages     = {1-20},
  issn      = {2210-4968},
  publisher = {IOS Press},
  doi       = {10.3233/SW-223135}
}

Sponsor :shield:

BASF

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

morph_kgc-2.9.0.tar.gz (244.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morph_kgc-2.9.0-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

Details for the file morph_kgc-2.9.0.tar.gz.

File metadata

  • Download URL: morph_kgc-2.9.0.tar.gz
  • Upload date:
  • Size: 244.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for morph_kgc-2.9.0.tar.gz
Algorithm Hash digest
SHA256 39d06525b74449b7377372c702456063b9886676c0466f14ed489ef8a9f65952
MD5 001161b3a80c064c6f0dd8e314abb4cd
BLAKE2b-256 6f00faae6bf7e92766e10f9d340a258e09e50d11144bbfd3faeea9f99ef1b8fd

See more details on using hashes here.

File details

Details for the file morph_kgc-2.9.0-py3-none-any.whl.

File metadata

  • Download URL: morph_kgc-2.9.0-py3-none-any.whl
  • Upload date:
  • Size: 70.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for morph_kgc-2.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28e7fe8b2bd26cc29c3ade88a0032b5562274ac61a1b1ef6e9fc41cfc97791d0
MD5 e36685ce3529d28685fc329fd7511d86
BLAKE2b-256 00c9bae28fc0f33b915df7319f8f24da74982896bc1b823224ab58c045009544

See more details on using hashes here.

Supported by

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