Package au.csiro.ontology.classification

Examples of au.csiro.ontology.classification.IReasoner.classify()


        baseAxioms.add(f.createRoleInclusion(rlhs, rrhs));
       
        // The first time the classify method is called it runs a full
        // classification
        reasoner.loadAxioms(baseAxioms);
        reasoner.classify();
       
        // If classification worked properly then Endocarditis should be
        // classified not only as an Inflammation but also as a HeartDisease
        // and a CriticalDisease
        Ontology t = reasoner.getClassifiedOntology();
View Full Code Here


        additionalAxioms.add(f.createConceptInclusion(lhs, rhs));
       
        // Subsequent invocations will trigger an incremental classification
        System.out.println("Running incremental classification:");
        reasoner.loadAxioms(additionalAxioms);
        reasoner.classify();
       
        // Now Endocarditis should be a HeartInflammation instead of an
        // Inflammation
        t = reasoner.getClassifiedOntology();
        endocarditisNode = t.getNode("Endocarditis");
View Full Code Here

       
        // The first time the classify method is called it runs a full
        // classification. In this example there is no base state loaded so
        // a full (and not very useful) classification will be excuted.
        reasoner.loadAxioms(axioms);
        reasoner.classify();
       
        // The taxonomy contains the inferred hierarchy
        Ontology t = reasoner.getClassifiedOntology();
       
        // We can look for nodes using the concept ids.
View Full Code Here

        axioms.add(a5b);
       
        // Create a classifier and classify the axioms
        IReasoner r = new SnorocketReasoner();
        r.loadAxioms(axioms);
        r = r.classify();
       
        // Get only the taxonomy
        Ontology res = r.getClassifiedOntology();
        Utils.printTaxonomy(res.getTopNode(), res.getBottomNode());
    }
View Full Code Here

        Iterator<Ontology> it = oi.getOntologyVersions(new NullProgressMonitor());
        while(it.hasNext()) {
            Ontology ont = it.next();
            IReasoner r = new SnorocketReasoner();
            r.loadAxioms(ont);
            r = r.classify();
            Ontology co = r.getClassifiedOntology();
            int numConcepts = co.getNodeMap().keySet().size();
            System.out.println("numConcepts: "+numConcepts);
        }
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.