本文整理汇总了Java中org.semanticweb.owlapi.reasoner.OWLReasonerFactory.createNonBufferingReasoner方法的典型用法代码示例。如果您正苦于以下问题:Java OWLReasonerFactory.createNonBufferingReasoner方法的具体用法?Java OWLReasonerFactory.createNonBufferingReasoner怎么用?Java OWLReasonerFactory.createNonBufferingReasoner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.semanticweb.owlapi.reasoner.OWLReasonerFactory
的用法示例。
在下文中一共展示了OWLReasonerFactory.createNonBufferingReasoner方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; //导入方法依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
long start = System.currentTimeMillis();
OWLOntologyManager man = OWLManager.createOWLOntologyManager();
// loading the root ontology
OWLOntology root = null;
try {
root = man.loadOntologyFromOntologyDocument(new File(
"C:\\dev\\ontologies\\owl\\snomed_20130131_stated.owl"));
} catch (OWLOntologyCreationException e) {
e.printStackTrace();
return;
}
System.out.println("owl-api loading: "+(System.currentTimeMillis()-start));
// Create a Snorocket reasoner and classify
OWLReasonerFactory reasonerFactory = new SnorocketReasonerFactory();
OWLReasoner reasoner = reasonerFactory.createNonBufferingReasoner(root);
reasoner.precomputeInferences(InferenceType.CLASS_HIERARCHY);
reasoner.dispose();
System.out.println(Statistics.INSTANCE.getStatistics());
System.out.println("Total time: "+Statistics.INSTANCE.getTotalTime());
}
示例2: testNonBufferingReasoner
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; //导入方法依赖的package包/类
@Test
public void testNonBufferingReasoner() throws OWLOntologyCreationException {
prepare();
OWLReasonerFactory reasonerFactory = new ElkReasonerFactory();
reasoner = reasonerFactory.createNonBufferingReasoner(ont);
testReasoner();
}
示例3: processReasonerProperties
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; //导入方法依赖的package包/类
private OWLReasoner processReasonerProperties() {
OWLReasoner reasoner;
final OWLReasonerFactory reasonerFactory = PelletReasonerFactory
.getInstance();
reasoner = reasonerFactory.createNonBufferingReasoner(ontology);
return reasoner;
}
示例4: KnowledgeBase
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory; //导入方法依赖的package包/类
public KnowledgeBase(String ontoFile) throws OWLOntologyCreationException{
OWLDataFactoryImpl owlDataFactoryImpl = new OWLDataFactoryImpl();
OWLOntologyManager manager =OWLManager.createOWLOntologyManager();
OWLOntology onto=manager.loadOntologyFromOntologyDocument(new File(ontoFile));
OWLReasonerFactory f= new JFactFactory();
reasoner = f.createNonBufferingReasoner(onto);
//Transaction tr= session.beginTransaction();
// try{
classesInSignature = onto.getClassesInSignature();
instances = onto.getIndividualsInSignature();
propertyInSignature = onto.getObjectPropertiesInSignature();
}