Metadata-Version: 2.4
Name: kif-lib
Version: 0.8.1
Summary: A knowledge integration framework based on Wikidata
Home-page: https://github.com/IBM/kif
Author: IBM
Author-email: Guilherme.Lima@ibm.com
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Requires-Dist: lark
Requires-Dist: more_itertools
Requires-Dist: networkx
Requires-Dist: rdflib
Requires-Dist: types-networkx
Requires-Dist: typing-extensions
Provides-Extra: all
Requires-Dist: myst_nb; extra == "all"
Requires-Dist: sphinx-rtd-theme; extra == "all"
Requires-Dist: click; extra == "all"
Requires-Dist: graphviz; extra == "all"
Requires-Dist: jpype1; extra == "all"
Requires-Dist: rich; extra == "all"
Requires-Dist: types-click; extra == "all"
Requires-Dist: flake8; extra == "all"
Requires-Dist: isort; extra == "all"
Requires-Dist: mypy; extra == "all"
Requires-Dist: pylint; extra == "all"
Requires-Dist: pyright; extra == "all"
Requires-Dist: pytest; extra == "all"
Requires-Dist: pytest-asyncio; extra == "all"
Requires-Dist: pytest-cov; extra == "all"
Requires-Dist: pytest-mypy; extra == "all"
Requires-Dist: pyupgrade; extra == "all"
Requires-Dist: setuptools; extra == "all"
Requires-Dist: tox; extra == "all"
Provides-Extra: docs
Requires-Dist: myst_nb; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: extra
Requires-Dist: click; extra == "extra"
Requires-Dist: graphviz; extra == "extra"
Requires-Dist: jpype1; extra == "extra"
Requires-Dist: rich; extra == "extra"
Requires-Dist: types-click; extra == "extra"
Provides-Extra: tests
Requires-Dist: flake8; extra == "tests"
Requires-Dist: isort; extra == "tests"
Requires-Dist: mypy; extra == "tests"
Requires-Dist: pylint; extra == "tests"
Requires-Dist: pyright; extra == "tests"
Requires-Dist: pytest; extra == "tests"
Requires-Dist: pytest-asyncio; extra == "tests"
Requires-Dist: pytest-cov; extra == "tests"
Requires-Dist: pytest-mypy; extra == "tests"
Requires-Dist: pyupgrade; extra == "tests"
Requires-Dist: setuptools; extra == "tests"
Requires-Dist: tox; extra == "tests"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<img src="https://raw.githubusercontent.com/IBM/kif/refs/heads/main/docs/_static/kif-boxed.svg" width="96">

# Knowledge Integration Framework #

KIF is a knowledge integration framework from [IBM Research](https://research.ibm.com/).

KIF is based on [Wikidata](https://www.wikidata.org/) and it's licensed
under the [Apache-2.0 license](./LICENSE).

First time here? Check out the [quickstart
guide](https://ibm.github.io/kif/quickstart.html).

## Highlights

* KIF is an interface to query knowledge sources as if they were Wikidata.

* KIF queries are written in the KIF pattern language, which is based on
  [Wikidata's data model](https://www.wikidata.org/wiki/Wikidata:Data_model).

* KIF can be used to query Wikidata itself or other knowledge sources,
  provided proper SPARQL mappings are given.

* KIF comes with built-in mappings for [DBpedia](https://www.dbpedia.org/)
  and [PubChem RDF](https://pubchem.ncbi.nlm.nih.gov/docs/rdf).  Other
  mappings can be added programmatically.

### Hello world! ###

Prints an arbitrary statement from [Wikidata](https://www.wikidata.org/):

```python
from kif_lib import *
kb = Store('wdqs')
print(next(kb.filter()))
```

Prints an arbitrary Wikidata-like statement from
[DBpedia](https://www.dbpedia.org/):

```python
kb = Store('dbpedia-sparql')
print(next(kb.filter()))
```

## Installation ##

```shell
$ pip install kif-lib
```

## Documentation ##

See [documentation](https://ibm.github.io/kif/) and [examples](./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"](https://arxiv.org/abs/2403.10304), arXiv:2403.10304,
2024.


## License ##

Released under the [Apache-2.0 license](./LICENSE).
