Importing OWL API in Matlab
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Kautuk Raj
el 26 de Feb. de 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
0 comentarios
Ver también
Categorías
Más información sobre Denoising and Compression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!