Importing OWL API in Matlab
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Kautuk Raj
2024 年 2 月 26 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Call Java from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!