Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.2 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.2 KB

Output Example

Reasoner-Multiprocessing

I got an error while running too many rules on owlready2 on reasoner. I wanted to find a solution to this situation.

Error Preview;

java.lang.OutOfMemoryError: Java heap space:failed reallocation of scalar replaced objects.

Increasing the "Java Heap Size" was a bit of a solution, but still not enough.

Solution

This algorithm may not be correctly, but it can work for project or something. Let me explain how to solve it.

Split all the rules and send all them to the reasoner.

Algorithm

How to use it?

You can check "src/reasoner.py" all codes.

from reasoner import Reasoner

file_name = "example.owl"
reasoner_type = "pellet"
sleep_time = 10
infer_property_values = True
infer_data_property_values = True

Reasoner(
        file_name = file_name,
        reasoner_type = reasoner_type,
        sleep_time = sleep_time,
        infer_property_values = infer_property_values,
        infer_data_property_values = infer_data_property_values,
).run()