This project allows users to generate explanations for OWL individuals based on specific queries using Pellet Reasoner. The explanations are generated in Manchester Syntax and saved as output files. It supports the use of ontology files in OWL format and allows users to query individuals based on specified conditions.
- Uses Pellet Reasoner to perform reasoning over OWL ontologies.
- Generates explanations for multiple OWL individuals using Manchester Syntax.
- Saves explanations to text files for future reference.
- Allows interactive selection list of individuals when given individual name doesn't match.
Before you can run the project, ensure you have the following installed:
- Java 8+
- Maven (for dependency management)
- Pellet Reasoner (included as a dependency via OWLAPI)
- OWLAPI v3 (included as a dependency)
-
Clone the repository:
git clone https://github.com/Balramt/Pellet-Explanation.git
-
Install the required dependencies by adding them to your
pom.xml
(if using Maven):<dependency> <groupId>com.clarkparsia.pellet</groupId> <artifactId>pellet-owlapiv3</artifactId> <version>2.4.0</version> </dependency> <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-distribution</artifactId> <version>3.5.2</version> </dependency>
-
Prepare your input file in the following format:
ontology=path/to/your/ontology.owl ns=http://your-ontology-namespace# query=your query expression individuals=individual1,individual2
- ontology: Full path to the local OWL ontology file.
- ns: Namespace (IRI) of the ontology.
- query: The class expression query in Manchester Syntax.
- individuals: A comma-separated list of individual names to explain.
-
Run the application by providing the input file path:
java -jar target/Ind_Explanation_IO_File.jar
-
You will be prompted to enter the path to the input file. Enter the full path to your input file:
Enter the path to the input file: /path/to/your/input.txt
-
The program will generate explanations for the individuals matching the query. If an individual name cannot be found, the program will list all matching individuals, and you will be prompted to select one.
-
The explanations will be saved as
.txt
files in theexplanation_output
directory. Each file will be named based on the individual’s name and the current timestamp. -
After the program completes, the console will output the location of the saved explanation file(s) and the total execution time.
If you find any bugs or have suggestions for new features, feel free to open an issue or a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.