Skip to main content

A knowledge integration framework based on Wikidata

Project description

KIF — Knowledge Integration Framework

KIF is a knowledge integration framework from IBM Research.

KIF is based on Wikidata and it's licensed under the Apache-2.0 license.

First time here? Check out the quickstart guide.

Highlights

  • KIF can be seen as a Python interface to query Wikidata (RDF).

  • KIF queries are written in the KIF pattern language, which is based on Wikidata's data model.

  • KIF can be used to query knowledge sources other than Wikidata, provided proper SPARQL mappings are given.

  • KIF comes with built-in mappings for DBpedia and PubChem RDF. Other mappings can be added programmatically.

Hello world!

Prints an arbitrary statement from Wikidata:

from kif_lib import *
from kif_lib.compiler.sparql.mapping.wikidata import WikidataMapping
kb = Store('sparql2', 'https://query.wikidata.org/sparql', WikidataMapping())
print(next(kb.filter()))

Prints an arbitrary Wikidata-like statement from DBpedia:

from kif_lib import *
from kif_lib.compiler.sparql.mapping.dbpedia import DBpediaMapping
kb = Store('sparql2', 'https://dbpedia.org/sparql', DBpediaMapping())
print(next(kb.filter()))

Installation

$ pip install kif-lib

Documentation

See documentation and examples.

Citation

Guilherme Lima, João M. B. Rodrigues, Marcelo Machado, Elton Soares, Sandro R. Fiorini, Raphael Thiago, Leonardo G. Azevedo, Viviane T. da Silva, Renato Cerqueira. "KIF: A Wikidata-Based Framework for Integrating Heterogeneous Knowledge Sources", arXiv:2403.10304, 2024.

License

Released under the Apache-2.0 license.

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

kif_lib-0.6.1.tar.gz (388.6 kB view details)

Uploaded Source

Built Distribution

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

kif_lib-0.6.1-py3-none-any.whl (437.4 kB view details)

Uploaded Python 3

File details

Details for the file kif_lib-0.6.1.tar.gz.

File metadata

  • Download URL: kif_lib-0.6.1.tar.gz
  • Upload date:
  • Size: 388.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for kif_lib-0.6.1.tar.gz
Algorithm Hash digest
SHA256 8e806e2400caa62730c7de45144b6ac74cd35a494ba6fc763e17c930a292b6df
MD5 a6c70a04035ec67a91ef15dbd7357096
BLAKE2b-256 7f1087e86d186e981987881ac535eab6012c8ec33ecbd4bcc589eed47ecb0bdf

See more details on using hashes here.

File details

Details for the file kif_lib-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: kif_lib-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 437.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for kif_lib-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f83220c5205ac0de149aecf67d05e74b43123e40a0bd3471f01525881d9cde2a
MD5 1f207ee4277e0065d3c031cda9ab1269
BLAKE2b-256 21b69738ae8d663981e88b47fc54c002632965495fdb3dae3ff88b1d86c2d7d8

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