{"id":20749728,"url":"https://github.com/tilde-lab/pyfactxx","last_synced_at":"2025-08-21T17:31:24.324Z","repository":{"id":37439061,"uuid":"331395431","full_name":"tilde-lab/pyfactxx","owner":"tilde-lab","description":"Python bindings for upgraded FaCT++ description logic reasoner","archived":false,"fork":false,"pushed_at":"2024-09-03T22:12:18.000Z","size":6918,"stargazers_count":23,"open_issues_count":5,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-13T01:50:34.178Z","etag":null,"topics":["description-logics","ontologies","ontology","owl","owl2","owlapi","rdflib","reasoner","reasoner-benchmark","semantic-web"],"latest_commit_sha":null,"homepage":"https://bitbucket.org/dtsarkov/factplusplus","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilde-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-20T18:28:43.000Z","updated_at":"2024-10-30T16:36:55.000Z","dependencies_parsed_at":"2022-07-12T14:30:49.400Z","dependency_job_id":"44547f7b-adf4-4d01-b9aa-b7d6c8a4a1ac","html_url":"https://github.com/tilde-lab/pyfactxx","commit_stats":{"total_commits":109,"total_committers":5,"mean_commits":21.8,"dds":0.5688073394495412,"last_synced_commit":"814bfe94d4ada40c153569c6606ab78d4bcdaec4"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilde-lab%2Fpyfactxx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilde-lab%2Fpyfactxx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilde-lab%2Fpyfactxx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilde-lab%2Fpyfactxx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilde-lab","download_url":"https://codeload.github.com/tilde-lab/pyfactxx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230523755,"owners_count":18239444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["description-logics","ontologies","ontology","owl","owl2","owlapi","rdflib","reasoner","reasoner-benchmark","semantic-web"],"created_at":"2024-11-17T08:24:20.068Z","updated_at":"2024-12-20T02:06:05.801Z","avatar_url":"https://github.com/tilde-lab.png","language":"Java","funding_links":[],"categories":["Java","Reasoners"],"sub_categories":["Vocabularies"],"readme":"# Python bindings for FaCT++ reasoner\n\n[![DOI](https://zenodo.org/badge/331395431.svg)](https://doi.org/10.5281/zenodo.7693502)\n[![PyPI](https://img.shields.io/pypi/v/pyfactxx.svg?style=flat)](https://pypi.org/project/pyfactxx)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftilde-lab%2Fpyfactxx.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftilde-lab%2Fpyfactxx?ref=badge_shield)\n\nFaCT++ is a well-optimized [open-source](https://bitbucket.org/dtsarkov/factplusplus) reasoner for **_SROIQ(D)_** description logic with simple datatypes (OWL 2), written in C++. FaCT++ was created in 2003-2015 by [Dmitry Tsarkov](https://scholar.google.com/citations?user=jDcQ7vQAAAAJ) and [Ian Horrocks](https://scholar.google.com/citations?user=0ypdmcYAAAAJ) in the University of Manchester, UK.\n\nThe `pyfactxx` links the FaCT++ reasoner to the Python's [RDFLib](https://rdflib.dev) package. The code is based on the works of Artur Wroblewski: [factpp](https://bitbucket.org/wrobell/factplusplus/src/factpp/factpp) and [coras](https://bitbucket.org/wrobell/coras) interfaces.\n\n\n## Reasoner details\n\nThe FaCT++ implements the [atomic decomposition algorithms](http://ceur-ws.org/Vol-1080/owled2013_13.pdf) (_i.e._ represents the ontologies as terse directed acyclic graphs). A [tableaux decision procedure](http://www.cs.ox.ac.uk/ian.horrocks/Publications/download/2007/HoSa07a.pdf) is applied for **_SROIQ(D)_** together with the set of [optimisation heuristics](https://doi.org/10.1007/11814771_26), such as:\n\n- lexical normalisation and simplification,\n- synonym replacement,\n- rewriting absorption,\n- told cycle elimination,\n- dependency-directed backtracking (backjumping),\n- boolean constant propagation,\n- semantic branching,\n- ordering heuristics,\n- model merging,\n- completely defined concepts,\n- clustering for wide and shallow taxonomies.\n\nTo tackle the OWL 2 computational complexity (double exponential in time for the worst case), the FaCT++ presents [persistent and incremental reasoning](http://ceur-ws.org/Vol-1207/paper_7.pdf). 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.\n\nThe mentioned above allows to achieve a very good performance on such known ontologies as **FHKB**, **SNOMED CT**, and **Thesaurus**.\n\nApart of our present work, the FaCT++ supports [Java OWL-API](https://github.com/owlcs/owlapi), Lisp API, and [DIG interface](http://dl.kr.org/dig/interface.html). It can also be [used in C](https://bitbucket.org/dtsarkov/factplusplus/src/master/FaCT++.C/test.c). There is also a [work of Levin and Cowell](https://doi.org/10.1186/s13326-015-0035-z) on C++ usage (unmaintained).\n\n\n## Reasoner optimizations for RDFLib\n\nThe `pyfactxx` presents the following updates to FaCT++:\n\n- drastically improved individuals support (`precacheIndividuals`)\n- unified access point allowing arbitrary SPARQL queries\n- exposing all the required C++ interfaces to RDFLib via the `coras` interface\n\n\n## Installation\n\n`pip install pyfactxx`\n\nNB the PyPI releases plus wheels are done via GitHub action.\n\n\n## Usage\n\nSee `examples` folder. In essense:\n\n```\nfrom pyfactxx import coras\n\ncrs = coras.Coras()\ncrs.load(ontology_file, format='turtle')\n\ncrs.parse()\ncrs.realise()\n\nresult = crs.query('SELECT ?a ?b ?c WHERE {?a ?b ?c}')\n```\n\n\n## Authors of Python part\n\n- Artur Wroblewski\n- Evgeny Blokhin\n- Andrey Sobolev\n- Ivan Rygaev\n\n\n## Authors of C++ part\n\n- Dmitry Tsarkov\n- Ian Horrocks\n- Ivan Rygaev\n\n\n## License\n\n- Kernel reasoner code: GNU LGPL 2.1\n- Coras Python interface: GNU GPL 3.0\n\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftilde-lab%2Fpyfactxx.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftilde-lab%2Fpyfactxx?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilde-lab%2Fpyfactxx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilde-lab%2Fpyfactxx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilde-lab%2Fpyfactxx/lists"}