当前位置: 首页>>代码示例>>Java>>正文


Java OWLReasonerFactory.createNonBufferingReasoner方法代码示例

本文整理汇总了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());
}
 
开发者ID:aehrc,项目名称:snorocket,代码行数:28,代码来源:OWLBenchmark.java

示例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();
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:BaseOWLAPILowLevelIncrementalClassTest.java

示例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;
}
 
开发者ID:edlectrico,项目名称:Pellet4Android,代码行数:8,代码来源:OntologyManager.java

示例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();
}
 
开发者ID:Giuseppe-Rizzo,项目名称:owl2neo4j,代码行数:20,代码来源:KnowledgeBase.java


注:本文中的org.semanticweb.owlapi.reasoner.OWLReasonerFactory.createNonBufferingReasoner方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。