Giter Site home page Giter Site logo

tilde-lab / pyfactxx Goto Github PK

View Code? Open in Web Editor NEW
20.0 8.0 3.0 6.75 MB

Python bindings for upgraded FaCT++ description logic reasoner

Home Page: https://bitbucket.org/dtsarkov/factplusplus

CMake 0.20% C++ 41.06% C 1.05% Java 53.45% Python 2.37% Shell 0.03% Common Lisp 1.09% Cython 0.75%
owl rdflib ontology ontologies owl2 owlapi description-logics semantic-web reasoner reasoner-benchmark

pyfactxx's People

Contributors

ansobolev avatar blokhin avatar fossabot avatar irygaev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyfactxx's Issues

Obtaining incremental inferences

Hello again,

I would like to use pyfactxx in an incremental fashion where initially I load some files, and during runtime mainly object and data roles are asserted and retracted.
I am now wondering about whether there is a smart way to obtain a list of all new inferences after calling classify/realize, and also which previous inferences were removed.
This information could be obtained be keeping the list of previous inferences in my code, but that seems not optimal.

Is there some way I am not aware of? Maybe to hook an event handler into the reasoner that gets a call for every change?

Best,
Daniel

Coras tests fail

Steps to reproduce:

cd FaCT++.Python
pip install -e .
pytest pyfactxx

Results in:

======================================================= test session starts =======================================================platform linux -- Python 3.8.0, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/andrey/SEMANTIC/pyfactxx/FaCT++.Python, configfile: setup.cfg
plugins: cov-3.0.0
collected 44 items

pyfactxx/tests/test_concept.py ....                                                                                         [  9%] 
pyfactxx/tests/test_d_role.py .....                                                                                         [ 20%] 
pyfactxx/tests/test_instance.py .                                                                                           [ 22%] 
pyfactxx/tests/test_o_role.py .......FF...                                                                                  [ 50%] 
pyfactxx/tests/test_one_to_one.py ........                                                                                  [ 68%]
pyfactxx/tests/test_query_instances.py .....                                                                                [ 79%] 
pyfactxx/tests/test_set_op.py ..                                                                                            [ 84%] 
pyfactxx/tests/coras/test_coras.py FF.FFFF                                                                                  [100%]

============================================================ FAILURES =============================================================

pyfactxx.rdflib_interface

What's wrong?

FaCT++.Kernel: Reasoner for the SROIQ(D) Description Logic, 64-bit
Copyright (C) Dmitry Tsarkov, Ivan Rygaev, 2002-2022. Version 1.8.1-SNAPSHOT (21 June 2022)
Traceback (most recent call last):
File "./bin/factpp-load", line 24, in
import pyfactxx.rdflib_interface
ModuleNotFoundError: No module named 'pyfactxx.rdflib_interface'

Compilation fails due to absence of Java

This is strange, since we basically do not use Java...

root@corvus:/home/eb/pyfactxx# cmake .
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
  JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindJNI.cmake:372 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  FaCT++.JNI/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!

pip artifact is not up to date

Hello,

Loading an ontology fails with published pip artifact:

>>> crs.load(owfile)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/daniel/.local/lib/python3.10/site-packages/pyfactxx/coras/core.py", line 50, in load
    self._graph.load(f, format=format)
AttributeError: 'ConjunctiveGraph' object has no attribute 'load'

In fact, core.py in the source tree rather uses parse method, changing it in the file fixes the loading error.

Cmake build works no more

$ make
...
CMake Error: Error: generator : Unix Makefiles
Does not match the generator used previously: Ninja
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
...
Please see CMake's output for more information.
make[2]: *** [CMakeFiles/pyfactxx-build.dir/build.make:64: build/timestamp] Error 1
make[2]: Leaving directory '/home/eb/pyfactxx/FaCT++.Python'
make[1]: *** [CMakeFiles/Makefile2:79: CMakeFiles/pyfactxx-build.dir/all] Error 2
make[1]: Leaving directory '/home/eb/pyfactxx/FaCT++.Python'
make: *** [Makefile:133: all] Error 2

Kernel/TaxonomyCreator.h: 'p_begin' is equivalent to 's_end'

PVS-Studio: V524
TaxonomyCreator.h 82
It is odd that the body of 'p_begin' function is fully equivalent to the body of 's_end' function:

ss_iterator s_begin ( void ) override { return beg; }
ss_iterator s_end ( void ) override { return end; }
ss_iterator p_begin ( void ) override { return end; }      // <=
ss_iterator p_end ( void ) override { return end; }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.