Python bindings to FaCT++ reasoner
Project description
Python bindings for FaCT++ reasoner
FaCT++ is a well-optimized open-source reasoner for SROIQ(D) description logic with simple datatypes (OWL 2), written in C++. FaCT++ was created in 2003-2015 by Dmitry Tsarkov and Ian Horrocks in the University of Manchester, UK.
This repository is the work in progress for linking the FaCT++ with the Python's RDFLib package. This repository is based on the works of Artur Wroblewski factpp and coras. The goals are to create the RDFLib store with inference capabilities and to demonstrate the use of the FaCT++ API.
Reasoner details
The FaCT++ implements the atomic decomposition algorithms (i.e. represents the ontologies as terse directed acyclic graphs). A tableaux decision procedure is applied for SROIQ(D) together with the set of optimisation heuristics, such as:
- lexical normalisation and simplification,
- synonym replacement,
- rewriting absorption,
- told cycle elimination,
- dependency-directed backtracking (backjumping),
- boolean constant propagation,
- semantic branching,
- ordering heuristics,
- model merging,
- completely defined concepts,
- clustering for wide and shallow taxonomies.
To tackle the OWL 2 computational complexity (double exponential in time for the worst case), the FaCT++ presents persistent and incremental reasoning. In the persistent mode, FaCT++ saves the inferred information together with its internal state into a file, which can be reloaded later with much less computational effort than reasoning would require. In the incremental mode, FaCT++ determines which parts of the precomputed inferences may be affected by an incoming change and only recomputes a subset of the inferences.
The mentioned above allows to achieve a very good performance on such known ontologies as FHKB, SNOMED CT, and Thesaurus.
The FaCT++ supports Java OWL-API, Lisp API, and DIG interface. It can also be used in C. There is also a work of Levin and Cowell on C++ usage (unmaintained).
Installation
pip install cython
cd FaCT++.Python
cmake .
make && make install
(Sorry, no pip support currently!)
Usage
Run an example:
python examples/imply-class.py
Try to load FOAF ontology:
./bin/factpp-load ontologies/foaf.rdf
and print ontology report:
./bin/factpp-load ontologies/foaf.rdf 2>&1 | bin/factpp-load-report
Authors of Python part
- Artur Wroblewski
- Evgeny Blokhin
- Andrey Sobolev
- Ivan Rygaev
License
- Kernel reasoner code: GNU LGPL 2.1
- Coras Python interface: GNU GPL 3.0
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
Built Distributions
Hashes for pyfactxx-1.8.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949ddb027fc391575b3aed955ca4d2bd74f49a434cac50d9e9e7632ba1debe58 |
|
MD5 | b070909fe820e137ace3730eb089e3f8 |
|
BLAKE2b-256 | 3aba510750d2a74a92ae2e3f51d657fecba241b55a381dafacfc4685434e87bf |
Hashes for pyfactxx-1.8.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3b5a8d68ee1b0a08597d85eb88406020345c7a571546e9b07062a1e989914b |
|
MD5 | a6e5085a74e9482a3b1bf888d58f61a1 |
|
BLAKE2b-256 | fef1d0bb624022e58d0a662b4c7b7adc31656f60388c7d20d98751e28e32b98b |
Hashes for pyfactxx-1.8.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddf99736e820327a254d89c0b38d763048c49999c9ce290a13cd603fc8304748 |
|
MD5 | b5d2d79e05aa0e53f2e793a13d92ebdb |
|
BLAKE2b-256 | 1229211c8bff8d3bb50006ff68ad7bdba0baf39c6aada16944c580892c28e64c |
Hashes for pyfactxx-1.8.1-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3af810b3bc39bb05956c9282fa006ba19f25fcda58fe9cc9213bf01f99a5b9c7 |
|
MD5 | 5f4b982322c0711140ae2ef3c8b34c00 |
|
BLAKE2b-256 | 739e2369d7dfda26599cb855386c41f096b39c681b2d4c27311c226eaf31cef3 |
Hashes for pyfactxx-1.8.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6fa041cd7b033c86223fcf9f3188337ed0d894e01db9c8ff497abe706c64af5 |
|
MD5 | 5f28c8ceb3b484c1e3283b13962f087a |
|
BLAKE2b-256 | 48022f1df0f04a267a81b890aec6a725e2c8491d7e2507cfb7cab18df50518a1 |
Hashes for pyfactxx-1.8.1-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0df23d4c7d3d00946c7714f9203621170bc9a37c5f0c9a34326471d4426d912f |
|
MD5 | 674e0d8c1637e85d46a10da188aa050c |
|
BLAKE2b-256 | e4da01a88911fc150857536d7f89bda0fec57725e235c63245be86f3ac484f53 |
Hashes for pyfactxx-1.8.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e01c3d842bfa57099361067c4da3a3eee52378964558adf1692cb401617ba2e6 |
|
MD5 | 940d9ef1e5172509595cdfdaa90f1bb4 |
|
BLAKE2b-256 | af8b2cb9d439a3a913a9e06cab7c5592b535bdfeea230ad62d5769f7c0eae1d8 |
Hashes for pyfactxx-1.8.1-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afde8f586209bee9773a21ffcbde1c051d1f3fe469ef12a8479e7461e6d422ec |
|
MD5 | 59584ed911a9ba4221c25f322bf65b1c |
|
BLAKE2b-256 | 28f2116eb9a4cbfb5afe61bf51863d48b72b2c3c4620c635ea16773c670c60ee |