Azzera filtri
Azzera filtri

Importing OWL API in Matlab

2 visualizzazioni (ultimi 30 giorni)
Meh
Meh il 29 Gen 2021
Risposto: Kautuk Raj il 26 Feb 2024
Hi... I'm trying to import OWL API to load an ontology file in Matlab, but I'm stuck with the error that says "Unable to resolve the name OWLManager.createOWLOntologyManager." My initial part of the code goes here.
% ========== OWL API Integration Code (Start) ==========
import org.semanticweb.owlapi.apibinding.OWLManager.*;
import org.semanticweb.owlapi.model.OWLOntologyManager.*;
import org.semanticweb.owlapi.model.IRI.*;
import java.io.File;
import java.io.IOException;
% Create Ontology Manager
manager = OWLManager.createOWLOntologyManager();
file = File('D:\Ran-Code\Affective_Computing_Prototype\0. Ontology\DECAF_Affective_Computing.owl');
localOntology = manager.loadOntologyFromOntologyDocument(file);
sprintf('Loaded ontology: %s', localOntology)
Any help is highly appreciated.

Risposte (1)

Kautuk Raj
Kautuk Raj il 26 Feb 2024
From your question, I can understand that you are experiencing difficulties integrating the OWL API with MATLAB to load an ontology file and are encountering an error related to MATLAB's inability to recognize the "OWLManager.createOWLOntologyManager" method. I assume that you are using MATLAB R2023b.
This issue is likely because the OWL API JAR files are not on the Java class path in MATLAB. To fix this, you need to make sure that the OWL API JAR files and any other required dependencies are included on the MATLAB Java class path. More details can be found on the documentation page of the OWL API: https://github.com/owlcs/owlapi/wiki/Documentation

Categorie

Scopri di più su Denoising and Compression in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by