Skip to main content

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

Metadata

Release files for morph-kgc 2.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for morph-kgc 2.10.0
File Size Uploaded
morph_kgc-2.10.0.tar.gz 257.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for morph-kgc 2.10.0
File Interpreter ABI Platform
morph_kgc-2.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 329.8 kB

Release files / morph_kgc-2.10.0.tar.gz

Download URL morph_kgc-2.10.0.tar.gz
Size 257.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a8d01d4c2118821ed46490bc6445d0d06f0f5dd23e29eeeee1da64ea99e1a124
BLAKE2b-256 checksum
How to use checksums
09b12306c3bf858186c1cb1b872fbae45ad5b820a2af7d5755766b9ad91b087a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / morph_kgc-2.10.0-py3-none-any.whl

Download URL morph_kgc-2.10.0-py3-none-any.whl
Size 72.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ce01d8db014a3cbe9d2e77f61c543ea8d19a7f9ec7cd6ad4abf203bd9ce9ba7
BLAKE2b-256 checksum
How to use checksums
c9c48edb7ec3b0602ffcfad2670cfb5eb2af2c40196695b440b636fc5a50b311
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

2.10.0 This release

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.2

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page