pyfactxx

Python bindings for upgraded FaCT++ description logic reasoner

https://github.com/tilde-lab/pyfactxx

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: scholar.google, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

description-logics ontologies ontology owl owl2 owlapi rdflib reasoner reasoner-benchmark semantic-web

Keywords from Contributors

cif ab-initio azure-api-management azure-cloud-services hetzner hetzner-api hetzner-cloud materials-informatics materials-science queues
Last synced: 6 months ago · JSON representation ·

Repository

Python bindings for upgraded FaCT++ description logic reasoner

Basic Info
Statistics
  • Stars: 25
  • Watchers: 7
  • Forks: 3
  • Open Issues: 5
  • Releases: 2
Topics
description-logics ontologies ontology owl owl2 owlapi rdflib reasoner reasoner-benchmark semantic-web
Created about 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme Citation

README.md

Python bindings for FaCT++ reasoner

DOI PyPI FOSSA Status

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.

The pyfactxx links the FaCT++ reasoner to the Python's RDFLib package. The code is based on the works of Artur Wroblewski: factpp and coras interfaces.

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.

Apart of our present work, 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).

Reasoner optimizations for RDFLib

The pyfactxx presents the following updates to FaCT++:

  • drastically improved individuals support (precacheIndividuals)
  • unified access point allowing arbitrary SPARQL queries
  • exposing all the required C++ interfaces to RDFLib via the coras interface

Installation

pip install pyfactxx

NB the PyPI releases plus wheels are done via GitHub action.

Usage

See examples folder. In essense:

``` from pyfactxx import coras

crs = coras.Coras() crs.load(ontology_file, format='turtle')

crs.parse() crs.realise()

result = crs.query('SELECT ?a ?b ?c WHERE {?a ?b ?c}') ```

Authors of Python part

  • Artur Wroblewski
  • Evgeny Blokhin
  • Andrey Sobolev
  • Ivan Rygaev

Authors of C++ part

  • Dmitry Tsarkov
  • Ian Horrocks
  • Ivan Rygaev

License

  • Kernel reasoner code: GNU LGPL 2.1
  • Coras Python interface: GNU GPL 3.0

FOSSA Status

Owner

  • Name: Tilde
  • Login: tilde-lab
  • Kind: organization
  • Email: support@tilde.pro
  • Location: The Internet

Tilde Materials Informatics Virtual Lab

Citation (CITATION.cff)

cff-version: 1.2.0
title: pyfactxx
type: software
license: GPL-3.0
authors:
  - given-names: Artur
    family-names: Wroblewski
    orcid: 'https://orcid.org/0009-0003-8000-5716'
  - given-names: Ivan
    family-names: Rygaev
    orcid: 'https://orcid.org/0000-0003-4135-6954'
  - given-names: Andrey
    family-names: Sobolev
    orcid: 'https://orcid.org/0000-0001-5086-6601'
  - given-names: Evgeny
    family-names: Blokhin
    orcid: 'https://orcid.org/0000-0002-5333-3947'
doi: 10.5281/zenodo.7693502
url: 'https://github.com/tilde-lab/pyfactxx'
repository-artifact: 'https://pypi.org/project/pyfactxx'
keywords:
  - semantic web
  - OWL
  - ontology
  - rdflib
  - reasoner
  - description logic
  - owlapi
  - reasoner benchmark

GitHub Events

Total
  • Watch event: 5
Last Year
  • Watch event: 5

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 118
  • Total Committers: 5
  • Avg Commits per committer: 23.6
  • Development Distribution Score (DDS): 0.602
Past Year
  • Commits: 9
  • Committers: 2
  • Avg Commits per committer: 4.5
  • Development Distribution Score (DDS): 0.444
Top Committers
Name Email Commits
Andrey Sobolev a****v@g****m 47
irygaev i****v@g****m 32
Evgeny Blokhin eb@t****o 32
fact i****v@u****u 6
fossabot b****s@f****o 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 10
  • Total pull requests: 9
  • Average time to close issues: 25 days
  • Average time to close pull requests: 5 days
  • Total issue authors: 4
  • Total pull request authors: 3
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.67
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • blokhin (6)
  • daniel86 (2)
  • ansobolev (1)
  • yelimkim24 (1)
Pull Request Authors
  • blokhin (6)
  • dependabot[bot] (4)
  • fossabot (1)
Top Labels
Issue Labels
enhancement (2) help wanted (1) bug (1) question (1) pvs-studio (1) documentation (1)
Pull Request Labels
dependencies (4) github_actions (2) pvs-studio (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 349 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 4
  • Total maintainers: 3
proxy.golang.org: github.com/tilde-lab/pyfactxx
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: pyfactxx

Python bindings to FaCT++ reasoner

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 349 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 17.2%
Average: 21.9%
Forks count: 23.2%
Dependent repos count: 30.6%
Downloads: 32.0%
Maintainers (3)
Last synced: 6 months ago

Dependencies

FaCT++.Java/pom.xml maven
  • edu.stanford.protege:org.protege.editor.owl 4.3.0
  • net.sourceforge.owlapi:owlapi-distribution 4.3.1
  • junit:junit 4.12 test
  • org.slf4j:slf4j-nop 1.7.22 test