On 12/06/14 04:40, Kamalraj Jairam wrote:
Hello All,
Need some help to tune this piece of code. Let me describe the use case
A user would upload a very complex ontology into a webpage and selects a
reasoner from a drop down list which he/she wants to apply for a “Business
Function” .
Example of complex ontology
https://s3-ap-southeast-2.amazonaws.com/kamalraj-share/SNOMED_module4fma.owl
https://s3-ap-southeast-2.amazonaws.com/kamalraj-share/SNOMED_module4nci.owl
When the user selects OWL_MEM as ontology specification, this piece of code
just flies and no issues at all (I presume no reasoning or inferencing is
applied here)
When the user selects OWL_MEM_MICRO_RULE_INF , the system hangs in this piece
of code.
OntClass ontClass = ontModel.getOntClass(“Some URI");
Sample Code
File file = new File("/Users/kamalrajjairam/Downloads/SNOMED_module4fma.owl");
InputStream inputStream = new FileInputStream(file);
Model m = ModelFactory.createDefaultModel();
m.read(inputStream, null);
OntModel ontModel =
ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF, m);
OntClass ontClass = ontModel.getOntClass(variable);
Questions
How do i tune this piece of code? Should i be listing statements instead of
using APIs in OWLClass?
No obvious tuning is possible, it sounds like that SNOWMED module is too
large/complex for the rule reasoner to cope with. You need to look at
Pellet or other research or commercial reasoners.
Dave